Piping Criticality Evaluation Calculator (API 580/581 Screening Rubric)
Combines a consequence score (fluid hazard + line size + location, each 0–3) with a likelihood score (temperature regime + cyclic service + corrosion severity, each 0–3) and an optional utilization flag into a four-tier criticality class, CLASS 1 HIGH through CLASS 4 MINOR, with every factor's points shown in the output as an auditable driver string.
Method last updated (calculation changelog) · fixture-verified on every build — most recently 2026-07-30.
Screens a line or component into a criticality class using an explicit, engineering-judgment rubric in the spirit of an API 580/581 risk-based-inspection consequence/likelihood matrix — not a code-mandated calculation. Consequence (what happens if it fails: fluid hazard, size, location) and likelihood (how demanding the service is: temperature regime, cyclic service, corrosion severity) are each scored 0–3 per factor and summed. A code-check utilization above 0.9, if entered, escalates the class. Every factor's point value is returned in the drivers string so the score can be checked line by line and re-weighted against a project's own risk matrix without hunting through hidden logic.
Method
consequence = fluid + size + location (each 0–3, max 9)
likelihood = temp + cyclic + corrosion (each 0–3, max 9)
score = consequence + likelihood (max 18)
Class assignment, with the utilization flag (any code-check ratio > 0.9) lowering the score needed to escalate a tier:
score ≥ 12, or (utilization flag AND score ≥ 9) → CLASS 1 — HIGH
score ≥ 8, or (utilization flag AND score ≥ 6) → CLASS 2 — MEDIUM
score ≥ 4 → CLASS 3 — LOW
otherwise → CLASS 4 — MINOR
The flag only ever escalates a class — a line that scores low on consequence and likelihood is not pushed to CLASS 1 by a high utilization alone unless the combined score also clears the lowered threshold for that tier.
| Inputs | ||
|---|---|---|
| fluid | Fluid hazard category — nonhazardous, flammable, toxic, or high-pressure steam | — |
| size | Line size band — small (≤ NPS 2), medium (≤ NPS 8), large (≤ NPS 16), very-large (> NPS 16) | — |
| location | Failure-exposure location — remote, plant, occupied, or public | — |
| temp | Temperature regime — ambient, moderate (< creep, > 200°F), high, or creep range | — |
| cyclic | Cyclic-service severity — static, mild, or severe | — |
| corrosion | Corrosion/erosion severity — none, low, moderate, or severe | — |
| maxUtilization | Highest stress/allowable ratio from the line's code checks, if known (optional) | — |
| Outputs | ||
| consequence | Consequence score = fluid + size + location | 0–9 |
| likelihood | Likelihood score = temp + cyclic + corrosion | 0–9 |
| utilFlag | Whether a code check exceeded 0.9 utilization | — |
| score | Combined score = consequence + likelihood | 0–18 |
| criticalityClass | Criticality class, 1 (HIGH) through 4 (MINOR) | — |
| classLabel | Class label with the recommended action | — |
| drivers | Per-factor point breakdown for the audit trail | — |
Limitations — what this calculator is not
- Engineering-judgment screening tool, not a code requirement — the rubric mirrors the API 580/581 risk-based-inspection consequence/likelihood structure, but the factor points and class thresholds are this tool's own defaults, not a table cited from either standard.
- Align the factor weights and class break points to the project's own risk matrix before using the output to set inspection intervals or analysis scope; the score is deliberately transparent so that realignment is straightforward.
- The utilization flag only escalates the class, never de-escalates one — a line with a low consequence/likelihood score but a >0.9 utilization stays at its base class unless the combined score also clears the lowered escalation threshold (9 for CLASS 1, 6 for CLASS 2).
- Not a substitute for a formal RBI study (API 581), a PHA/HAZOP, or a full code stress analysis — use this to triage which lines warrant which level of rigor, not to close out the analysis itself.
Worked example — fixture-verified
A toxic-service line at large bore, routed through an occupied area, running at high temperature with mild cyclic service and low corrosion. No code-check utilization has been entered yet.
| Given | ||
|---|---|---|
| Fluid hazard | toxic | — |
| Line size band | large | — |
| Location class | occupied | — |
| Temperature regime | high | — |
| Cyclic service | mild | — |
| Corrosion severity | low | — |
Step by step
- Consequence: fluid=toxic (3) + size=large (2) + location=occupied (2) = 7.
- Likelihood: temp=high (2) + cyclic=mild (1) + corrosion=low (1) = 4.
- Combined score: 7 + 4 = 11.
- No maxUtilization entered, so the utilization flag stays no — the escalation rule is not in play.
- Class threshold: score ≥ 12 fails (11 < 12); score ≥ 8 passes → CLASS 2 — MEDIUM (full code check + periodic inspection).
| Result COMPUTED | ||
|---|---|---|
| Consequence | 7 | /9 |
| Likelihood | 4 | /9 |
| Combined score | 11 | /18 |
| Utilization flag | no | — |
| Criticality class | CLASS 2 — MEDIUM (full code check + periodic inspection) | — |
| Drivers | fluid=toxic (3); size=large (2); location=occupied (2); temp=high (2); cyclic=mild (1); corrosion=low (1) | — |
The same consequence/likelihood inputs return in the escalation example below with a 0.95-utilized code check added — the score doesn't move, but the class jumps a full tier. That's the mechanic worth remembering when triaging a line that's already running hot on stress.
criticality.json — case “toxic large occupied, high temp mild cyclic low corrosion -> 7+4=11 CLASS 2” (tolerance undefined) — 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 line, utilization escalates the class
Identical toxic/large/occupied/high/mild/low inputs as Example 1, but this time a code stress check on the line came back at 0.95 utilization — worth carrying through to see how the escalation rule changes the outcome with the score unchanged.
| Given | ||
|---|---|---|
| Fluid hazard | toxic | — |
| Line size band | large | — |
| Location class | occupied | — |
| Temperature regime | high | — |
| Cyclic service | mild | — |
| Corrosion severity | low | — |
| Max utilization | 0.95 | — |
Step by step
- Consequence and likelihood are unchanged from Example 1: 7 + 4 = 11.
- maxUtilization = 0.95 > 0.9, so the utilization flag is now YES (a check exceeded 0.9).
- Class threshold: score ≥ 12 still fails (11 < 12). But with the flag set, (utilization AND score ≥ 9) is now true (11 ≥ 9) → CLASS 1 — HIGH (rigorous analysis + inspection plan).
| Result COMPUTED | ||
|---|---|---|
| Combined score | 11 | /18 |
| Utilization flag | YES (a check exceeded 0.9) | — |
| Criticality class | CLASS 1 — HIGH (rigorous analysis + inspection plan) | — |
Same 11-point score as Example 1, but the class moved from MEDIUM to HIGH purely on the utilization flag crossing the lowered threshold (9, not 12). That's the intended behavior: a line already running near its allowable gets the rigorous treatment even before its consequence/likelihood profile alone would demand it.
Fixture case “same line with a 0.95-utilized code check -> escalates to CLASS 1” (tolerance undefined) — locked in the same release gate as the example above.
Additional verified cases in this fixture
nonhazardous small remote ambient static none -> 0 CLASS 4 COMPUTED
input: {"fluid":"nonhazardous","size":"small","location":"remote","temp":"ambient","cyclic":"static","corrosion":"none"}
expect: {"consequence":0,"likelihood":0,"score":0,"criticalityClass":4}
tol: undefinedSources & citations
- API 580 — Risk-Based Inspection.
- API 581 — Risk-Based Inspection Methodology.
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
Does a CLASS 1 result mean the line fails?
No — criticality class sets the scope of analysis and inspection, not a pass/fail verdict. CLASS 1 means the consequence/likelihood profile (or a near-fully-utilized code check) warrants rigorous analysis and an active inspection plan; it says nothing about whether the line currently passes its stress checks.
How does the 0.9 utilization flag interact with the base score?
It only escalates. A line already scoring 9 or more combined moves to CLASS 1 once utilization exceeds 0.9 (versus needing 12+ without the flag), and a line scoring 6 or more moves to CLASS 2 (versus 8+ without the flag). A low-scoring line with high utilization is not escalated past what those lowered thresholds allow.
Related calculators
- Analysis Sets: Multi-Code Piping Stress Comparison Calculator — Feed the utilization flag from a per-code stress comparison
- B31G Corroded Pipe Remaining Strength Calculator (Level 1) — A failed remaining-strength screen is a criticality driver
- Displacement Stress Range Check (ASME B31.3 ¶319.4.4) — The code check whose ratio feeds the utilization input