Piping Specification & Component Calculator

AIENGINEAR CALCULATOR · PIPING ENGINEERING

Updated 22 October 2026 · Calculator v3.0.0 · Standards status checked October 2026 (ASME B31.3-2024, B16.5-2025, B16.9-2024, B36.10-2022) · By Muhammad Raza

Quick answer: how do you work out a pipe specification?

Start from the nominal pipe size, which fixes the outside diameter. Pick a material and read its allowable stress S at the design temperature, then apply the ASME B31.3 thickness equation t = P·D / [2(S·E·W + P·Y)] and add corrosion and mechanical allowance to get tm = t + c. Choose the lightest schedule whose wall, after the 12.5 % mill under-tolerance, still covers tm. Then check that the flange class holds the pressure at temperature, that the line velocity and pressure drop are sensible, that branches are reinforced and that supports and thermal growth are handled. The calculator below does every one of those steps on one screen and prints the result as a branded engineering report.

Key takeaways

  • For any NPS the outside diameter never changes with schedule; only the wall and the bore do. NPS 6 is always 168.3 mm OD.
  • Compare the required thickness with the wall left after mill tolerance (nominal × 0.875 for most pipe specifications), never with the nominal wall.
  • Allowable stress drops with temperature. A106 Grade B keeps its full 137.9 MPa only up to about 204 °C and is close to 89 MPa at 400 °C, which raises the required wall by roughly half.
  • A flange class is not a pressure. Class 300 carbon steel flanges hold 51.1 bar at 38 °C but only 43.8 bar at 200 °C and 34.7 bar at 400 °C.
  • ASME B31.3-2024 is the current edition, and MSS SP-58-2018 has replaced MSS SP-69 for pipe support selection. Older references still circulate widely.
  • Everything here runs in your browser. Nothing you type is sent to a server or stored anywhere except your own device.

Everything runs in your browser; no inputs leave your device. Open the calculator full screen for long sessions, saved cases and the printable engineering report.

How to use the calculator

The tool is organised as eleven tabs that share one set of inputs. Change the pipe size on any tab and every other result, the live panel on the right and the warnings all update together, so you can move from wall thickness to flange rating to line sizing without retyping anything.

  1. Choose units. SI (MPa, °C, mm), metric with bar(g), or US customary (psi, °F, inches). Inputs and outputs switch together; the engine always works internally in SI, so changing units never changes a result.
  2. Define the pipe. On Pipe Data, pick NPS, dimensional standard and schedule, then the material. Picking a stainless or duplex grade switches the schedule list to the B36.19 S series automatically.
  3. Enter the design case on Wall Thickness B31.3: design pressure and temperature, corrosion allowance, mill tolerance and the pipe manufacturing route. The route sets the joint quality factor E; the weld strength reduction factor W is applied automatically from the temperature unless you switch it to manual.
  4. Override the allowable stress for final design. The built-in S(T) tables are representative. When you have the project code book open, type the exact Table A-1 value into the override box and the whole tool recalculates with it.
  5. Read the verdict, then the margins. Wall adequacy, MAWP, hydrotest pressure and the flange P-T rating appear together. The live panel turns amber or red and lists the reason whenever a check is outside its limit.
  6. Work through the other tabs as the design needs them: flow and line sizing, thermal growth, support spans, branch reinforcement, bolting, fitting take-offs, material screening and schedule comparison.
  7. Record and share. Add a project name and line number, save the case, and use Engineering report for a printable, Aienginear-branded calculation sheet with prepared, checked and approved fields. CSV, Excel and JSON exports carry the same data.

Practical tip

Open the Formulas & Self-test tab once after the page loads. It runs seventeen checks against independently derived values, from the NPS 6 bore to the Colebrook residual and the flange rating interpolation. If any of them ever showed a failure, the browser has mis-loaded the script and the numbers should not be used.

What a piping specification contains

A piping specification, often called a piping class or line class, is the short document that tells a designer and a fabricator exactly which components may be used on a line. Every line on a P&ID carries a class code, and that code points to a sheet listing the pressure and temperature envelope, the base material, the corrosion allowance, and the permitted pipe, fittings, flanges, gaskets, bolting, valves and branch connections, size by size. The point of the class is that nobody has to redesign the pressure boundary for every line: the sheet has already done it for the worst case in its envelope.

Building or checking a class means repeating the same handful of calculations across a range of sizes. You need the wall for each NPS at the design condition, the flange rating that covers it, the hydrotest pressure, the branch table, and a feel for weights, spans and thermal movement. That is the job this calculator is organised around. Each tab corresponds to one column or decision on a typical class sheet.

Aienginear Table 1

What a typical piping class sheet defines

The decisions a line class fixes, and where each one is calculated

Powered by Aienginear
Class itemWhat it fixesGoverning documentCalculator tab
Design envelopeMaximum pressure at each temperature, minimum design metal temperatureProject design basis, ASME B31.3-2024Wall Thickness
Base materialPipe, fitting and flange material gradesASTM / ASME material specificationsMaterials
Corrosion allowanceExtra wall for lifetime metal loss, usually 0, 1.5, 3 or 6 mmCorrosion study, client standardWall Thickness
Pipe wall by sizeSchedule or wall for every NPS in the classB31.3 304.1.2, B36.10 / B36.19Wall Thickness, Schedule Compare
Flange rating and facingClass 150 to 2500, RF or RTJASME B16.5-2025 / B16.47-2020Wall Thickness (rating), Flange Bolting
FittingsButtweld below or above a break size, socket weld or threaded for small boreASME B16.9-2024, B16.11Fittings
Branch tableTee, reinforced stub-in or integrally reinforced outlet for each run and branch sizeB31.3 304.3, MSS SP-97Branch Reinf.
Gaskets and boltingGasket type, bolt and nut gradesASME B16.20, B16.21, ASTM A193 / A194Flange Bolting
Test requirementsHydrostatic or pneumatic test pressureB31.3 345Wall Thickness (test)
Typical content; individual operators structure their class sheets differently.aienginear.com/piping-specification-component-calculator/

Pipe sizes, NPS and DN

