Pipe Ref
Units

Design calculators

Quick checks for everyday layout work. Inputs are in mm, bar and °C; results show both unit systems where useful.

Calculation verification

Every result on this page can be checked by hand. For each calculator: the inputs, the formula, a worked example with real numbers, the units, the standard it comes from, and what it does not cover. Worked examples checked against the calculator output on 17 Nov 2026.

Pipe wall thicknessASME B31.3 Eq. (3a)

Input parameters

ParameterSymbolUnitSource
Nominal pipe sizeNPS → DmmOutside diameter from ASME B36.10M / B36.19M
Design pressurePbar(g), used as MPa (÷ 10)Your design basis
Allowable stressSMPaB31.3 Table A-1M, for your material, grade and design temperature (entered by you)
Quality factorE–B31.3 Table A-1B
Weld strength reduction factorW–B31.3 para. 302.3.5
CoefficientY–B31.3 Table 304.1.1 (0.4 for ferritic steel below 482 °C)
Corrosion + thread allowancecmmPiping class
Mill under-tolerancem%Pipe specification (12.5% typical for seamless)

Formula used

t  = P · D / [ 2 (S · E · W + P · Y) ]        pressure design thickness, Eq. (3a)
tm = t + c                                     minimum required thickness
tn = tm / (1 − m/100)                          minimum nominal wall
Pick the lightest listed schedule with wall ≥ tn.  Valid only while t < D/6.

Worked example

NPS 6 carbon steel pipe, ASTM A106 Gr B seamless, design 40 bar(g) at 200 °C, corrosion allowance 1.5 mm, mill tolerance 12.5%.

  1. Inputs: D = 168.3 mm (B36.10M); P = 40 bar = 4.0 MPa
  2. S = 138 MPa (20.0 ksi): B31.3 Table A-1 basic allowable stress for A106 Gr B, constant up to 204 °C (400 °F). Confirm in your edition.
  3. E = 1.00 (seamless, Table A-1B); W = 1.00 (no longitudinal weld, below creep range); Y = 0.4 (ferritic steel below 482 °C, Table 304.1.1)
  4. t = 4.0 × 168.3 / [2 × (138 × 1.0 × 1.0 + 4.0 × 0.4)] = 673.1 / 279.2 = 2.41 mm
  5. tm = 2.41 + 1.5 = 3.91 mm
  6. tn = 3.91 / (1 − 0.125) = 4.47 mm
  7. D/6 = 28.0 mm, so t < D/6 and Eq. (3a) applies
  8. Lightest B36.10M wall listed for NPS 6 that is ≥ 4.47 mm: Sch STD / 40 = 7.11 mm

Result: Sch 40 (7.11 mm) passes; minimum nominal wall 4.47 mm.

Units

  • Pressure entered in bar(g); 1 bar = 0.1 MPa
  • Stress in MPa, lengths in mm
  • Wall shown in mm and inch

Standard or engineering basis

  • ASME B31.3 para. 304.1.2, Eq. (3a)
  • Pipe dimensions: ASME B36.10M (carbon and alloy steel), B36.19M (stainless)

Assumptions and limitations

  • Straight pipe under internal pressure only. Bends, branches, external pressure, and sustained, thermal or occasional loads are not checked.
  • No allowable stress is built in. S, E, W and Y must come from your governing code edition.
  • Not valid when t ≥ D/6 or P/(S·E) > 0.385; B31.3 then requires special consideration.
  • Above 482 °C, Y and W depend on the material; check them.
  • The piping class wall, not this result, is what you specify.
Flange class selectionASME B16.5 P–T ratings

Input parameters

ParameterSymbolUnitSource
Material group––B16.5 Table 1A: 1.1 carbon steel, 2.1 Type 304, 2.2 Type 316
Design temperatureT°CYour design basis
Design pressurePbar(g)Your design basis

Formula used

Rating at T, linear interpolation between the two listed temperatures T₁ and T₂:
p(T) = p₁ + (T − T₁) · (p₂ − p₁) / (T₂ − T₁)
Selected class = lowest class with p(T) ≥ P

Worked example

Group 1.1 (A105), T = 250 °C, P = 40 bar(g).

  1. 250 °C is a listed temperature in B16.5 Table 2-1.1, so no interpolation is needed
  2. Class 150: 12.1 bar(g) < 40, too low
  3. Class 300: 41.9 bar(g) ≥ 40, OK
  4. Interpolation check at 225 °C, Class 300: 43.8 + (225 − 200) × (41.9 − 43.8) / (250 − 200) = 42.9 bar(g)

Result: Class 300 (41.9 bar(g) at 250 °C).

Units

  • bar(g) and psig (1 bar = 14.5038 psi)
  • °C and °F

Standard or engineering basis

  • ASME B16.5 Table 2-1.1 (Group 1.1, metric). Groups 2.1 and 2.2 are interpolated in the °F tables and converted to bar.
  • B16.5 allows linear interpolation between listed temperatures.

