16" is Federally mandated, I cut them just a tad longer because I don't trust anyone:
The ATF procedure for measuring barrel length is to measure from the closed bolt (or breech-face) to the furthermost end of the barrel or permanently attached muzzle device. Permanent methods of attachment include full-fusion gas or electric steel-seam welding, high-temperature (1100°F) silver soldering, or blind pinning with the pin head welded over. Barrels are measured by inserting a dowel rod into the barrel until the rod stops against the bolt or breech-face. The rod is then marked at the furthermost end of the barrel or permanently attached muzzle device, withdrawn from the barrel, and measured.