Nominal pipe size is a label, not a measurement. From NPS 1/8 to NPS 12 the number is only loosely related to the bore, which is why NPS 6 has an outside diameter of 168.3 mm rather than 152.4 mm. From NPS 14 upward the NPS equals the outside diameter in inches, so NPS 14 is 355.6 mm OD. DN is the metric designation used in ISO and EN documents; for most sizes it is roughly 25 times the NPS (DN 150 for NPS 6), with a few exceptions such as DN 15 for NPS 1/2 and DN 65 for NPS 2 1/2.

What matters for design is that the outside diameter is fixed by the size and stays the same for every schedule. That is what lets one set of fittings, flanges and supports serve a whole range of wall thicknesses. The bore is what changes, and the bore is what you need for flow, volume and velocity.

Aienginear Table 2

Carbon steel pipe: OD, wall, bore and mass for Schedule 40 and 80

Common sizes NPS 1/2 to NPS 24; mass for steel at 7850 kg/m3, empty

Powered by Aienginear
NPSDNOD (mm)Sch 40 wall (mm)Sch 40 ID (mm)Sch 40 mass (kg/m)Sch 80 wall (mm)Sch 80 ID (mm)Sch 80 mass (kg/m)
NPS 1/21521.302.7715.761.273.7313.841.62
NPS 3/42026.702.8720.961.693.9118.882.20
NPS 12533.403.3826.642.504.5524.303.24
NPS 1 1/24048.303.6840.944.055.0838.145.41
NPS 25060.303.9152.485.445.5449.227.48
NPS 38088.905.4977.9211.297.6273.6615.27
NPS 4100114.306.02102.2616.088.5697.1822.32
NPS 6150168.307.11154.0828.2610.97146.3642.56
NPS 8200219.108.18202.7442.5512.70193.7064.64
NPS 10250273.109.27254.5660.3115.09242.9296.02
NPS 12300323.9010.31303.2879.7317.48288.94132.09
NPS 14350355.6011.13333.3494.5519.05317.50158.11
NPS 16400406.4012.70381.00123.3121.44363.52203.54
NPS 18450457.2014.27428.66155.8823.83409.54254.68
NPS 20500508.0015.09477.82183.4326.19455.62311.19
NPS 24600609.6017.48574.64255.2530.96547.68441.80
Dimensions per ASME B36.10-2022; ID and mass calculated by Aienginearaienginear.com/piping-specification-component-calculator/

Schedules, STD, XS and the S series

A schedule number is a wall-thickness designation. The numbers 10 to 160 come from ASME B36.10 for carbon and alloy steel. Alongside them sit the older weight classes STD (standard), XS (extra strong) and XXS (double extra strong). They coincide with schedule numbers only over part of the range: STD equals Schedule 40 up to NPS 10, and XS equals Schedule 80 up to NPS 8. Above those sizes STD stays at 9.53 mm and XS at 12.70 mm while Schedule 40 and 80 keep growing. Specifying “Sch 40” for an NPS 16 line when you meant “STD” buys 12.70 mm of wall instead of 9.53 mm, about a third more steel.

Stainless pipe is normally bought to ASME B36.19 in schedules 5S, 10S, 40S and 80S. Most S walls match the carbon steel numbers, but not all, and the differences catch people out on material take-offs and on pressure checks.

Aienginear Table 3

Where the stainless S series differs from the carbon steel schedules

Wall thickness in mm; the sizes where a like-named schedule gives a different wall

Powered by Aienginear
NPSSchedule (B36.10)Wall (mm)S schedule (B36.19)Wall (mm)Difference
108015.0980S12.70S wall 2.39 mm thinner
124010.3140S9.53S wall 0.78 mm thinner
128017.4880S12.70S wall 4.78 mm thinner
14106.3510S4.78S wall 1.57 mm thinner
16106.3510S4.78S wall 1.57 mm thinner
20106.3510S5.54S wall 0.81 mm thinner
14 to 244011.13 to 17.4840S9.5340S stays at STD wall
ASME B36.10-2022 and B36.19-2022 dimensional data, compiled by Aienginearaienginear.com/piping-specification-component-calculator/
NPS 6: one outside diameter, three wallsAienginear.comOD 168.3 mm is fixed by NPS 6 (ASME B36.10)Schedule 10wall 3.40 mm | ID 161.50 mmSchedule 40 (STD)wall 7.11 mm | ID 154.08 mmSchedule 80 (XS)wall 10.97 mm | ID 146.36 mmWalls drawn to scale. Heavier schedule = thicker wall, smaller bore, same fittings and flanges.
Figure 1. For NPS 6 the outside diameter is 168.3 mm for every schedule; only the wall and the bore change. Drawn by Aienginear.

Pipe weight and volume

Pipe mass per metre is the metal cross-section multiplied by density. For carbon steel with dimensions in millimetres the constant works out to 0.0246615, which gives the familiar shortcut:

w = 0.0246615 × t × (OD − t) kg/m (steel, 7850 kg/m³)

For NPS 6 Schedule 40 that is 0.0246615 × 7.11 × 161.19 = 28.26 kg/m. Stainless steel is about 1 % to 2 % heavier for the same dimensions because its density is 7930 to 8000 kg/m³, so a carbon steel weight table understates stainless spool weights slightly.

For supports and lifting you need the operating weight: pipe plus contents plus insulation. Contents per metre are the flow area times the fluid density, so water in the same NPS 6 line adds 18.65 kg/m and the operating weight becomes 46.91 kg/m. During a hydrotest every line is full of water whatever it normally carries, so gas lines should be checked for their hydrotest weight as well; the calculator reports both.

The weight tab also gives internal volume (for test water and chemical cleaning quantities), external surface area for painting and internal area for lining, together with spool and shipping weights. Fitting weights in those totals are estimates and are flagged as such.

B31.3 wall thickness

ASME B31.3 paragraph 304.1.2 gives the pressure design thickness of straight pipe under internal pressure. When the wall is thin relative to the diameter, which in practice means t is less than D/6, the code uses:

t = P D / [ 2 ( S E W + P Y ) ] tm = t + c

The form looks like the textbook hoop-stress equation with two corrections. The term P·Y in the denominator adjusts for the fact that the real stress distribution through a wall is not uniform, and Y rises at high temperature in the creep range to reflect stress redistribution. The product S·E·W reduces the allowable stress for longitudinal weld quality (E) and for weld strength loss at elevated temperature (W).

