yep what jrod said.
Practically speaking these days
a 16" barrel is legal carbine length.
a 20" barrel is considered rifle length.
Anything under (total length) 16 inches is considered illegal for a rifle.
To own a rifle with a shorter barrel you need to register it as a SBR and pay for a stamp.
You can have a 14.5" barrel with a permanently attached (welded) flash supressor or compensator.. but the overall length has to be 16"
If you are under 16" total length you are in pistol territory.
For an AR platform to be a legal pistol you have a couple options.
1. Buy a production pistol from the factory
2. Buy a stripped virgin lower and build it as a pistol (this is very similar to 3 and slightly more risky)
3. Buy a stripped lower new from the factory.. and designate it as a pistol from day 1 when you do the FFL transfer from the dealer.
In any case, none of these can EVER have any type of traditional buttstock attached. If you put a buttstock on a virgin lower, or a pistol designated lower or take the pistol buffer off your factory gun and attach a buttstock you have broken the law.
It's a REALLY big deal. You can go to jail. You will likely never be allowed to legally own a firearm again in your lifetime.. DON'T DO IT.