From the closed breech, through the barrel, perpendicular to the breechface.
Basically, stick a cleaning rod down the barrel on the closed action, mark where it is, remove and measure. If it's 18", for example, cut 1 3/4" - leave at least 1/4" safety margin above 16".
Also - measure CAREFULLY, and measure at least three times, to be certain. Any measurement at all under 16", without paying a short-barreled rifle tax, and you're in big trouble with the Feds.