The minimum required thickness tm adds c, which covers corrosion and erosion allowance plus any mechanical allowance such as thread depth or groove depth. The final check is the one that most often goes wrong in hand calculations: pipe is supplied with a mill under-tolerance, usually 12.5 % for ASTM A106, A53, A333 and A312, so the wall you can count on is the nominal wall times 0.875. The schedule is adequate only if that reduced wall is at least tm.

How the wall is spent: NPS 6 Sch 40, A106 B, 4 MPa at 200 °C, c = 3 mmAienginear.comPurchasednominalnominal wall 7.11 mmDeliveredafter 12.5 % mill tol.6.22 mm guaranteed0.89Usedpressure + allowancet = 2.41c = 3.000.81tₘ = 5.41 mmUtilisation tₘ / guaranteed wall = 87 %. Green = margin left for future corrosion; grey = mill under-tolerance you cannot count on.
Figure 2. The purchased wall is reduced by mill tolerance before it is compared with the required thickness t plus allowance c. Drawn by Aienginear.

Two limits are built into the calculator. If t reaches D/6, or if P/(S·E) exceeds 0.385, the thin-wall equation is no longer valid and B31.3 304.1.2(b) calls for special consideration of the actual stress state and fatigue; the tool flags this rather than returning a misleading number. Thermoplastic pipe follows Chapter VII instead, with t = P·D / (2S + P) and S taken as the hydrostatic design stress at temperature.

Aienginear Table 4

Symbols in the B31.3 wall-thickness check

Every term, its unit and where its value comes from

Powered by Aienginear
SymbolMeaningUnitSource and typical value
PInternal design pressure, gaugeMPaDesign basis; the most severe coincident pressure and temperature
DOutside diametermmASME B36.10 / B36.19 (fixed by NPS)
SBasic allowable stress at design temperatureMPaB31.3 Table A-1; 137.9 MPa for A106 B up to about 204 °C
ELongitudinal joint quality factor–Table A-1B: 1.00 seamless, 0.85 ERW, 0.80 single-butt EFW
WWeld joint strength reduction factor–Table 302.3.5: 1.0 below the creep range, lower above it
YTemperature coefficient–Table 304.1.1: 0.4 for most metals below 482 °C
cCorrosion, erosion and mechanical allowancemmProject corrosion study; often 1.5 or 3 mm for carbon steel
tPressure design thicknessmmCalculated
tmMinimum required thickness, t + cmmCalculated
TNominal wallmmSchedule, B36.10 / B36.19
T × 0.875Guaranteed wall after 12.5 % under-tolerancemmMust be at least tm
Symbols follow ASME B31.3-2024 para 304.1; compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Allowable stress, E, W and Y

Allowable stress S is the single biggest lever in the wall-thickness equation, and it is temperature dependent. For carbon steels it is flat up to around 200 °C and then falls steadily; for austenitic stainless it falls from room temperature but holds up much longer at high temperature, which is why stainless and Cr-Mo steels take over above about 425 °C. The calculator interpolates a representative S(T) curve for each material so that a temperature change shows its real effect immediately. For final design, enter the exact Table A-1 value from your copy of the code into the override field.

Aienginear Table 5

How allowable stress falls with temperature

Representative basic allowable stress S in MPa, for screening; confirm values in ASME B31.3-2024 Table A-1

Powered by Aienginear
Material38 °C150 °C260 °C343 °C400 °C454 °C538 °C
A106 Gr. B, A53 Gr. B (carbon steel)137.9137.9130.3117.289.0––
A335 P11 (1.25Cr-0.5Mo)137.9124.1118.6112.4106.199.343.4
A335 P22 (2.25Cr-1Mo)137.9124.1123.4123.4123.4108.355.2
A312 TP304 (conservative line)137.9103.488.982.779.375.871.7
A312 TP316 (conservative line)137.9107.691.784.882.080.077.9
A790 2205 duplex206.8199.3187.5– (max 316 °C)–––
Representative values used by the Aienginear calculator; not a substitute for the code tableaienginear.com/piping-specification-component-calculator/

Quality factor E recognises that a longitudinal weld is not as reliable as seamless metal unless it is fully examined. Seamless pipe takes 1.00, electric-resistance-welded pipe 0.85 and single-butt electric-fusion-welded pipe 0.80; full radiography of the seam can raise a welded pipe to 1.00 where the material specification allows it. The calculator sets E from the manufacturing route you choose, and you can edit it to match the exact Table A-1B entry.

Weld joint strength reduction factor W applies to longitudinal and spiral welds at temperatures where creep governs. Below that threshold W = 1.0. Above it the factor falls; for Cr-Mo steels it reaches about 0.82 at 538 °C and 0.64 at 649 °C. Seamless pipe takes W = 1.0 at any temperature because it has no longitudinal weld.

Coefficient Y is 0.4 for ferritic steels up to 482 °C, rising to 0.5 at 510 °C and 0.7 from 538 °C. For austenitic steels it stays at 0.4 up to 566 °C, then reaches 0.5 at 593 °C and 0.7 at 621 °C. B31.3 permits linear interpolation between the listed temperatures, and the calculator does so.

What changed in the current standards

Piping references age quietly. Many calculators and spreadsheets still cite MSS SP-69 or B31.3 editions from a decade ago. Version 3 of this calculator and this article were checked against the editions current in October 2026.