Assumptions and limitations

  • Only Material Groups 1.1, 2.1 and 2.2 are included.
  • The flange rating is not the joint rating: gasket, bolting and the pipe must also be adequate.
  • NPS 26 and above (ASME B16.47) are not covered.
  • Hydrotest pressure and short-term variations are not checked.
Elbow take-offBend geometry, ASME B16.9 radii

Input parameters

ParameterSymbolUnitSource
Nominal pipe sizeNPS → OD, RmmB36.10M OD; B16.9 bend radius
Bend angleθdegreesRouting
Radius typeR–LR = 1.5D, SR = 1D, 3D, 5D

Formula used

Take-off (centre to end):  A = R · tan(θ / 2)
Centreline arc = R · θ        (θ in radians)
Outer arc = (R + OD/2) · θ;   inner arc = (R − OD/2) · θ

Worked example

NPS 4 long-radius elbow, θ = 60°.

  1. R = 152.4 mm (6 in, B16.9 LR); OD = 114.3 mm; θ = 60° = 1.0472 rad
  2. A = 152.4 × tan 30° = 152.4 × 0.5774 = 88.0 mm
  3. Centreline arc = 152.4 × 1.0472 = 159.6 mm
  4. Outer arc = (152.4 + 57.15) × 1.0472 = 219.4 mm
  5. Inner arc = (152.4 − 57.15) × 1.0472 = 99.7 mm

Result: Take-off 88.0 mm (3.46 in).

Units

  • mm and inch
  • Angle in degrees

Standard or engineering basis

  • ASME B16.9 centre-to-end dimensions and bend radii
  • Plane geometry

Assumptions and limitations

  • Weld root gaps are not included.
  • 5D radius is taken as 5 × NPS (nominal), not 5 × actual OD.
  • Cut elbows lose the B16.9 tangent and may need bevel preparation and NDE per your piping class.
Rolling offsetOffset geometry with LR elbows

Input parameters

ParameterSymbolUnitSource
Set (vertical offset)SmmLayout
Roll (horizontal offset)RommLayout
Fitting angleθdegrees45°, 60°, 30°, 22.5° or 90°
Nominal pipe sizeNPS → RmmB16.9 LR radius

Formula used

True offset O = √(S² + Ro²)
Travel T = O / sin θ;   run = O / tan θ
Elbow take-off A = R · tan(θ / 2)
Pipe cut length = T − 2A;   roll angle = atan(Ro / S)

Worked example

Set 600 mm, roll 450 mm, 45° LR elbows, NPS 4.

  1. O = √(600² + 450²) = 750.0 mm
  2. T = 750.0 / sin 45° = 750.0 / 0.7071 = 1060.7 mm
  3. Run = 750.0 / tan 45° = 750.0 mm
  4. A = 152.4 × tan 22.5° = 152.4 × 0.4142 = 63.1 mm
  5. Cut length = 1060.7 − 2 × 63.1 = 934.4 mm
  6. Roll angle = atan(450 / 600) = 36.9° from vertical

Result: Travel 1060.7 mm; pipe cut length 934.4 mm.

Units

  • mm and inch
  • Angles in degrees

Standard or engineering basis

  • Right-angle trigonometry
  • ASME B16.9 LR elbow radius (1.5 × NPS)

Assumptions and limitations

  • Both fittings have the same angle and are long radius.
  • Weld gaps are not deducted from the cut length.
  • With 90° fittings the run is zero and only the true offset is given.
Pipe slopeSlope geometry

Input parameters

ParameterSymbolUnitSource
Horizontal lengthLmmLayout
Slopes1:N, %, mm/m or degreesProcess / project requirement
Start elevationEL₁mmLayout
End elevationEL₂mmLayout (when solving for slope or length)

Formula used

s = 1/N  or  %/100  or  (mm per m)/1000  or  tan(angle)
Drop H = L · s;   EL₂ = EL₁ − H
Slope s = (EL₁ − EL₂) / L;   length L = H / s
True (sloped) length = √(L² + H²)

Worked example

12 000 mm run at 1:100, starting at EL 105 000.

  1. s = 1/100 = 0.010
  2. H = 12 000 × 0.010 = 120.0 mm
  3. EL₂ = 105 000 − 120.0 = 104 880.0
  4. True length = √(12 000² + 120²) = 12 000.6 mm
  5. Angle = atan(0.010) = 0.573°; 1.000 %; 10.00 mm/m

Result: Drop 120.0 mm; end EL 104 880.0.

Units

  • Lengths and elevations in mm
  • Slope as 1:N, %, mm/m and degrees

Standard or engineering basis

  • Plane geometry

Assumptions and limitations

  • Straight run only.
  • Sag between supports and support tolerances are not included; check the minimum slope your project sets for drains, flare and gravity lines.
Bolt lengthASME B16.5 flange and bolting data

Input parameters

ParameterSymbolUnitSource
Bolt type––Stud + 2 nuts, machine bolt, tap-end, wafer, tensioning
NPS and class→ tf, d, nmm / inASME B16.5 flange thickness, bolt size and count
Gasket thickness × numbertg · ngmmGasket standard
Item between flangeswmmWafer valve, blind, orifice
Thread engagement (tap-end)e · dmm1.0 d steel, 1.5 d cast iron
Projection past nutkthreadsProject standard (3 typical)
Rounding–mm or inPurchase increment

