Pipeline MAOP Calculator — Maximum Allowable Operating Pressure (ASME B31.8 / B31.4)
Returns the pipe design pressure Pdesign = 2·t·SMYS·F·E·T/D, the test-qualified pressure Ptest = Pt/(test factor), and the governing MAOP — the lowest of those two and any component-rating or historical cap you enter — together with a plain statement of which basis governed. Design factor F, joint factor E, derating T and the test factor stay user inputs from the governing code edition.
Method last updated (calculation changelog) · fixture-verified on every build — most recently 2026-07-31.
Maximum allowable operating pressure is the number that ends up on the line list, the pressure the relief and control scheme is built around, and the number a regulator asks you to substantiate. It is worth being precise about what it is: MAOP is not calculated so much as selected. Several independent ceilings apply to the same pipeline, and the code's requirement is that the operating pressure not exceed the lowest of them. This calculator evaluates the three that govern in practice and tells you which one won.
The first ceiling is the pipe itself — the design pressure the wall can carry under the Barlow form with the pipeline design factors applied to specified minimum yield strength. The second is the strength test: a pipeline is only qualified to the pressure its hydrostatic test substantiates, divided by the ratio the governing code requires between test and operating pressure. The third is everything that is not line pipe — a flange class, a valve body rating, a fitting, a pre-existing or grandfathered MAOP record — collapsed into a single user-entered cap. A pipeline whose pipe is good for 1,468 psi, whose test qualifies 1,760 psi, and whose weakest flange is rated 1,200 psi has an MAOP of 1,200 psi, and no amount of wall thickness changes that.
The distinction between MAOP and MOP is largely a matter of which document you are working under: ASME B31.8 and the US gas regulations speak of maximum allowable operating pressure, while ASME B31.4 and much international liquid practice use maximum operating pressure. The arithmetic here is the same either way; the code selector on the card is a report label, not a switch that changes a factor. Every code-table value — F by location class or design factor, E by pipe manufacturing process, T by temperature, and the test-to-operating ratio — is entered by you from the edition your project actually invokes. None are embedded.
Method
Three candidate ceilings are computed or accepted, and the minimum is reported with its basis.
1 — Pipe design pressure. Barlow form with the pipeline design factors applied to SMYS, identical to the form used by ASME B31.8 ¶841.1.1, B31.4 ¶403.2.1 and B31.11:
Pdesign = 2 · t · SMYS · F · E · T / D
2 — Test-qualified pressure. The strength test only substantiates the pressure it actually reached, reduced by the ratio the code requires between test and operating pressure (commonly 1.25 for gas transmission in the higher location classes, and 1.25 or 1.5 elsewhere — enter the value your code and class require):
Ptest = Pt / (test factor)
3 — Other cap. Any additional limit that is not the line pipe: the lowest-rated flange, valve, or fitting in the segment; a manufacturer's pressure rating; or a historical, grandfathered or previously-established MAOP that the operator is not permitted to exceed. Entered directly; 0 disables the check rather than forcing the answer to zero.
MAOP = min ( Pdesign , Ptest , Pother )
The engine reports governing as one of design, test or other. That output matters more than it looks: two segments can share an MAOP number and be in completely different positions, one limited by steel it cannot get back and one limited by a flange that could be swapped in a shutdown. When the test governs, the calculator raises a warning — a test-limited MAOP means the pipe you bought is not fully qualified by the test you ran, and that gap is either a retest opportunity or an unrecognised derate, depending on how it happened.
Inputs are validated rather than trusted: D and t must be positive with t < D/2, SMYS positive, and F, E and T each within (0, 1]. A factor greater than 1 is rejected outright — it is the most common way a units or transcription error silently inflates an MAOP.
| Inputs | ||
|---|---|---|
| code | Governing pipeline code — report label only, selects no factor | — |
| D | Outside diameter | in |
| t | Nominal wall thickness | in |
| SMYS | Specified minimum yield strength from the pipe specification | psi |
| F | Design / location-class factor — user-supplied from the governing edition | — |
| E | Longitudinal joint factor — user-supplied | — |
| T | Temperature derating factor (1.0 where the code has none) — user-supplied | — |
| Pt | Actual strength-test pressure reached | psi |
| testFactor | Required ratio of test pressure to operating pressure — user-supplied | — |
| otherLimit | Component rating or historical MAOP cap; 0 = not applicable | psi |
| Outputs | ||
| designPressure | Pipe design pressure, 2·t·SMYS·F·E·T/D | psi |
| testDerived | Test-qualified pressure, Pt / test factor | psi |
| maop | Governing MAOP — the lowest applicable ceiling | psi |
| governing | Which basis governed: design, test, or other | — |
Limitations — what this calculator is not
- Straight line pipe only. The design-pressure branch is the Barlow form for plain pipe — it does not evaluate bends, branch connections, hot taps, fabricated assemblies, or any fitting. Those enter only through the otherLimit input, and only if you have already established their rating somewhere else.
- No code table values are embedded. F, E, T and the test factor are yours to supply from the governing edition, and choosing them correctly — particularly the location class or design factor, which changes with what has been built near the right-of-way since the line went in — is the engineering judgment this tool deliberately does not make for you.
- Pressure containment only. MAOP is one half of pipeline design; the longitudinal and combined stress checks (B31.4 ¶402.6, B31.8 ¶833) for thermal expansion, soil restraint and settlement are separate, as are external load, depth of cover, crossings, and fatigue in cyclic liquid service. A line can satisfy MAOP and still fail those.
- It does not know your line's condition. The design-pressure branch uses the nominal wall you enter, not a measured one. On an in-service line with metal loss, the sound-pipe design pressure is the wrong ceiling — run the B31G remaining-strength check against the measured defect and use its safe pressure instead.
- Elevation and static head are not modelled. On a liquid line with significant elevation change, the pressure at the low point is what has to respect MAOP, and that is the discharge pressure plus static head, not the pump setpoint. Enter the ceiling at the controlling location, and confirm separately that surge does not breach it — the Joukowsky surge calculator sizes the transient that gets added on top.
- Regulatory MAOP establishment is a records exercise as much as a calculation. Where a jurisdiction requires MAOP to be substantiated by traceable, verifiable and complete records — pipe mill certificates, test charts, class-location history — this calculator reproduces the arithmetic those records feed. It is not a substitute for the records themselves, and it cannot tell you whether a grandfathered value is still defensible.
Quick reference — reading the governing basis
The number matters, but the basis tells you what to do about it. This is the whole decision table:
| Governing basis | What is actually limiting | How it usually arises | The lever, if you need more |
|---|---|---|---|
| design | The line pipe. Wall thickness, grade, and the factors applied to SMYS. | A generous strength test on pipe sized close to its class factor. The normal, healthy case. | Heavier wall or higher grade on a replacement; or a lower class factor, if the location class genuinely supports it. Neither is cheap. |
| test | The strength test. The pipe is qualified below what the steel could carry. | A test run to a target that has since been superseded, a test cut short, or a segment re-tested at a reduced pressure after a repair. | Re-test at a higher pressure, if the line will take it and an outage is available. Otherwise the derate is real and the calculator's warning is the honest answer. |
| other | A component or a records cap — the weakest flange, valve or fitting, or a previously established MAOP. | A class 600 flange in an otherwise class 900 segment; or a grandfathered value the operator may not exceed regardless of the physics. | Replace the limiting component and re-establish, or accept it. Cheapest of the three to fix when it is a single flange, and impossible when it is a records constraint. |
A segment whose MAOP is set by other at a value far below both computed ceilings is worth flagging explicitly on the line list — it is the case most likely to be quietly wrong, because the cap is a number somebody typed rather than a number the geometry produced.
Worked example — fixture-verified
An NPS 12 gas transmission segment: 12.75 in OD, 0.250 in nominal wall, API 5L X52 pipe, designed to a 0.72 design factor with a seamless/ERW joint factor of 1.0 and no temperature derating. The strength test reached 2,200 psi and the governing code requires test pressure to be at least 1.25× the operating pressure. No component or historical cap applies.
| Given | ||
|---|---|---|
| Code | B31.8 | — |
| Outside diameter D | 12.75 | in |
| Nominal wall t | 0.25 | in |
| SMYS | 52,000 | psi |
| Design factor F | 0.72 | — |
| Joint factor E | 1.0 | — |
| Derating T | 1.0 | — |
| Test pressure Pt | 2,200 | psi |
| Test factor | 1.25 | — |
| Other cap | 0 (none) | psi |
Step by step
- Pipe design pressure: Pdesign = 2·t·SMYS·F·E·T/D = 2·0.25·52,000·0.72·1·1 / 12.75.
- Numerator: 2·0.25 = 0.5; 0.5·52,000 = 26,000; 26,000·0.72 = 18,720 lb/in.
- Divide by the diameter: 18,720 / 12.75 = 1,468.235 psi.
- Test-qualified pressure: Ptest = Pt / 1.25 = 2,200 / 1.25 = 1,760 psi.
- Other cap is 0, so it is not applied. MAOP = min(1,468.235 , 1,760) = 1,468.235 psi, and the governing basis is design — the pipe, not the test, is the limit.
| Result COMPUTED | ||
|---|---|---|
| designPressure — pipe design pressure | 1468.235 | psi |
| testDerived — test-qualified pressure | 1760 | psi |
| maop — governing MAOP | 1468.235 | psi |
| governing — basis | design | — |
This is the case you want: the test cleared the pipe's own capability with 292 psi of headroom, so the steel is the limit and nothing is being wasted. Note the margin ratio — the test reached 1.50× the resulting MAOP, comfortably above the 1.25 the code asked for. Had the test been sized to exactly 1.25× the design pressure (1,835 psi), the two ceilings would have landed on top of each other, which is the efficient design point and also the one with no tolerance for a test that runs slightly low.
pipeline-maop.json — case “design governs: NPS 12 X52 F=0.72, Pt=2200” (tolerance 0.001) — in the
calc-core release gate. It re-runs on every commit; a red fixture blocks deployment.
See the validation methodology.Worked example 2 — same pipe, a test that fell short
Identical pipe and factors, but the strength test on this segment reached only 1,700 psi — perhaps it was tested to an earlier, lower design intent, or the test was limited by an elevation profile or a temporary end closure. Nothing about the steel changed; only the evidence did.
| Given | ||
|---|---|---|
| Outside diameter D | 12.75 | in |
| Nominal wall t | 0.25 | in |
| SMYS | 52,000 | psi |
| F / E / T | 0.72 / 1.0 / 1.0 | — |
| Test pressure Pt | 1,700 | psi |
| Test factor | 1.25 | — |
Step by step
- Pipe design pressure is unchanged — the geometry and grade did not move: 1,468.235 psi.
- Test-qualified pressure: Ptest = 1,700 / 1.25 = 1,360 psi.
- MAOP = min(1,468.235 , 1,360) = 1,360 psi, governed by test.
- The engine raises a warning on this branch: the pipe design pressure is not fully qualified by the strength test. Roughly 108 psi of capability — about 7% — is present in the steel but unavailable to operate on.
| Result COMPUTED | ||
|---|---|---|
| testDerived — test-qualified pressure | 1360 | psi |
| maop — governing MAOP | 1360 | psi |
| governing — basis | test | — |
This is the case worth catching early. A test-governed MAOP is recoverable — re-testing to 1,835 psi would move the ceiling back to the pipe's 1,468 psi — but only while an outage is affordable. Carried into operation unexamined, it looks identical on the line list to a design-governed 1,360 psi line, and the fact that the asset is being under-run gets forgotten. That is exactly why the calculator names the basis instead of just returning the number.
Fixture case “test governs: short test Pt=1700” (tolerance 0.001) — locked in the same release gate as the example above.
Worked example 3 — a single flange sets the ceiling
The same pipe and the same generous 2,200 psi test as the main example, but the segment contains a flanged assembly whose rating at design temperature works out to 1,200 psi. Both computed ceilings are healthy; neither is the answer.
| Given | ||
|---|---|---|
| Outside diameter D | 12.75 | in |
| Nominal wall t | 0.25 | in |
| SMYS | 52,000 | psi |
| F / E / T | 0.72 / 1.0 / 1.0 | — |
| Test pressure Pt | 2,200 | psi |
| Test factor | 1.25 | — |
| Other cap (flange rating) | 1,200 | psi |
Step by step
- Pipe design pressure: 1,468.235 psi, as before.
- Test-qualified pressure: 2,200 / 1.25 = 1,760 psi, as before.
- The component cap is non-zero and lower than both: 1,200 psi < 1,468.235 psi.
- MAOP = 1,200 psi, governed by other. The pipeline is operating at 82% of what its own pipe would allow, because of one assembly.
| Result COMPUTED | ||
|---|---|---|
| maop — governing MAOP | 1200 | psi |
| governing — basis | other | — |
The engineering value here is entirely in the <code>governing</code> output. A 1,200 psi MAOP with basis <code>other</code> is a shopping list: change one flanged assembly and 268 psi comes back. The same 1,200 psi with basis <code>design</code> would be a pipe replacement. Rate the limiting joint with the <a href="/calculators/b165-flange-rating-calculator/">B16.5 flange rating calculator</a> before assuming the cap is right — a cap carried forward from an old document is the single most common stale input on a line list.
Fixture case “component rating governs via otherLimit” (tolerance 0.001) — locked in the same release gate as the example above.
Sources & citations
- ASME B31.8, Gas Transmission and Distribution Piping Systems — ¶841.1.1 design pressure for steel pipe; ¶845.2.2 maximum allowable operating pressure, including the test-pressure and component-rating limits.
- ASME B31.4, Pipeline Transportation Systems for Liquids and Slurries — ¶403.2.1 internal design pressure; the maximum operating pressure provisions of the same edition.
- API 5L, Line Pipe — source of SMYS and of the manufacturing process that governs the longitudinal joint factor E; entered by the user.
- ASME B16.5, Pipe Flanges and Flanged Fittings — where a flanged component establishes the otherLimit cap, its pressure-temperature rating comes from here.
Per the source & citation policy, allowable-stress and factor table values are user-supplied. Where a page does reproduce specific ASME data (the B16.5 ratings, the quick-reference tables), it does so under ASME authorization and states the source table and conditions inline.
FAQ
What is the difference between MAOP and MOP?
Mostly vocabulary and jurisdiction. ASME B31.8 and US gas pipeline regulation use maximum allowable operating pressure; ASME B31.4 and much international liquid practice use maximum operating pressure. Both mean the ceiling the line may not be operated above, and both are established as the lowest of the applicable limits. Some operators additionally distinguish MOP as the pressure they actually intend to run at, below an MAOP that is the code ceiling — that is a company convention, not a code definition, so confirm which sense your project's documents mean before quoting a number back at somebody.
Why does the code selector not change the answer?
Because all the pipeline codes design straight pipe for internal pressure with the same Barlow form, t = P·D/(2·SMYS·F·E·T) rearranged for P. What differs between B31.4, B31.8 and B31.11 is which values of F, E and T you are entitled to use, and how the test factor is set — and those are all your inputs. The selector is carried onto the report as a label so the calculation states which code it was performed under, which is what a reviewer needs; it does not silently pick a factor for you. This is the same licensing firewall applied across the site: public equations are implemented, code tables are not reproduced.
The test governs and I have no outage. What are my options?
Honestly: accept the lower MAOP, or find the outage. A test-qualified pressure is evidence, and there is no arithmetic that substitutes for evidence you do not have. What you can do is make sure the derate is recorded as test-limited rather than design-limited, so the recoverable capability is visible next time the line is opened — and check whether the segment boundaries are drawn where the low test actually applies. A single short segment tested low should not derate ten miles of pipeline that was tested properly, and segmenting the MAOP record correctly is often where the pressure actually comes back.
Should I enter the nominal wall or a measured wall thickness?
For establishing MAOP on new or sound pipe, nominal wall as purchased — that is what the design factor is calibrated against, and the pipeline codes are written on nominal wall with the manufacturing tolerance absorbed in the material specification. Do not substitute a measured minimum from an in-service inspection to try to model corrosion here: that is not what the Barlow design branch means, and it will produce a number that looks defensible and is not. Metal loss has its own methods — run B31G or an equivalent remaining-strength assessment against the measured defect and treat its safe operating pressure as a separate ceiling, entered here as the other cap if it is the lowest.
Does MAOP account for surge, static head, or thermal effects?
No. MAOP is a steady-state ceiling on the pressure the line may see, and the calculator evaluates only the three ceilings described above. Everything that adds pressure on top of the operating setpoint is a separate check you own: static head on a liquid line with elevation change, and surge from valve closure or pump trip, which for liquid lines can be the largest single transient the pipe ever sees. Codes typically permit a bounded overpressure above MAOP for surge — commonly 10% — but that allowance is against MAOP, not in addition to whatever the surge happens to be. Size the transient with the Joukowsky surge calculator and confirm it fits inside the allowance rather than assuming it does.
What should I put in the 'other limit' field?
The lowest pressure ceiling in the segment that is not the line pipe itself, after you have established it elsewhere: the pressure-temperature rating of the weakest flange, valve or fitting at design temperature; a manufacturer's rating on a non-standard component; or a previously established, grandfathered, or regulator-accepted MAOP that may not be exceeded regardless of what the pipe could carry. Enter 0 when none applies — zero disables the check rather than driving the answer to zero. One caution: a cap inherited from an old line list is a number somebody typed, not a number geometry produced, so verify it before letting it govern.
Related calculators
- ASME B31.4 / B31.8 / B31.11 Pipeline Wall Thickness Calculator — Sizes the wall behind the design-pressure ceiling
- B31G Corroded Pipe Remaining Strength Calculator (Level 1) — Metal loss derates a line below its sound-wall MAOP
- Hydrostatic / Pneumatic Leak Test Pressure Calculator (ASME B31.3) — The strength test that qualifies the test-governed ceiling
- Water Hammer Calculator — Joukowsky Surge Pressure and Wave Speed — Surge rides on top of MAOP — size the transient it has to absorb
- Pipeline Hydrostatic Test Pressure Calculator (ASME B31.4 / B31.8) — The pipeline strength test whose result becomes the test-governed ceiling