Edition status and changes that matter for a line class

  • ASME B31.3-2024 is the current edition of Process Piping. The pressure design equations in 304.1.2 and the area-replacement rules in 304.3.3 are unchanged. Changes worth knowing: default sustained stress indices in 320.1 now come from ASME B31J rather than fixed values; 335.2.2 states that bolt stress during tightening is not limited to the allowable stress; 345.2.3 now lets any leak-tested mechanical joint be disassembled and reassembled without a new leak test; Table 326.1 adds press-connect fittings (ASME B16.51, ASTM F3226) and API 623 globe valves; and F323.2.2 recommends extra material requirements for A105 Class 150 and 300 weld neck flanges below −18 °C.
  • ASME B16.5-2025 replaces the 2020 edition for flanges NPS 1/2 to 24. Large flanges remain in ASME B16.47-2020 (Series A and B, NPS 26 to 60).
  • ASME B16.9-2024 is the current edition for factory-made buttwelding fittings.
  • ASME B36.10-2022 and B36.19-2022 are the current pipe dimension standards. ASME dropped the “M” suffix from the titles, so documents may cite either B36.10M or B36.10; the dimensions used here are unchanged.
  • MSS SP-58-2018 consolidated the former SP-69, SP-77, SP-89 and SP-90. New specifications should reference SP-58 for hanger selection and spans rather than SP-69.
  • ASME PCC-1-2022 remains the current guidance for bolted flange joint assembly, including target bolt stress selection and tightening patterns.

Hydrotest and pneumatic test pressure

B31.3 345.4.2 sets the minimum hydrostatic leak test pressure at 1.5 times the design pressure, multiplied by the ratio of the allowable stress at test temperature to the allowable stress at design temperature:

PT = 1.5 × P × (ST / S) with ST/S not more than 6.5

The stress ratio is what makes high-temperature lines test at well above 1.5P. An A106 B line designed for 4 MPa at 400 °C has ST/S = 137.9 / 89.0 = 1.55, so the test pressure is about 9.3 MPa rather than 6.0 MPa. The code then caps the test so that it does not take the pipe past yield: if the ratio-corrected pressure would produce a nominal stress above yield at test temperature, the test pressure is reduced to the pressure that just reaches yield. The calculator checks this with the guaranteed wall after mill tolerance and reports the lower value.

Two practical limits sit outside the pipe equation. Flanged components in the test loop are limited by their own shell test (1.5 times the 38 °C rating for B16.5 flanges), and valves, instruments and equipment may need to be isolated or removed. When water cannot be used, B31.3 345.5.4 allows a pneumatic test at 1.1 times design pressure, but the stored energy in compressed gas is many times that of water at the same pressure, so pneumatic testing needs a documented safety review and exclusion zone.

Flange class and P-T rating

An ASME B16.5 class number is not a pressure. Each class carries a pressure-temperature table for each material group, and the allowable working pressure drops as temperature rises. A design is acceptable only if the design pressure is at or below the rating at the design temperature. The calculator interpolates the Group 1.1 table, which covers A105 forgings and A216 WCB castings, the usual carbon steel flange materials.

Aienginear Table 6

ASME B16.5 Group 1.1 flange ratings at selected temperatures

Maximum working pressure in bar(g) for A105 / WCB flanges; representative values, verify against ASME B16.5-2025

Powered by Aienginear
Class38 °C100 °C200 °C300 °C400 °C450 °C538 °C
15019.617.713.810.26.54.61.4
30051.146.643.839.834.723.05.9
600102.193.287.679.669.446.011.8
900153.2139.8131.4119.5104.269.017.7
1500255.3233.0219.0199.1173.6115.029.5
2500425.5388.3365.0331.8289.3191.749.2
Compiled by Aienginear for screening; ratings for stainless and Cr-Mo groups differaienginear.com/piping-specification-component-calculator/

Two habits avoid most rating errors. First, read the rating at the design temperature, not ambient; a Class 150 carbon steel system designed for 15 bar is within its rating at 100 °C (17.7 bar) but exceeds it at 200 °C (13.8 bar). Second, match the material group: a 316 stainless flange is Group 2.2 and has noticeably lower ratings than A105 at most temperatures, so the Group 1.1 check in the tool is flagged as not applicable when you select a stainless or alloy pipe.

Velocity and pressure drop

For liquids and for gases with modest pressure loss, the Darcy-Weisbach equation gives the frictional pressure drop, with the friction factor from the Colebrook-White equation for turbulent flow and 64/Re for laminar flow:

Re = ρ V D / μ 1/√f = −2 log10[ ε/(3.7D) + 2.51/(Re √f) ]
Δp = f (L/D) ρV²/2 + ΣK ρV²/2 + ρ g Δz

The calculator solves Colebrook iteratively from a Swamee-Jain starting value, adds fitting losses as a sum of K coefficients and includes static head from elevation change. It also flags two common traps: Reynolds numbers in the transitional band between 2300 and 4000, where any friction factor is uncertain, and gas lines where friction loss exceeds about 10 % of inlet absolute pressure, where the incompressible method stops being reliable.

The most useful feature for line sizing is the table that runs the same flow through every pipe size at the selected schedule, so you can see at a glance which sizes fall inside the velocity band.

Aienginear Table 7

Typical design velocity ranges for process lines

Starting points for line sizing; project and client criteria take precedence

Powered by Aienginear
ServiceTypical velocity (m/s)Main concern
Pump suction, clean liquid0.6 to 1.5NPSH margin, vapour release
Pump discharge, clean liquid1.5 to 3.0Pressure drop and pump power
Gravity drains, slurry minimum0.9 to 1.2 minimumSolids settling
Cooling water, large headers1.5 to 2.5Erosion of fittings, water hammer
Gas and vapour, general10 to 25Noise, pressure drop
Saturated steam15 to 35Erosion from condensate droplets, noise
Superheated steam25 to 50Pressure drop, noise
Two-phase or erosive servicebelow API RP 14E erosional velocityErosion-corrosion
Aienginear engineering guidance compiled from common industry practiceaienginear.com/piping-specification-component-calculator/

Aienginear Table 8

Absolute roughness values used for friction factor

Equivalent sand-grain roughness ε in mm

Powered by Aienginear
Pipe conditionε (mm)Comment
Drawn tubing, copper, PVC, HDPE0.0015Hydraulically smooth in most service
Stainless steel0.015New, pickled
Commercial carbon steel, new0.045The usual design value
Carbon steel, moderate rust0.15Typical of older utility lines
Galvanised steel0.15Zinc coating roughens the bore
Cast iron0.26Unlined
Carbon steel, heavy scale or tubercles0.9Old water mains, untreated cooling water
Compiled by Aienginear from widely used engineering referencesaienginear.com/piping-specification-component-calculator/

Thermal expansion and flexibility

