Per ASME 16.5 (2003) Annex F, the software calculates bolt lengths for stud bolts and machine bolts as:
Stud Bolt Length = 2 × (F + W + FT + RF + E + N) + G + R + nt
Machine Bolt Length = 2 × (F + FT + RF) + W + E + N + G + R + p + nt
where:
F = Flange thickness specified in the Bolted End Data rule
FT = Tolerance for flange thickness specified in the Bolted End Data rule
W = Washer thickness specified in the Washer Part Data Sheet rule
G = Gasket thickness specified in the Gasket Part Data Sheet rule
RF = Raised face projection specified in the Bolted End Data rule
E = Bolt extension specified in the Bolt Extension rule
R = Total height of facings or depth of ring joint groove for both faces (flange face
projection or groove depth)
N = Heavy nut height (equals nominal bolt diameter) or nut height specified in Nut Part Data Sheet
nt = Negative tolerance on the bolt length from Cap Screw Length Calculation Tolerance, Machine Bolt Length Calculation Tolerance, Stud Bolt Length Calculation Tolerance, or Tap End Stud Bolt Calculation Tolerance Rule.
p = Allowance for the height of the point of the machine bolt (= 1.5 × thread pitch)