ASME B31.1 vs B31.3 vs B31.4 Piping Code Comparison
When designing, fabricating or inspecting carbon steel piping systems, the applicable ASME B31 code determines allowable stresses, wall thickness calculations, testing requirements and inspection criteria. ASME B31.1 (Power Piping), ASME B31.3 (Process Piping) and ASME B31.4 (Pipeline Systems for Liquids) are three of the most commonly referenced codes, and confusing them can lead to non-compliant fabrication, failed inspection or costly rework. This guide compares all three so engineering and procurement teams can specify the correct code for their project.
We cover scope, allowable stress basis, wall thickness formula, branch reinforcement, flexibility analysis, testing requirements, NDE requirements and documentation. Whether you are building a power plant steam line, a refinery process line or a cross-country oil pipeline, the code selection is the first engineering decision.

1. Scope and Application
| Parameter | ASME B31.1 | ASME B31.3 | ASME B31.4 |
|---|---|---|---|
| Title | Power Piping | Process Piping | Liquid Pipeline Systems |
| Typical service | Steam, water, oil in power plants | Chemical, petrochemical, refinery | Liquid hydrocarbons, CO2 pipelines |
| Location | Power stations, boiler houses | Refineries, chemical plants, terminals | Cross-country, offshore, gathering |
| Pressure range | Up to critical pressure | Up to 680 bar (Cat. M) | Up to 250 bar (typical) |
| Temperature range | -198°C to +650°C | -198°C to +815°C | -30°C to +120°C (typical) |
| Fluid category | Water, steam, air, gas | Normal, Category M, High Purity | Flammable, combustible, stable |
The boundary between B31.3 and B31.4 is the facility fence line: piping inside a refinery or terminal battery limit falls under B31.3, while cross-country or offshore pipelines outside the battery limit fall under B31.4. B31.1 is specific to power generation facilities and is not used for process plants.
2. Wall Thickness Calculation
All three codes use a modified Barlow formula as the basis for minimum wall thickness, but the coefficients and allowable stress values differ. The general form is:
t = (P × D) / (2 × (S × E × W + P × Y))
Where: t = minimum wall thickness, P = internal design pressure, D = outside diameter, S = allowable stress from code table, E = quality factor (longitudinal weld joint efficiency), W = weld strength reduction factor, Y = coefficient from code table.
| Factor | B31.1 | B31.3 | B31.4 |
|---|---|---|---|
| Allowable stress basis | Lower safety factor | Higher safety factor for Category M | Moderate, with derating for temperature |
| Weld joint factor E (ERW pipe) | 0.85 (furnace-welded 0.60) | 0.85 (seamless 1.00) | 0.85 (seamless 1.00) |
| Corrosion allowance | As specified by owner | As specified by owner | As specified by owner |
| Y coefficient (ferritic steel, ≤ 480°C) | 0.4 | 0.4 | 0.4 |
| Mill tolerance | -12.5% on wall thickness | -12.5% on wall thickness | -12.5% on wall thickness |
In practice, for the same pipe size, design pressure and temperature, B31.3 typically yields a slightly thicker wall than B31.1 due to the more conservative allowable stress basis for hazardous fluids. B31.4 may allow thinner walls than B31.3 because it applies to less hazardous liquids at moderate temperatures.