A straight run grows by ΔL = αL(T − Ti), where α is the mean coefficient of expansion between the installation temperature Ti and the operating temperature T. Carbon steel is roughly 12 µm per metre per kelvin, austenitic stainless about 17. A hundred metres of carbon steel heated from 20 to 200 °C therefore grows about 218 mm. If that run were anchored at both ends, the restrained force would be E·A·α·ΔT, about 1600 kN for NPS 6 Schedule 40 over that temperature rise, far beyond what any nozzle or anchor can take.

The movement is absorbed by changes of direction, offsets or loops. B31.3 judges the result against the allowable displacement stress range:

SA = f (1.25 Sc + 0.25 Sh) f = 6.0 N−0.2 ≤ 1.0

where Sc and Sh are the allowable stresses at the cold and hot ends of the cycle and N is the number of full thermal cycles over the design life (f = 1.0 up to 7000 cycles). The calculator uses SA in the guided cantilever formula L = √(3EDΔL / SA) to estimate the length of perpendicular leg needed to absorb the growth. That is a screening figure for layout. Final flexibility checks use B31.3 para 319 with stress intensification factors from ASME B31J, which B31.3-2024 now references for its default values.

Thermal growth and the leg that absorbs itAienginear.comanchorsupports at the governing span (lesser of stress, deflection and MSS SP-58 limits)ΔLleg LΔL = α L (T – Tᵢ) Lₐ = √(3 E D ΔL / Sₐ) Sₐ = f (1.25 Sc + 0.25 Sₕ)Example: 100 m of NPS 6 carbon steel from 20 to 200 °C grows about 218 mm and needs a leg of roughly 10.4 m (screening only).Final routing, nozzle loads and support friction are confirmed by a B31.3 para 319 flexibility analysis.
Figure 3. A straight run grows away from its anchor; a perpendicular leg of sufficient length absorbs the movement in bending. Drawn by Aienginear.

Aienginear Table 9

Mean thermal expansion coefficients used by the calculator

Mean values for 20 °C to about 300 °C; confirm with ASME B31.3 Appendix C for the exact range

Powered by Aienginear
Materialα (µm/m·K)Growth of 100 m for 100 K (mm)
Carbon steel (A106, A53, A333, API 5L)12.1121
1.25Cr and 2.25Cr alloy steel12.8 to 13.0128 to 130
Austenitic stainless 304 / 31616.5 to 17.0165 to 170
Duplex 220513.5135
Copper17.1171
Aluminium 606123.6236
PVC54540
HDPE PE100about 180about 1800
Representative values compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Support spacing

Between supports a horizontal pipe behaves like a beam under its own operating weight. The span is limited by two things: the bending stress, and the sag, which must stay small enough for the line to drain and to avoid pockets. The calculator works out both limits and takes the smaller:

Lstress = √(10 Z Sb / w) Lsag = (384 E I δ / 5w)0.25

with Sb of about 15.9 MPa and a sag limit δ of 2.5 mm, the basis most published span tables use. It then compares the result with the suggested maximum spans in MSS SP-58-2018, which carried over the familiar SP-69 values, and recommends the lesser. For an NPS 6 Schedule 40 water line the beam calculation gives about 5.6 m and SP-58 suggests 5.2 m, so 5.2 m governs.

Aienginear Table 10

Suggested maximum spans for standard wall steel pipe

MSS SP-58-2018 basis, straight horizontal runs without concentrated loads; metres

Powered by Aienginear
NPSWater service (m)Gas, vapour or air (m)
12.12.7
1 1/22.73.7
23.04.0
33.74.6
44.35.2
65.26.4
85.87.3
106.77.9
127.09.1
168.210.7
209.111.9
249.812.8
Values as commonly tabulated from MSS SP-58 / former SP-69; compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Reduce spans wherever there is a concentrated load: valves, flanged joints, vertical risers, branch connections carrying heavy valves, and at changes of direction, where a support within about 600 mm of the elbow keeps the bend from carrying the whole overhang. Insulated and liquid-filled lines need the operating weight, not the empty weight, and lines that will be hydrotested full of water need a check at test weight as well.

Branch reinforcement

Cutting a hole in a run pipe removes metal that was carrying hoop stress. B31.3 304.3.3 requires that metal to be replaced within a reinforcement zone around the opening. The required area is A1 = th d1 (2 − sin β), essentially the pressure-required thickness of the run times the length of the opening. The available area is the sum of excess wall in the run (A2), excess wall in the branch (A3) and weld and pad metal (A4).

Area replacement at a welded branch (B31.3 304.3.3)Aienginear.comRun pipe wall Tₕ (minimum, after mill tolerance)A1 removedBranch, wall Tbreinforcement zoneA2A2A3A3A4 welds (and pad)2 d₂ (zone width, not more than run OD)L₄ = smaller of 2.5(Tₕ-c) and 2.5(Tb-c)+TᵣRule: A2 + A3 + A4 must be at least A1. If not, add a pad or use an integrally reinforced outlet.
Figure 4. The metal removed by the opening (A1) must be replaced by surplus run wall (A2), surplus branch wall (A3) and weld or pad metal (A4) inside the zone. Drawn by Aienginear.

Two details are easy to get wrong by hand and are handled automatically in the calculator. The run and branch walls used for A2 and A3 are the minimum walls after mill tolerance, not nominal. And the weld credit is limited to the size of fillet actually required, the smaller of 0.7 times the branch wall and 6 mm. Corrosion allowance hurts reinforcement twice, because it is subtracted from both the run and branch surplus. For example, an NPS 3 Schedule 40 stub-in on NPS 6 Schedule 40 at 4 MPa and 200 °C with 3 mm corrosion allowance needs 206 mm² but finds only 88 mm². A 6 mm thick, 150 mm diameter pad raises the available area to about 468 mm² and the connection passes. An integrally reinforced outlet to MSS SP-97 or a B16.9 reducing tee avoids the calculation entirely, because the manufacturer has already proved the design.

Flange bolting and gaskets

A flanged joint seals when the bolts squeeze the gasket hard enough to fill its imperfections and then keep it compressed once pressure tries to separate the flanges. ASME VIII-1 Mandatory Appendix 2 expresses these as two loads: the seating load Wm1 = πbGy and the operating load Wm2 = (π/4)G²P + 2πbGmP, where G is the gasket reaction diameter, b the effective seating width, and m and y the gasket factors. The bolts, preloaded to a chosen fraction of yield, must provide more than the larger of the two.

