In Cali a shotgun must have an 18in barrel with a 26in length when operational.
A semi auto rifle must have a 16in barrel and be 30in when operational.
Now this is from wiki, but is my understanding too.
USA
Under the National Firearms Act (NFA), it is illegal for a private citizen to possess a sawed-off modern smokeless powder shotgun (a shotgun with a barrel length shorter than 18 inches (46 cm) or an overall length shorter than 26 inches (66 cm)) (under U.S.C. Title II), without a tax-paid registration from the Bureau of Alcohol, Tobacco, Firearms and Explosives, requiring a background check and either a $200 or $5 tax for every transfer, depending upon the specific manufacturing circumstances of the particular sawed-off modern shotgun being transferred. Gun trusts have become an increasingly popular means of registering SBS' with the BATFE.[9] Short-barreled muzzleloading blackpowder shotguns, in contrast, are not illegal by federal law and require no tax-stamped permit, although they may be illegal under state law. As with all NFA regulated firearms, a new tax stamp must be purchased before every transfer. Inter-state transfers must be facilitated through a Federal Firearms Licensee (FFL) while intrastate transfers may be between two persons.[10]
In the US, shotguns originally manufactured without shoulder stocks (and thus not legally shotguns), with a total length under 26 inches, are classified as an "Any Other Weapon" by the BATFE and have a $5 transfer tax, if they are manufactured by a maker possessing the appropriate Class 2 Special Occupational Taxpayer Federal Firearms License. However, in order to convert an existing shoulder-stocked shotgun to a short-barreled shotgun or an existing pistol-grip-only shotgun to an "Any Other Weapon", a private citizen must pay the standard $200 NFA tax.[2]