If you are building a pistol, it doesn't matter.
If you are building an SBR, bbl length less than 16" or OAL of less than 26".
If you are building a rifle, bbl length of at least 16", OAL of at least 26".
For barrel length:
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.
For OAL:
...if the firearm has a folding or collapsible stock, the overall measurement is to be made with the stock extended... Currently there is a nationwide injunction against
ATF Rule 2021R-08F .......but that may be appealed.
If it is appealed, and SCOTUS rules in favor of ATF, then you may have an NFA firearm.