Torque is then estimated with the nut-factor relation T = K·d·F. ASME PCC-1-2022 recommends selecting a joint-specific target bolt stress, often in the range of 40 to 70 % of bolt yield, and tightening in a controlled multi-pass pattern. The calculator uses the B16.5 bolt count and size for the selected class and size, and the correct tensile stress areas for both UNC and 8-thread series bolts.

Aienginear Table 11

Gasket factors used for bolt load estimates

Gasket factor m and minimum seating stress y, ASME VIII-1 Appendix 2 basis

Powered by Aienginear
Gasket typemy (MPa)Typical use
Spiral wound, stainless with graphite filler3.068.9Most process flanges, Class 150 to 2500
Kammprofile (grooved metal with soft facing)3.069.0Heat exchangers, difficult joints
Compressed non-asbestos fibre, 1.6 mm2.7525.5Low-pressure utilities
Flexible graphite sheet2.020.7High temperature, chemical service
PTFE sheet2.011.0Corrosive chemicals, low temperature
Ring joint, soft iron5.5124.0Class 900 and above, RTJ facing
Representative values; use the gasket manufacturer data for final designaienginear.com/piping-specification-component-calculator/

Buttweld fitting dimensions

Centre-to-end dimensions are what isometric drafters and spool fabricators need for cut lengths. A long-radius 90° elbow has a bend radius of 1.5 times the NPS for NPS 2 and above, so its centre-to-end distance is 1.5 × NPS in inches; short-radius elbows use 1.0 × NPS. Tees, reducers and caps do not follow a single rule, which is why the calculator carries the tabulated B16.9 values and only falls back to a geometric rule outside its table. Weights for fittings and flanges in the tool are estimates and are marked EST.

Aienginear Table 12

Buttweld fitting centre-to-end dimensions

Selected sizes in mm; ASME B16.9 dimensional data

Powered by Aienginear
NPS90° LR elbow A45° LR elbow BEqual tee CReducer HCap E
13822385138
27635647638
311451868951
41526410510264
62299514314089
8305127178152102
10381159216178127
12457190254203152
16610254305356178
20762318381508229
24914381432508267
ASME B16.9-2024 dimensions compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Material selection

Material choice usually follows the temperature envelope first and the fluid second. Carbon steel covers most process service from about −29 °C to 425 °C. Below that it needs impact testing or a low-temperature grade; above it, Cr-Mo or stainless steels take over because carbon steel loses strength and becomes vulnerable to graphitisation. The fluid then decides whether corrosion, cracking or erosion pushes the choice toward stainless, duplex, lined or non-metallic pipe. The Materials tab gives a three-level screening rating and the main mechanism to watch for each combination; treat it as a prompt for a corrosion engineer, not a substitute for one.

Aienginear Table 13

Common pipe materials and their usual temperature envelope

Screening guidance; confirm limits in ASME B31.3-2024 and the project materials philosophy

Powered by Aienginear
MaterialSpecificationTypical rangeNotes
Carbon steelASTM A106 Gr. B, API 5L−29 to 425 °CDefault for hydrocarbons, steam, utilities
Low-temperature carbon steelASTM A333 Gr. 6−45 to 343 °CImpact tested; LPG, flare, cold service
1.25Cr-0.5MoASTM A335 P11up to about 593 °CSteam, hot hydrogen; PWHT required
2.25Cr-1MoASTM A335 P22up to about 649 °CHigh-temperature steam and furnace lines
Austenitic stainless 304 / 316ASTM A312−196 to over 800 °CCorrosive and cryogenic service; chloride SCC risk
Duplex 2205ASTM A790−51 to 316 °CChlorides and seawater (super-duplex for severe cases)
ThermoplasticsPVC, HDPE PE100about 0 to 60 °CWater and chemicals at low pressure; not for compressed gas
Compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Worked examples

Example 1: NPS 6 carbon steel at 4 MPa, 200 °C and then 400 °C

Seamless A106 Grade B, Schedule 40, design pressure 4 MPa, corrosion allowance 3 mm, 12.5 % mill tolerance, Class 300 flanges. At 200 °C the allowable stress is still the full 137.9 MPa and Y is 0.4:

t = 4 × 168.3 / [2 (137.9 × 1 × 1 + 4 × 0.4)] = 673.2 / 279.0 = 2.41 mm
tm = 2.41 + 3.00 = 5.41 mm guaranteed wall = 7.11 × 0.875 = 6.22 mm → adequate

Now raise the design temperature to 400 °C and keep everything else. The allowable stress falls to about 89.0 MPa, and three results change at once.

Aienginear Table 14

Example 1 results: the same line at 200 °C and 400 °C

NPS 6 Sch 40, A106 Gr. B seamless, P = 4 MPa, c = 3 mm, Class 300

Powered by Aienginear
Result200 °C400 °CWhat it means
Allowable stress S137.9 MPa89.0 MPaCarbon steel is in its falling range above about 204 °C
Pressure design thickness t2.41 mm3.71 mm54 % more wall needed for pressure
Required tm = t + c5.41 mm6.71 mmExceeds the 6.22 mm guaranteed Sch 40 wall at 400 °C
Wall check, Sch 40Adequate (87 %)Not adequate (108 %)Move to Sch 80: 10.97 × 0.875 = 9.60 mm
MAWP of Sch 40 wall5.36 MPa3.46 MPaBelow design pressure at 400 °C
Hydrotest PT6.00 MPa9.29 MPaST/S = 1.55 raises the test pressure
Class 300 rating43.8 bar34.7 barExceeded at 400 °C: Class 600 (69.4 bar) needed
Calculated with the Aienginear PipeSpec Pro calculator v3.0.0aienginear.com/piping-specification-component-calculator/

Example 2: sizing a 180 m³/h water line

Water at 20 °C, 100 m of new commercial steel pipe, Schedule 40, pump discharge service with a target of 1.5 to 3 m/s. The line-sizing table in the Flow tab narrows the choice to two sizes:

Aienginear Table 15