3. Branch Connection and Reinforcement
All three codes require reinforcement of branch connections where the branch diameter exceeds a certain ratio of the header. The calculation method is similar (area-replacement method) but the required area and acceptable reinforcement types differ.
| Requirement | B31.1 | B31.3 | B31.4 |
|---|---|---|---|
| Reinforcement method | Area replacement | Area replacement | Area replacement |
| Reinforcing pad (saddle) | Allowed | Allowed | Allowed but less common |
| Weld-on branch fitting (Weld-O-Let) | Allowed | Allowed (MSS SP-97) | Allowed |
| Integrally reinforced tee | Preferred for high pressure | Preferred for Category M | Standard for pipelines |
| Minimum weld size | Per code Fig. 127.4.8 | Per code Table 328.4.2 | Per API 1104 or ASME Sec. IX |
4. Flexibility and Stress Analysis
Thermal expansion, support movement and pressure thrust create stresses that must be evaluated. The codes differ in when formal flexibility analysis is required and what stress limits apply.
| Flexibility Requirement | B31.1 | B31.3 | B31.4 |
|---|---|---|---|
| Formal analysis required? | Yes, unless exemption met | Yes, unless exemption met | Yes, for buried and above-ground segments |
| Allowable thermal stress range | Sa = f × (1.25 Sc + 0.25 Sh) | Sa = f × (1.25 Sc + 0.25 Sh) | Simplified (API practice) |
| Cold spring | Allowed (50% credit) | Allowed (no credit required for code compliance) | Not commonly used |
| Support spacing | Per code mandatory appendix | Per engineering judgment / standards | Per API recommended practice |

5. Pressure Testing Requirements
| Test Parameter | B31.1 | B31.3 | B31.4 |
|---|---|---|---|
| Hydrostatic test pressure | 1.5 × design pressure | 1.5 × design pressure × stress ratio | 1.25 × MOP (onshore) |
| Pneumatic test pressure | 1.2 × design pressure | 1.1 × design pressure × stress ratio | 1.25 × MOP |
| Test medium | Water preferred | Water preferred (Category M mandatory) | Water preferred; hydrocarbon possible |
| Hold time | 10 min minimum | Per owner, typically 10 – 30 min | 1 – 4 hours (onshore) |
| Temperature | ≥ 15°C (MDMT considerations) | ≥ MDMT + 17°C | ≥ 5°C above MDMT |
6. NDE and Inspection Requirements
| NDE Requirement | B31.1 | B31.3 | B31.4 |
|---|---|---|---|
| RT/UT on butt welds (Normal Fluid) | 5% min (varies by service) | 5% min (Normal); 100% (Category M) | 10% min (cross-country); 100% (ties) |
| MT/PT on branch welds | As specified | Required for Category M | Per API 1104 |
| Hardness test (weld HAZ) | Not mandatory | Required for H2 service, elevated temp | Required for sour service |
| Visual inspection | 100% of welds | 100% of welds | 100% of welds |
| Reference welding standard | ASME Sec. IX | ASME Sec. IX | API 1104 |
7. Documentation and Records
All three codes require traceable documentation, but the extent differs significantly:
- B31.1: Material Test Reports (MTR), welding procedure specifications (WPS), welder qualification records, NDE reports and hydrostatic test records.
- B31.3: All of the above plus: design calculations, flexibility analysis reports, pipe class specification, positive material identification (PMI) for alloy steel, and for Category M: documented in-service inspection plan.
- B31.4: MTR, WPS, welder qualification, NDE reports, hydrostatic test records, pipeline route map, depth-of-cover survey and cathodic protection commissioning records.
FAQ
Which code applies to a refinery utility water line?
ASME B31.3 applies to all piping within the refinery battery limit, including utility water, because the code governs by location, not by fluid. If the same water line crosses outside the battery limit to a remote pump station, the portion outside the fence may fall under B31.1 (if it serves a power boiler) or B31.4 (if it is a liquid pipeline).
Can I use A53 Grade B pipe for all three codes?
Yes, ASTM A53 Gr. B seamless or ERW pipe is an approved material in all three codes. The allowable stress values differ slightly because each code applies its own safety factors. Check the specific stress table for your design temperature in each code.
What is the difference between Category M and Normal Fluid Service in B31.3?
Category M applies to fluids where exposure to even small quantities can cause irreversible harm (toxic gases, lethal chemicals). Category M requires 100% RT, special leak detection, weld metal hardness control and more conservative design margins. Normal Fluid Service has less stringent requirements.
Need Carbon Steel Pipe for Your Piping Project?
Huaxia-Steel supplies seamless and welded carbon steel pipe (ASTM A53, A106, API 5L, A333) with full EN 10204 3.1 / 3.2 MTC for power piping, process piping and liquid pipeline projects. We provide custom cutting, beveling, coating and NDE per your project specification. Contact us for a competitive quote.





