AIENGINEAR CALCULATOR · PIPING ENGINEERING
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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
| Class item | What it fixes | Governing document | Calculator tab |
|---|---|---|---|
| Design envelope | Maximum pressure at each temperature, minimum design metal temperature | Project design basis, ASME B31.3-2024 | Wall Thickness |
| Base material | Pipe, fitting and flange material grades | ASTM / ASME material specifications | Materials |
| Corrosion allowance | Extra wall for lifetime metal loss, usually 0, 1.5, 3 or 6 mm | Corrosion study, client standard | Wall Thickness |
| Pipe wall by size | Schedule or wall for every NPS in the class | B31.3 304.1.2, B36.10 / B36.19 | Wall Thickness, Schedule Compare |
| Flange rating and facing | Class 150 to 2500, RF or RTJ | ASME B16.5-2025 / B16.47-2020 | Wall Thickness (rating), Flange Bolting |
| Fittings | Buttweld below or above a break size, socket weld or threaded for small bore | ASME B16.9-2024, B16.11 | Fittings |
| Branch table | Tee, reinforced stub-in or integrally reinforced outlet for each run and branch size | B31.3 304.3, MSS SP-97 | Branch Reinf. |
| Gaskets and bolting | Gasket type, bolt and nut grades | ASME B16.20, B16.21, ASTM A193 / A194 | Flange Bolting |
| Test requirements | Hydrostatic or pneumatic test pressure | B31.3 345 | Wall Thickness (test) |
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
| NPS | DN | OD (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/2 | 15 | 21.30 | 2.77 | 15.76 | 1.27 | 3.73 | 13.84 | 1.62 |
| NPS 3/4 | 20 | 26.70 | 2.87 | 20.96 | 1.69 | 3.91 | 18.88 | 2.20 |
| NPS 1 | 25 | 33.40 | 3.38 | 26.64 | 2.50 | 4.55 | 24.30 | 3.24 |
| NPS 1 1/2 | 40 | 48.30 | 3.68 | 40.94 | 4.05 | 5.08 | 38.14 | 5.41 |
| NPS 2 | 50 | 60.30 | 3.91 | 52.48 | 5.44 | 5.54 | 49.22 | 7.48 |
| NPS 3 | 80 | 88.90 | 5.49 | 77.92 | 11.29 | 7.62 | 73.66 | 15.27 |
| NPS 4 | 100 | 114.30 | 6.02 | 102.26 | 16.08 | 8.56 | 97.18 | 22.32 |
| NPS 6 | 150 | 168.30 | 7.11 | 154.08 | 28.26 | 10.97 | 146.36 | 42.56 |
| NPS 8 | 200 | 219.10 | 8.18 | 202.74 | 42.55 | 12.70 | 193.70 | 64.64 |
| NPS 10 | 250 | 273.10 | 9.27 | 254.56 | 60.31 | 15.09 | 242.92 | 96.02 |
| NPS 12 | 300 | 323.90 | 10.31 | 303.28 | 79.73 | 17.48 | 288.94 | 132.09 |
| NPS 14 | 350 | 355.60 | 11.13 | 333.34 | 94.55 | 19.05 | 317.50 | 158.11 |
| NPS 16 | 400 | 406.40 | 12.70 | 381.00 | 123.31 | 21.44 | 363.52 | 203.54 |
| NPS 18 | 450 | 457.20 | 14.27 | 428.66 | 155.88 | 23.83 | 409.54 | 254.68 |
| NPS 20 | 500 | 508.00 | 15.09 | 477.82 | 183.43 | 26.19 | 455.62 | 311.19 |
| NPS 24 | 600 | 609.60 | 17.48 | 574.64 | 255.25 | 30.96 | 547.68 | 441.80 |
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
| NPS | Schedule (B36.10) | Wall (mm) | S schedule (B36.19) | Wall (mm) | Difference |
|---|---|---|---|---|---|
| 10 | 80 | 15.09 | 80S | 12.70 | S wall 2.39 mm thinner |
| 12 | 40 | 10.31 | 40S | 9.53 | S wall 0.78 mm thinner |
| 12 | 80 | 17.48 | 80S | 12.70 | S wall 4.78 mm thinner |
| 14 | 10 | 6.35 | 10S | 4.78 | S wall 1.57 mm thinner |
| 16 | 10 | 6.35 | 10S | 4.78 | S wall 1.57 mm thinner |
| 20 | 10 | 6.35 | 10S | 5.54 | S wall 0.81 mm thinner |
| 14 to 24 | 40 | 11.13 to 17.48 | 40S | 9.53 | 40S stays at STD wall |
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:
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:
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.
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
| Symbol | Meaning | Unit | Source and typical value |
|---|---|---|---|
P | Internal design pressure, gauge | MPa | Design basis; the most severe coincident pressure and temperature |
D | Outside diameter | mm | ASME B36.10 / B36.19 (fixed by NPS) |
S | Basic allowable stress at design temperature | MPa | B31.3 Table A-1; 137.9 MPa for A106 B up to about 204 °C |
E | Longitudinal joint quality factor | – | Table A-1B: 1.00 seamless, 0.85 ERW, 0.80 single-butt EFW |
W | Weld joint strength reduction factor | – | Table 302.3.5: 1.0 below the creep range, lower above it |
Y | Temperature coefficient | – | Table 304.1.1: 0.4 for most metals below 482 °C |
c | Corrosion, erosion and mechanical allowance | mm | Project corrosion study; often 1.5 or 3 mm for carbon steel |
t | Pressure design thickness | mm | Calculated |
tm | Minimum required thickness, t + c | mm | Calculated |
T | Nominal wall | mm | Schedule, B36.10 / B36.19 |
T × 0.875 | Guaranteed wall after 12.5 % under-tolerance | mm | Must be at least tm |
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
| Material | 38 °C | 150 °C | 260 °C | 343 °C | 400 °C | 454 °C | 538 °C |
|---|---|---|---|---|---|---|---|
| A106 Gr. B, A53 Gr. B (carbon steel) | 137.9 | 137.9 | 130.3 | 117.2 | 89.0 | – | – |
| A335 P11 (1.25Cr-0.5Mo) | 137.9 | 124.1 | 118.6 | 112.4 | 106.1 | 99.3 | 43.4 |
| A335 P22 (2.25Cr-1Mo) | 137.9 | 124.1 | 123.4 | 123.4 | 123.4 | 108.3 | 55.2 |
| A312 TP304 (conservative line) | 137.9 | 103.4 | 88.9 | 82.7 | 79.3 | 75.8 | 71.7 |
| A312 TP316 (conservative line) | 137.9 | 107.6 | 91.7 | 84.8 | 82.0 | 80.0 | 77.9 |
| A790 2205 duplex | 206.8 | 199.3 | 187.5 | – (max 316 °C) | – | – | – |
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:
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
| Class | 38 °C | 100 °C | 200 °C | 300 °C | 400 °C | 450 °C | 538 °C |
|---|---|---|---|---|---|---|---|
| 150 | 19.6 | 17.7 | 13.8 | 10.2 | 6.5 | 4.6 | 1.4 |
| 300 | 51.1 | 46.6 | 43.8 | 39.8 | 34.7 | 23.0 | 5.9 |
| 600 | 102.1 | 93.2 | 87.6 | 79.6 | 69.4 | 46.0 | 11.8 |
| 900 | 153.2 | 139.8 | 131.4 | 119.5 | 104.2 | 69.0 | 17.7 |
| 1500 | 255.3 | 233.0 | 219.0 | 199.1 | 173.6 | 115.0 | 29.5 |
| 2500 | 425.5 | 388.3 | 365.0 | 331.8 | 289.3 | 191.7 | 49.2 |
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:
Δ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
| Service | Typical velocity (m/s) | Main concern |
|---|---|---|
| Pump suction, clean liquid | 0.6 to 1.5 | NPSH margin, vapour release |
| Pump discharge, clean liquid | 1.5 to 3.0 | Pressure drop and pump power |
| Gravity drains, slurry minimum | 0.9 to 1.2 minimum | Solids settling |
| Cooling water, large headers | 1.5 to 2.5 | Erosion of fittings, water hammer |
| Gas and vapour, general | 10 to 25 | Noise, pressure drop |
| Saturated steam | 15 to 35 | Erosion from condensate droplets, noise |
| Superheated steam | 25 to 50 | Pressure drop, noise |
| Two-phase or erosive service | below API RP 14E erosional velocity | Erosion-corrosion |
Aienginear Table 8
Absolute roughness values used for friction factor
Equivalent sand-grain roughness ε in mm
| Pipe condition | ε (mm) | Comment |
|---|---|---|
| Drawn tubing, copper, PVC, HDPE | 0.0015 | Hydraulically smooth in most service |
| Stainless steel | 0.015 | New, pickled |
| Commercial carbon steel, new | 0.045 | The usual design value |
| Carbon steel, moderate rust | 0.15 | Typical of older utility lines |
| Galvanised steel | 0.15 | Zinc coating roughens the bore |
| Cast iron | 0.26 | Unlined |
| Carbon steel, heavy scale or tubercles | 0.9 | Old water mains, untreated cooling water |
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:
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.
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
| Material | α (µm/m·K) | Growth of 100 m for 100 K (mm) |
|---|---|---|
| Carbon steel (A106, A53, A333, API 5L) | 12.1 | 121 |
| 1.25Cr and 2.25Cr alloy steel | 12.8 to 13.0 | 128 to 130 |
| Austenitic stainless 304 / 316 | 16.5 to 17.0 | 165 to 170 |
| Duplex 2205 | 13.5 | 135 |
| Copper | 17.1 | 171 |
| Aluminium 6061 | 23.6 | 236 |
| PVC | 54 | 540 |
| HDPE PE100 | about 180 | about 1800 |
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:
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
| NPS | Water service (m) | Gas, vapour or air (m) |
|---|---|---|
| 1 | 2.1 | 2.7 |
| 1 1/2 | 2.7 | 3.7 |
| 2 | 3.0 | 4.0 |
| 3 | 3.7 | 4.6 |
| 4 | 4.3 | 5.2 |
| 6 | 5.2 | 6.4 |
| 8 | 5.8 | 7.3 |
| 10 | 6.7 | 7.9 |
| 12 | 7.0 | 9.1 |
| 16 | 8.2 | 10.7 |
| 20 | 9.1 | 11.9 |
| 24 | 9.8 | 12.8 |
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).
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
| Gasket type | m | y (MPa) | Typical use |
|---|---|---|---|
| Spiral wound, stainless with graphite filler | 3.0 | 68.9 | Most process flanges, Class 150 to 2500 |
| Kammprofile (grooved metal with soft facing) | 3.0 | 69.0 | Heat exchangers, difficult joints |
| Compressed non-asbestos fibre, 1.6 mm | 2.75 | 25.5 | Low-pressure utilities |
| Flexible graphite sheet | 2.0 | 20.7 | High temperature, chemical service |
| PTFE sheet | 2.0 | 11.0 | Corrosive chemicals, low temperature |
| Ring joint, soft iron | 5.5 | 124.0 | Class 900 and above, RTJ facing |
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
| NPS | 90° LR elbow A | 45° LR elbow B | Equal tee C | Reducer H | Cap E |
|---|---|---|---|---|---|
| 1 | 38 | 22 | 38 | 51 | 38 |
| 2 | 76 | 35 | 64 | 76 | 38 |
| 3 | 114 | 51 | 86 | 89 | 51 |
| 4 | 152 | 64 | 105 | 102 | 64 |
| 6 | 229 | 95 | 143 | 140 | 89 |
| 8 | 305 | 127 | 178 | 152 | 102 |
| 10 | 381 | 159 | 216 | 178 | 127 |
| 12 | 457 | 190 | 254 | 203 | 152 |
| 16 | 610 | 254 | 305 | 356 | 178 |
| 20 | 762 | 318 | 381 | 508 | 229 |
| 24 | 914 | 381 | 432 | 508 | 267 |
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
| Material | Specification | Typical range | Notes |
|---|---|---|---|
| Carbon steel | ASTM A106 Gr. B, API 5L | −29 to 425 °C | Default for hydrocarbons, steam, utilities |
| Low-temperature carbon steel | ASTM A333 Gr. 6 | −45 to 343 °C | Impact tested; LPG, flare, cold service |
| 1.25Cr-0.5Mo | ASTM A335 P11 | up to about 593 °C | Steam, hot hydrogen; PWHT required |
| 2.25Cr-1Mo | ASTM A335 P22 | up to about 649 °C | High-temperature steam and furnace lines |
| Austenitic stainless 304 / 316 | ASTM A312 | −196 to over 800 °C | Corrosive and cryogenic service; chloride SCC risk |
| Duplex 2205 | ASTM A790 | −51 to 316 °C | Chlorides and seawater (super-duplex for severe cases) |
| Thermoplastics | PVC, HDPE PE100 | about 0 to 60 °C | Water and chemicals at low pressure; not for compressed gas |
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:
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
| Result | 200 °C | 400 °C | What it means |
|---|---|---|---|
| Allowable stress S | 137.9 MPa | 89.0 MPa | Carbon steel is in its falling range above about 204 °C |
| Pressure design thickness t | 2.41 mm | 3.71 mm | 54 % more wall needed for pressure |
| Required tm = t + c | 5.41 mm | 6.71 mm | Exceeds the 6.22 mm guaranteed Sch 40 wall at 400 °C |
| Wall check, Sch 40 | Adequate (87 %) | Not adequate (108 %) | Move to Sch 80: 10.97 × 0.875 = 9.60 mm |
| MAWP of Sch 40 wall | 5.36 MPa | 3.46 MPa | Below design pressure at 400 °C |
| Hydrotest PT | 6.00 MPa | 9.29 MPa | ST/S = 1.55 raises the test pressure |
| Class 300 rating | 43.8 bar | 34.7 bar | Exceeded at 400 °C: Class 600 (69.4 bar) needed |
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
| Size | Bore (mm) | Velocity (m/s) | Reynolds number | Friction factor f | Δp over 100 m (kPa) |
|---|---|---|---|---|---|
| NPS 6 | 154.08 | 2.68 | 411 500 | 0.0165 | 38.3 |
| NPS 8 | 202.74 | 1.55 | 312 800 | 0.0163 | 9.7 |
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
| Capability | Typical free tool | Aienginear PipeSpec Pro v3 |
|---|---|---|
| Pipe dimension range | NPS 1/2 to 24, one schedule set | NPS 1/8 to 36, B36.10 and B36.19 with all listed walls |
| Allowable stress | Single value typed by the user | Temperature-dependent S(T) for 13 materials plus user override |
| E, W and Y | E only, W and Y fixed | E from manufacture route, W from Table 302.3.5, Y interpolated |
| Mill tolerance and thin-wall limit | Often ignored | Applied to every check; t ≥ D/6 and P/SE limits flagged |
| Hydrotest | 1.5 P | 1.5 P (ST/S), capped at 6.5 and at yield; pneumatic 1.1 P |
| Flange rating | Not included | B16.5 Group 1.1 P-T check at design temperature |
| Branch reinforcement | Rarely included | Full area replacement with angle, pad and minimum walls |
| Flow | Velocity only | Colebrook, fittings K, elevation and a line-sizing table across all sizes |
| Thermal and supports | Growth only | Growth, SA with cycle factor, guided leg, spans compared with MSS SP-58 |
| Units | One system | SI, metric bar and US customary, switchable at any time |
| Output | Screen only | Branded printable report, CSV, Excel, JSON and saved cases |
| Verification | None shown | 17-point runtime self-test visible to the user |
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
| Document | Scope | Used in the calculator for |
|---|---|---|
| ASME B31.3-2024 | Process Piping | Wall thickness, W, Y, branch reinforcement, test pressures, displacement stress range |
| ASME B36.10-2022 | Welded and seamless wrought steel pipe | OD and walls, numeric schedules, STD / XS / XXS |
| ASME B36.19-2022 | Welded and seamless wrought stainless steel pipe | 5S, 10S, 40S, 80S walls |
| ASME B16.5-2025 | Pipe flanges and flanged fittings, NPS 1/2 to 24 | P-T rating, bolt count and size |
| ASME B16.47-2020 | Large diameter steel flanges, NPS 26 to 60 | Flagged for NPS 26 and above |
| ASME B16.9-2024 | Factory-made wrought buttwelding fittings | Centre-to-end dimensions |
| ASME B31J | Stress intensification and flexibility factors | Referenced for flexibility analysis beyond this tool |
| ASME BPVC VIII-1 Mandatory Appendix 2 | Flange design rules | Gasket seating and operating bolt loads |
| ASME PCC-1-2022 | Bolted flange joint assembly | Target bolt stress, tightening practice |
| MSS SP-58-2018 | Pipe hangers and supports | Suggested maximum spans (supersedes SP-69) |
| API RP 14E | Offshore production piping design | Erosional velocity screening |
| NACE MR0175 / ISO 15156 | Materials for H2S-containing environments | Sour service warnings |
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?
Related Aienginear calculators and guides
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.