Chamber an empty case, slide a dowel down the barrel until it stops, make a pencil mark at the muzzle, remove dowel from barrel, measure the part of the dowel that was in the barrel to the pencil mark with tape measure.
Some folks like to subtract the length of the base of the case (boltface) to the base of the loaded bullet where the bullet goes full diameter, not counting the boattail, to get true bullet travel distance to bullet exit.
Or so I have been told...