Formula used

Stud bolt:  L = 2·tf + 2·RF + ng·tg + w + 2·Hnut + 2·k·p
Hnut = d (heavy hex);  p = 25.4 / TPI;  RF = 6.4 mm for Class 400 and up, 0 below
Machine bolt: one nut and one projection; tap-end: one flange + engagement e·d
Tensioning: + 1·d at one end.  Round L up to the chosen increment.

Worked example

NPS 4 Class 300, stud bolts, spiral wound gasket 4.5 mm, 3 threads past each nut, round up to 5 mm.

  1. B16.5: tf = 1.19 in = 30.2 mm (includes the 1.6 mm raised face); 8 bolts, d = 3/4 in = 19.05 mm, 10 TPI → p = 2.54 mm
  2. Flanges 2 × 30.2 = 60.5 mm
  3. Gasket 4.5 mm
  4. Nuts 2 × 19.05 = 38.1 mm
  5. Projection 2 × 3 × 2.54 = 15.2 mm
  6. L = 60.5 + 4.5 + 38.1 + 15.2 = 118.3 mm → rounded up to 120 mm

Result: 8 × 3/4″-10 UNC × 120 mm stud bolts.

Units

  • mm, with inch equivalents
  • Thread pitch in mm and TPI

Standard or engineering basis

  • ASME B16.5 flange thickness and bolting tables
  • Heavy hex nut height ≈ d (ASME B18.2.2)
  • Thread series ASME B1.1: UNC up to 1 in, 8UN above

Assumptions and limitations

  • Nut height is taken as d, slightly more than the actual heavy hex nut, so the length is a little conservative.
  • Washers, RTJ ring gaps, lens rings and spacers are not included unless entered as an item between flanges.
  • The tensioning allowance is a typical 1 × d; use the tool maker's value.
  • Where your project or vendor has a stud length table, that table governs.
Line spacing on a rackPipe OD and B16.5 flange OD

Input parameters

ParameterSymbolUnitSource
Line A and B: NPS→ ODmmASME B36.10M
Line A and B: flange class→ FmmASME B16.5 flange OD
Insulation thicknessinsmmInsulation specification
ClearanceclmmProject standard (25 mm typical)

Formula used

c1 = F_A/2 + OD_B/2 + ins_B + cl        flange A next to line B
c2 = F_B/2 + OD_A/2 + ins_A + cl        flange B next to line A
c3 = OD_A/2 + ins_A + OD_B/2 + ins_B + cl   pipe next to pipe
C–C = max(c1, c2, c3)

Worked example

Line A: NPS 6 Class 300, 50 mm insulation. Line B: NPS 4 Class 150, bare. Clearance 25 mm.

  1. OD_A = 168.3 mm; F_A = 12.5 in = 317.5 mm; OD_B = 114.3 mm; F_B = 9.0 in = 228.6 mm
  2. c1 = 158.8 + 57.2 + 0 + 25 = 240.9 mm
  3. c2 = 114.3 + 84.1 + 50 + 25 = 273.4 mm
  4. c3 = 84.1 + 50 + 57.2 + 0 + 25 = 216.3 mm
  5. C–C = 273.4 mm, governed by flange B next to insulated line A

Result: 273 mm C–C; round up to your rack module.

Units

  • mm and inch

Standard or engineering basis

  • Pipe OD: ASME B36.10M
  • Flange OD: ASME B16.5

Assumptions and limitations

  • Flanges are staggered: a flange never sits next to the other line's flange.
  • Flanges are bare; add the box size if flanges are insulated.
  • Shoes, guides, thermal movement and future lines are not included.
  • NPS 26 and above (B16.47 flanges) are not covered here.
Unit converterExact conversion factors

Input parameters

ParameterSymbolUnitSource
Valuex–Your number
From unit–inch, mm, ft, m, bar, psi, MPa, kg/cm², °C, °F–

Formula used

1 in = 25.4 mm (exact);  1 ft = 304.8 mm
1 bar = 14.5038 psi = 0.1 MPa = 100 kPa;  1 kg/cm² = 0.980665 bar
°F = °C × 9/5 + 32;  K = °C + 273.15

Worked example

150 psi and 250 °C.

  1. 150 / 14.5038 = 10.342 bar
  2. 10.342 / 10 = 1.0342 MPa; 10.342 / 0.980665 = 10.546 kg/cm²
  3. 250 × 9/5 + 32 = 482 °F

Result: 150 psi = 10.342 bar; 250 °C = 482 °F.

Units

  • As listed

Standard or engineering basis

  • ISO 80000 / NIST SP 811 definitions

Assumptions and limitations

  • Gauge and absolute pressure are not converted into each other; add about 1.013 bar for absolute.
  • kg/cm² is the technical atmosphere (at), not standard atmospheres.