Example 2: NPS 6 versus NPS 8 for 180 m³/h of water

Schedule 40, 100 m, roughness 0.045 mm, friction loss only

Powered by Aienginear
SizeBore (mm)Velocity (m/s)Reynolds numberFriction factor fΔp over 100 m (kPa)
NPS 6154.082.68411 5000.016538.3
NPS 8202.741.55312 8000.01639.7
Calculated with the Aienginear PipeSpec Pro calculator v3.0.0aienginear.com/piping-specification-component-calculator/

Both sizes sit in the band. NPS 6 costs less to install; NPS 8 cuts friction loss by three quarters, which over a long run or a long operating life can repay the extra steel through lower pump power. That trade-off, not the velocity limit alone, usually decides the size.

Example 3: thin-wall stainless at modest pressure

NPS 4 Schedule 10S, A312 TP316/316L seamless, 1.6 MPa at 150 °C, no corrosion allowance. The allowable stress at 150 °C is about 107.4 MPa, giving t = 0.85 mm against a guaranteed wall of 2.67 mm, a utilisation of about 32 %. The MAWP of the wall is 5.1 MPa, so the light wall is comfortably adequate for pressure. In practice the limit on such a line is more likely to be mechanical: handling damage, vibration at small-bore connections, and the flange rating, which for a stainless Group 2.2 flange is lower than the carbon steel values in the table above.

Example 4: thermal growth of a hot run

The NPS 6 line from Example 1, 100 m long, installed at 20 °C and running at 200 °C, grows 12.1 × 10−6 × 100 000 × 180 = 218 mm. With Sc = Sh = 137.9 MPa and fewer than 7000 cycles, SA = 1.5 × 137.9 = 206.8 MPa, and a guided cantilever leg of about 10.4 m would absorb the movement. In a real layout that growth would be split between two or three loops or offsets, and a flexibility analysis would confirm the anchor and nozzle loads.

How this calculator compares

Aienginear Table 16

Aienginear PipeSpec Pro compared with typical free piping calculators

Feature comparison based on a review of commonly used free web tools, October 2026

Powered by Aienginear
CapabilityTypical free toolAienginear PipeSpec Pro v3
Pipe dimension rangeNPS 1/2 to 24, one schedule setNPS 1/8 to 36, B36.10 and B36.19 with all listed walls
Allowable stressSingle value typed by the userTemperature-dependent S(T) for 13 materials plus user override
E, W and YE only, W and Y fixedE from manufacture route, W from Table 302.3.5, Y interpolated
Mill tolerance and thin-wall limitOften ignoredApplied to every check; t ≥ D/6 and P/SE limits flagged
Hydrotest1.5 P1.5 P (ST/S), capped at 6.5 and at yield; pneumatic 1.1 P
Flange ratingNot includedB16.5 Group 1.1 P-T check at design temperature
Branch reinforcementRarely includedFull area replacement with angle, pad and minimum walls
FlowVelocity onlyColebrook, fittings K, elevation and a line-sizing table across all sizes
Thermal and supportsGrowth onlyGrowth, SA with cycle factor, guided leg, spans compared with MSS SP-58
UnitsOne systemSI, metric bar and US customary, switchable at any time
OutputScreen onlyBranded printable report, CSV, Excel, JSON and saved cases
VerificationNone shown17-point runtime self-test visible to the user
Aienginear assessment; features of individual third-party tools varyaienginear.com/piping-specification-component-calculator/

Common mistakes

  • Comparing tm with the nominal wall. The pipe can legally arrive 12.5 % thinner. Always compare with the guaranteed wall.
  • Using ambient allowable stress for a hot line. Above about 200 °C for carbon steel, this under-sizes the wall and the test pressure at the same time.
  • Treating a flange class as a pressure. Check the rating at the design temperature and for the correct material group.
  • Writing “Sch 40” when STD is meant on NPS 12 and above, or assuming 40S equals Sch 40 on NPS 12 and larger.
  • Forgetting that corrosion allowance reduces branch reinforcement on both the run and the branch.
  • Using the empty weight for supports instead of the operating or hydrotest weight.
  • Citing superseded documents such as MSS SP-69 or old B31.3 editions in new specifications.
  • Testing beyond the weakest component. Flanges, valves and equipment in the test boundary can set a lower limit than the pipe.

Standards and references

Aienginear Table 17

Documents behind the calculator and what each is used for

Edition status checked October 2026

Powered by Aienginear
DocumentScopeUsed in the calculator for
ASME B31.3-2024Process PipingWall thickness, W, Y, branch reinforcement, test pressures, displacement stress range
ASME B36.10-2022Welded and seamless wrought steel pipeOD and walls, numeric schedules, STD / XS / XXS
ASME B36.19-2022Welded and seamless wrought stainless steel pipe5S, 10S, 40S, 80S walls
ASME B16.5-2025Pipe flanges and flanged fittings, NPS 1/2 to 24P-T rating, bolt count and size
ASME B16.47-2020Large diameter steel flanges, NPS 26 to 60Flagged for NPS 26 and above
ASME B16.9-2024Factory-made wrought buttwelding fittingsCentre-to-end dimensions
ASME B31JStress intensification and flexibility factorsReferenced for flexibility analysis beyond this tool
ASME BPVC VIII-1 Mandatory Appendix 2Flange design rulesGasket seating and operating bolt loads
ASME PCC-1-2022Bolted flange joint assemblyTarget bolt stress, tightening practice
MSS SP-58-2018Pipe hangers and supportsSuggested maximum spans (supersedes SP-69)
API RP 14EOffshore production piping designErosional velocity screening
NACE MR0175 / ISO 15156Materials for H2S-containing environmentsSour service warnings
Compiled by Aienginearaienginear.com/piping-specification-component-calculator/

Assumptions and limitations

  • Pipe and B16.9 dimensions are tabulated values; allowable stresses, W factors and flange ratings are representative values for screening and must be confirmed in the current code tables for design.
  • Internal pressure only. External pressure and vacuum (B31.3 304.1.3), occasional loads, sustained stress, fatigue and vibration are outside the scope.
  • Pressure drop assumes single-phase, incompressible flow; gas lines with large pressure loss need a compressible-flow method.
  • Guided cantilever leg lengths and support spans are layout screening tools, not a substitute for a flexibility analysis to B31.3 para 319.
  • Fitting and flange weights and bolt torques are estimates. Use manufacturer data for procurement, lifting and tightening procedures.
  • Material compatibility ratings are a first screen. A corrosion or materials engineer should confirm the selection for any non-trivial service.

