If you buy or specify stainless steel for chloride service, sooner or later someone asks for a minimum PREN. The datasheet says 316L is "about 24" and 254 SMO is "about 43". The certificate that arrives with the material has its own numbers. They are not the same thing, and a few lines of Python make the difference easy to see.
What PREN is
PREN (Pitting Resistance Equivalent Number) is a quick ranking of how well a stainless steel resists pitting in chlorides. It is calculated from the chemistry, in weight percent:
PREN = Cr + 3.3 × (Mo + 0.5 × W) + 16 × N Chromium builds the passive film, molybdenum and tungsten help it survive chlorides, and nitrogen adds a surprising amount for such a small number. Most specifications use 16 for nitrogen; some duplex specifications use 30, so check which one your document asks for.
PREN is a ranking tool, not a guarantee. Temperature, crevices, deposits and welding all matter. But it is the number that shows up in purchase specs, so it is worth calculating correctly.
The formula in code
def pren(cr, mo, n=0.0, w=0.0, n_factor=16): """Cr + 3.3 * (Mo + 0.5 * W) + n_factor * N, all in wt%.""" return cr + 3.3 * (mo + 0.5 * w) + n_factor * n The standard gives a range, not a number
Each grade's standard allows a range for every element. Feed the minimums and maximums into the formula and you get the PREN range the standard permits:
from dataclasses import dataclass @dataclass class Grade: name: str uns: str cr: tuple # (min, max) wt% mo: tuple n: tuple = (0.0, 0.0) def pren_range(self, n_factor=16): low = pren(self.cr[0], self.mo[0], self.n[0], n_factor=n_factor) high = pren(self.cr[1], self.mo[1], self.n[1], n_factor=n_factor) return round(low, 1), round(high, 1) GRADES = [ Grade("316L", "S31603", cr=(16.0, 18.0), mo=(2.0, 3.0), n=(0.0, 0.10)), Grade("317L", "S31703", cr=(18.0, 20.0), mo=(3.0, 4.0), n=(0.0, 0.10)), Grade("904L", "N08904", cr=(19.0, 23.0), mo=(4.0, 5.0), n=(0.0, 0.10)), Grade("2205", "S32205", cr=(22.0, 23.0), mo=(3.0, 3.5), n=(0.14, 0.20)), Grade("254 SMO", "S31254", cr=(19.5, 20.5), mo=(6.0, 6.5), n=(0.18, 0.25)), ] for g in GRADES: low, high = g.pren_range() print(f"{g.name:<8} {g.uns} PREN {low:>5} - {high:<5}") Output:
316L S31603 PREN 22.6 - 29.5 317L S31703 PREN 27.9 - 34.8 904L N08904 PREN 32.2 - 41.1 2205 S32205 PREN 34.1 - 37.8 254 SMO S31254 PREN 42.2 - 46.0 Two things stand out.
316L can legally be below 24. A heat that sits near the bottom of the chromium and molybdenum ranges is still 316L, but its PREN is closer to 23. If your spec says "316L, PREN ≥ 24", that is a real extra requirement, not a restatement of the grade.
The ranges overlap. A rich 904L heat can match a lean 2205 heat. Grade names are a good shortlist; the chemistry on the certificate is what you actually receive.
Check the heat, not the grade
So the useful check is against the actual heat analysis on the EN 10204 3.1 certificate:
def check_heat(heat_no, chem, required, n_factor=16): value = pren(chem["Cr"], chem["Mo"], chem.get("N", 0.0), chem.get("W", 0.0), n_factor=n_factor) status = "OK" if value >= required else "BELOW" print(f"{heat_no}: PREN {value:.1f} (required >= {required}) -> {status}") return value # Two 316L heats, both inside the standard check_heat("Heat A", {"Cr": 16.6, "Mo": 2.02, "N": 0.03}, required=24) check_heat("Heat B", {"Cr": 17.2, "Mo": 2.45, "N": 0.06}, required=24) Heat A: PREN 23.7 (required >= 24) -> BELOW Heat B: PREN 26.2 (required >= 24) -> OK Both heats are valid 316L. Only one meets the project requirement. If you only checked the grade name, you would accept both.
Do not drop nitrogen
The second trap is missing data. Nitrogen is multiplied by 16, so a 6Mo grade such as 254 SMO gets around 3 PREN points from nitrogen alone. Handheld XRF analysers, the usual tool for PMI, cannot measure nitrogen (or carbon). If someone builds the PREN from a PMI reading, nitrogen silently becomes zero:
# A 254 SMO heat against a seawater-style requirement check_heat("Heat C", {"Cr": 19.6, "Mo": 6.0, "N": 0.19}, required=40) # Same heat, nitrogen left out (e.g. typed in from a handheld XRF reading) check_heat("Heat C (no N)", {"Cr": 19.6, "Mo": 6.0}, required=40) Heat C: PREN 42.4 (required >= 40) -> OK Heat C (no N): PREN 39.4 (required >= 40) -> BELOW Same metal, opposite verdict. PMI is good for confirming the grade (Cr, Ni, Mo), but the PREN should come from the certificate's heat analysis, where nitrogen is reported.
If you turn this into a real tool, make nitrogen a required field and raise an error when it is missing, instead of defaulting to zero.
A few practical notes
- State the formula in the spec. "PREN ≥ 40 calculated as Cr + 3.3Mo + 16N from the heat analysis" leaves far less room for argument than "PREN ≥ 40".
- Duplex grades: confirm whether the nitrogen factor is 16 or 30. The same 2205 heat can differ by more than 2 points depending on the factor.
- Nickel alloys: you can run the formula on alloy 625 or C-276 and get big numbers, but PREN was developed for stainless steels. For nickel alloys, rely on corrosion data rather than PREN alone.
- Welds: the weld metal and heat-affected zone usually pit before the base metal. A high base-metal PREN does not help if the filler metal is under-alloyed.
Wrap-up
The datasheet PREN tells you which grades to shortlist. The certificate tells you what you bought. Calculating from the actual heat analysis, keeping nitrogen in, and writing the formula into the spec avoids most PREN disputes before they start.
If you are looking at 6Mo grades for seawater or chloride-heavy process lines, here is a reference page with forms and specs for 254 SMO stainless steel (UNS S31254).

