The calculation in one line

You're sizing a straight run of pipe for internal pressure. The code that governs process piping is ASME B31.3, and Section 304.1.2 gives you the pressure design thickness:

t = (P × D) / [2 × (S·E·W + P·Y)]

Then you add the corrosion allowance to get the minimum required thickness:

tm = t + c

That's the whole thing. P is design pressure, D is the pipe outside diameter, S is the allowable stress at temperature, E is the quality factor, W is the weld strength reduction factor, Y is a small coefficient, and c is the corrosion allowance. Get those right and the answer falls out.

Why it matters in practice

Wall thickness is what stands between the fluid and the outside world. Under-size it and you have a rupture risk; over-size it and you've added weight, cost, and welding time to every joint on the line — multiplied across kilometres of pipe. On a real project this number also drives the pipe schedule, the support spacing, and the flange rating, so it tends to be the first calculation people ask for and the one that gets reviewed hardest.

It's also the calculation auditors check first, because the inputs are easy to get subtly wrong: the wrong stress value, a forgotten corrosion allowance, or pressure in the wrong units.

Core engineering concept

The equation is a rearranged hoop-stress relationship. Internal pressure pushes outward on the pipe wall, and the wall resists with circumferential (hoop) stress. As long as the wall is thin relative to the diameter, hoop stress is roughly P·D / 2t. Set that equal to the allowable stress and solve for t, and you get the B31.3 form. The Y term is a correction that keeps the result honest as the wall gets thicker.

Reading the inputs correctly

  • P — design pressure. Use the design pressure from the process basis, not the operating pressure. They're not the same number, and the margin between them exists for a reason.
  • D — outside diameter. Always the OD, never the nominal size. NPS 4 is 114.3 mm OD, not 4 inches. Pull it from the B36.10M table.
  • S — allowable stress. From ASME II-D, at the design temperature, for your specific material grade. This is where most errors live.
  • E — quality factor. 1.0 for seamless, 0.85 for ERW, 0.80 for SAW. It's the longitudinal weld joint efficiency.
  • W — weld strength reduction. 1.0 below 482 °C (900 °F). Above that, derate per Table 302.3.5.
  • Y — coefficient. 0.4 for ferritic and austenitic steels at moderate temperature. It only matters at high P/S ratios.

Design guidance — the workflow

On a real job the order looks like this:

  1. Get P, design temperature, and material from the line list and process basis.
  2. Look up D (OD) for your NPS and S at the design temperature.
  3. Compute the pressure design thickness t.
  4. Add corrosion allowance c to get tm.
  5. Account for mill tolerance — divide by 0.875.
  6. Pick the lightest schedule whose nominal wall meets that number.

Don't forget mill tolerance

ASME B36.10M pipe is allowed to be up to 12.5 % thinner than nominal. So a "6.02 mm" SCH 40 pipe might actually ship at 5.27 mm. To stay safe, divide your required thickness by 0.875 before comparing it to the nominal schedule wall:

torder = tm / 0.875
Worked example. NPS 4 (D = 114.3 mm), A106-B (S = 137.9 MPa at 100 °C), seamless (E = 1.0, W = 1.0, Y = 0.4), P = 5 MPa, corrosion allowance 3 mm. t = (5 × 114.3) / [2 × (137.9 + 5 × 0.4)] = 2.05 mm. Add 3 mm CA → 5.05 mm. Divide by 0.875 → 5.77 mm. SCH 40 (6.02 mm) clears it; SCH 80 if the spec wants more margin.

Common mistakes

  • Operating pressure instead of design pressure. Always the higher, code-defined value.
  • Allowable stress at the wrong temperature. S drops as temperature rises. Using the room-temperature value on a hot line is unconservative.
  • Forgetting corrosion allowance. For carbon steel in process service it's 1.5–3 mm and it goes on top of the pressure thickness, not into it.
  • Skipping mill tolerance. A result that "just passes" on nominal wall can fail once you account for the 12.5 % under-tolerance.
  • Mixing units. Bar, MPa, psi — pick one and keep P, S, and D consistent.
Key takeaway

The B31.3 wall thickness equation is easy. Getting a safe answer is about discipline with the inputs: design (not operating) pressure, allowable stress at the actual design temperature, corrosion allowance added on top, and a mill-tolerance correction before you pick a schedule.