Quick quiz: test your piping specification knowledge

1. What happens to the outside diameter of NPS 8 pipe when you go from Schedule 40 to Schedule 80?

2. Which wall should be compared with tm in a B31.3 check?

3. A Class 300 Group 1.1 flange is rated 51.1 bar at 38 °C. Roughly what does it hold at 400 °C?

4. Why is a hydrotest of a hot carbon steel line often above 1.5 times design pressure?

5. Which document now covers pipe support spans in place of MSS SP-69?

These tools and guides are the ones most often used alongside a piping specification check.

Frequently asked questions

What is a piping specification?

A piping specification, or piping class, is a document that defines the design pressure and temperature envelope, material, corrosion allowance and the permitted pipe, fittings, flanges, gaskets, bolting, valves and branch connections for a group of lines. Each line on a P&ID carries a class code that points to its specification.

How do you calculate pipe wall thickness to ASME B31.3?

Use t = P D / [2 (S E W + P Y)], where P is design pressure, D outside diameter, S the allowable stress at design temperature, E the joint quality factor, W the weld strength reduction factor and Y the temperature coefficient. Add the corrosion and mechanical allowance to get tm = t + c, then choose a schedule whose wall after mill under-tolerance is at least tm.

Why is 12.5 % deducted from the pipe wall?

ASTM pipe specifications such as A106, A53, A333 and A312 allow the wall to be up to 12.5 % below nominal at any point. The design must therefore assume the thinnest wall that can legally be supplied, which is the nominal wall multiplied by 0.875.

Does the outside diameter change with schedule?

No. For any nominal pipe size the outside diameter is fixed by ASME B36.10 or B36.19. A heavier schedule adds wall on the inside, so the bore becomes smaller while the outside diameter, and therefore the fittings and flanges, stay the same.

What is the difference between Schedule 40 and STD?

They are the same wall up to NPS 10. From NPS 12 upward STD stays at 9.53 mm while Schedule 40 keeps increasing, reaching 17.48 mm at NPS 24. Similarly XS equals Schedule 80 only up to NPS 8.

Is 40S the same as Schedule 40?

Up to NPS 10 yes. At NPS 12 Schedule 40S is 9.53 mm while Schedule 40 is 10.31 mm, and from NPS 14 to 24 Schedule 40S stays at 9.53 mm. Stainless pipe is normally ordered to the B36.19 S schedules.

How is hydrotest pressure calculated under B31.3?

The minimum hydrostatic test pressure is 1.5 times design pressure multiplied by the ratio of allowable stress at test temperature to allowable stress at design temperature, with the ratio capped at 6.5. If that pressure would exceed yield in the pipe, it is reduced to the pressure that just reaches yield. A pneumatic test, where permitted, is 1.1 times design pressure.

What pressure does a Class 150 flange hold?

For A105 carbon steel (Group 1.1) about 19.6 bar at 38 °C, falling to 13.8 bar at 200 °C and 6.5 bar at 400 °C. Stainless and alloy flanges have different ratings, so always read the ASME B16.5 table for the correct material group at the design temperature.

What is the current edition of ASME B31.3?

ASME B31.3-2024 is the current edition as of October 2026. Its pressure design and branch reinforcement equations are unchanged from 2022; notable updates include the reference to ASME B31J for default stress indices, clarified bolt tightening and leak-test rules, and new listed components such as press-connect fittings.

Has MSS SP-69 been withdrawn?

Yes. MSS SP-69 was consolidated into MSS SP-58-2018 together with SP-77, SP-89 and SP-90. New specifications should cite SP-58 for hanger selection, application and suggested spans.

How far apart should pipe supports be?

For standard wall steel pipe in water service, MSS SP-58 suggests about 3.0 m for NPS 2, 5.2 m for NPS 6 and 7.0 m for NPS 12, with longer spans for gas service. Spans must be reduced at valves, flanges, risers and changes of direction, and the calculator also checks bending stress and sag for your actual weight.

When does a branch connection need a reinforcing pad?

When the surplus metal available in the run wall, the branch wall and the welds within the reinforcement zone is less than the area removed by the opening. Corrosion allowance, high pressure and large branch-to-run ratios make a pad more likely; integrally reinforced outlets and tees avoid the need for a calculation.

How much does steel pipe expand when heated?

Carbon steel expands about 12 micrometres per metre per kelvin. A 100 m run heated from 20 °C to 200 °C grows about 218 mm, which must be absorbed by loops, offsets or changes of direction.

Is this calculator suitable for final design?

It is a preliminary engineering and design-support calculator. Dimensions are tabulated, but allowable stresses, W factors and flange ratings are representative and weights and torques are estimates. Final design must use the current code tables, the project specification and manufacturer data, and be checked by a qualified engineer.

Does the calculator store my data?

No. All calculations run in your browser. Inputs and saved cases are kept only in your own browser storage and are never sent to a server.

Disclaimer

This calculator and article support preliminary engineering, screening, education and design. Pipe and fitting dimensions follow ASME B36.10, B36.19 and B16.9; allowable stresses, weld strength reduction factors and flange ratings are representative values that must be confirmed against the current editions of ASME B31.3 and B16.5; component weights and bolt torques are estimates. Results depend entirely on the inputs and stated assumptions. They do not replace detailed piping design, flexibility analysis, project specifications, manufacturer data or review by a qualified engineer, and they are not sufficient on their own for fabrication, procurement or construction.

Aienginear PipeSpec Pro · calculator v3.0.0 · article updated 22 October 2026 · standards status checked October 2026 · Published by Aienginear.com, Engineering Made Smarter. Found an error? Tell us.

Aienginear

Written by Muhammad Raza

Founder of Aienginear, with 18+ years managing piping, mechanical installation, plant shutdowns and turnarounds in power, cement, fertilizer and oil & gas plants.

LinkedIn · YouTube · Report an error or ask a question

Leave a Comment