17-4PH vs 304 Stainless Steel: When Strength Beats Corrosion
304 and 17-4PH are not two points on the same scale, and comparing them as if one is simply better misses the point. 304 is an austenitic grade chosen for corrosion resistance and weldability. 17-4PH is a precipitation-hardening martensitic grade chosen for strength — roughly five times the yield strength of 304 — and it pays for that strength in corrosion performance, machinability and price. One of them is usually obviously right once the part is described.
Two different materials that happen to share a name
Both are called stainless steel, and that is roughly where the family resemblance ends.
304 is an austenitic grade: 18% chromium, 8% nickel, no copper, and a face-centred cubic crystal structure that cannot be hardened by heat treatment. Its job is to resist corrosion, and it does that job extremely well. Its strength is modest and fixed — you get what the annealed condition gives you, and the only way to get more is to cold work it or to use more material.
17-4PH is a martensitic precipitation-hardening grade: around 17% chromium, 4% nickel and 4% copper with a small niobium addition, and a body-centred structure that responds to heat treatment. Its job is to be strong — and it is, by a margin that changes what a part can do. It also resists corrosion reasonably well, but that is a secondary property rather than the reason to choose it.
The practical consequence is that these two grades are rarely in genuine competition. One of them is usually obvious once you know whether the part is limited by corrosion or by strength.
Side by side
| 304 (annealed) | 17-4PH (H900) | 17-4PH (H1150) | |
|---|---|---|---|
| Type | Austenitic | Martensitic, precipitation-hardening | Same |
| Yield strength | ~215 MPa | ~1,170 MPa | ~725 MPa |
| Tensile strength | ~515 MPa | ~1,310 MPa | ~930 MPa |
| Hardenable by heat treatment | No | Yes — by aging | Yes |
| Corrosion resistance | Very good | Moderate | Better than H900 |
| Toughness / ductility | High | Lower | Higher |
| Magnetic | Essentially no | Yes | Yes |
| Weldability | Good | Possible, with care and post-weld aging | Same |
| Relative material cost | Baseline | Several times higher | Same base alloy |
Three rows are worth more than a glance. The yield strength row is the reason the grade exists. The corrosion row is the one that catches people out, because the assumption runs the wrong way. And the magnetism row decides a small but real set of applications outright.
What precipitation hardening actually is
The name describes the mechanism, and it explains why 17-4PH can be both strong and reasonably corrosion resistant — a combination the older martensitic grades could not manage.
The material is supplied in the solution-treated condition, sometimes called condition A. The alloying elements are dissolved into the structure at high temperature, and the part is then cooled quickly enough that they stay in solution rather than forming coarse particles. In that state the material is relatively soft and machines reasonably well.
Aging — also called precipitation hardening — reheats the part to a lower temperature, typically between about 480 °C and 620 °C, and holds it. At that temperature the copper and other elements come out of solution as an extremely fine dispersion of particles throughout the matrix. Those particles obstruct the movement of dislocations, which is what makes a metal deform permanently, and the material becomes dramatically stronger.
Nothing about the shape changes, no quench cracking risk is introduced by the aging step itself, and the whole treatment is done at a temperature low enough that the part comes out close to clean. That is the practical advantage over a quench-and-temper route on a complex part.
The condition decides both strength and corrosion
This is the part of the 17-4PH story that is least often explained, and it matters more than the headline number.
The aging temperature sets the strength. It also sets the toughness and the corrosion resistance — and they move in opposite directions.
| Condition | Aging temperature | Strength | Toughness | Corrosion resistance |
|---|---|---|---|---|
| H900 | ~480 °C | Highest | Lowest | Lowest |
| H1025 | ~550 °C | High | Moderate | Moderate |
| H1075 | ~580 °C | Moderate | Better | Better |
| H1100 | ~595 °C | Moderate | Better | Better |
| H1150 | ~620 °C | Lowest of the group | Highest | Best of the group |
The lower the aging temperature, the finer the precipitate and the harder the material — but the more the microstructure is left in a state that is prone to corrosion, particularly in chloride environments. Aging hotter coarsens the precipitate, which gives up strength but restores toughness and corrosion performance.
The consequence is that the strongest 17-4PH is the least corrosion resistant 17-4PH, and specifying H900 by default on a part that also has to survive a corrosive duty is a common and avoidable mistake. Where the load allows it, H1025 or H1075 often gives a better overall part than H900, because the strength is still several times that of 304 while the corrosion and toughness behaviour is materially better.
If a drawing simply says “17-4PH” with no condition, that is a gap worth closing. The condition is not a detail — it is half the specification.
Machining: the sequence matters more than the grade
17-4PH is machined in a specific order, and getting the order wrong is what causes tolerance problems.
Machine in the solution-treated condition, then age. In condition A the material cuts reasonably well — it is not free-machining, and it is more abrasive than 304, but it can be turned, milled and threaded without difficulty. Once aged, the same material is hard and abrasive, tool wear climbs sharply, and the finishing pass on a hardened surface is often grinding rather than cutting.
Aging moves the part. The dimensional change is small, but it is not zero, and on a feature held to ±0.01 mm it is enough to take the part out of tolerance. That is why the sequence is rough machine, age, then finish — not machine to size and age afterwards. Where a tolerance is critical, the finishing operation happens after the aging treatment.
This has a scheduling consequence worth knowing before the quote: a 17-4PH part has an extra step in the middle of the route, and the lead time reflects it. Production runs in 25–35 days after sample approval, and the heat treatment sits inside that window rather than after it. Arrangements for aging are made through our vetted partner network, managed under one quality process — see the heat treatment page for how the sequence is planned.
Two machining notes that follow from the material:
- Allow for the aged hardness when planning threads. Tapping an aged 17-4PH part is far harder than tapping it in condition A. Where a thread is in a hardened section, it is usually cut before aging.
- Do not plan a light finishing pass to sneak up on a dimension. The same rule as other stainless grades applies, and harder material punishes it more.
Both conditions of the material hold ±0.01 mm on precision features with ISO 2768-m as the general block, provided the sequence above is respected — see tolerances we hold.
Magnetism, welding and the other practical differences
Magnetism. 17-4PH is magnetic, before and after aging, because it is martensitic. 304 is essentially non-magnetic in the annealed condition. For instrument hardware, sensor bodies and electrical components where a magnetic part is a functional problem, this decides the grade on its own, and 304 or 316L is the answer.
Welding. 17-4PH can be welded, but it is not a welding grade in the way 304 is. A welded joint usually needs post-weld aging to restore properties in the affected zone, and the process window is narrower. A fabricated assembly is normally built in 304 or 316L; 17-4PH is chosen for machined parts that carry load.
Surface finish. Both take passivation, and 17-4PH takes it in the aged condition where the surface has been finished after aging. Where a part is both hardened and needs a specific finish, the finish operation sits at the end of the route for the same reason the tolerance does.
Cost, and the cheaper answer that gets missed
17-4PH costs several times what 304 costs per kilo, and the machining route is longer because of the aging step and the harder finishing cut. On a part that does not need the strength, that premium funds nothing.
The more interesting point is the alternative that gets skipped in both directions.
- If the requirement is corrosion, 304 or 316 — or 316L for welded parts — costs a fraction as much and performs better. Reaching for 17-4PH because it sounds stronger is the wrong instinct.
- If the requirement is strength in a dry environment, an alloy steel such as 4140 hardened and tempered is usually cheaper than 17-4PH and just as strong, and it machines more easily. The reason to pay for 17-4PH is that the part also has to resist corrosion. See steel parts for how 4140 is specified.
- If the requirement is both, 17-4PH earns its price. That is the case it exists for: a shaft running in a wet environment, a valve stem, a pump component, a high-strength fastener that will not be painted or plated. Typical parts include custom shafts, valve bodies and high-strength custom bolts.
There is also a design move worth considering before any of this. If a part is failing in a 304 design, the first question is not always “which stronger alloy” but “does the geometry have to be this shape”. A larger section in 304 is sometimes cheaper than a smaller section in 17-4PH — and it keeps the corrosion performance, which the grade change gives away.
Choosing between them
Choose 304 when:
- Corrosion resistance is the reason for the grade
- The part is welded, or is part of a welded assembly
- The part must be non-magnetic
- The load is modest and the section can carry it
- Cost matters and the environment is benign or moderate
Choose 17-4PH when:
- The part is strength-limited — a load that 304 cannot carry without a much larger section
- The part also has to resist corrosion, which rules out an alloy steel
- The part is a shaft, valve component, pump part, high-strength fastener or load-bearing fitting
- Hardness is required in a component that still has to resist corrosion
- The part is machined only, not welded
Move elsewhere when:
- Only strength is required and the environment is dry — 4140 is cheaper
- Only corrosion is required — 304 or 316 is better and cheaper
- Only hardness is required — 416 or 410 for a turned wear part
- The part must be non-magnetic — 304 or 316L
Four mistakes on 17-4PH drawings
1. Naming the grade without a condition. “17-4PH” alone leaves the aging temperature open, and the aging temperature is what sets strength, toughness and corrosion resistance. A shop will pick something — probably H900, because it is the strongest — and on a part that also faces a corrosive duty, that may be the worst of the five options. Name the condition.
2. Defaulting to H900. It is the strongest and the least forgiving. Unless the load genuinely requires peak strength, H1025 or H1075 usually produces a better part: still several times the strength of 304, with better toughness and materially better corrosion behaviour.
3. Tolerancing before aging. Aging moves the part. A drawing that calls for ±0.01 mm on a feature machined before the heat treatment is asking for something the sequence cannot deliver. State the tolerance and let the route be rough machine, age, finish — or accept that the finishing cut happens after aging and price it accordingly.
4. Assuming 17-4PH is the corrosion-resistant option. It is not. If the reason for the grade is corrosion, 304 or 316 costs a fraction as much and performs better. 17-4PH earns its place when strength and corrosion are both required, and that is a narrower requirement than it sounds.
A fifth, less obvious one: specifying 17-4PH where 4140 would do. If the part is strong, machined and lives indoors or is protected by a coating, an alloy steel hardened and tempered to the same strength is usually cheaper and machines more easily. The premium for 17-4PH buys corrosion resistance — pay it only if you need it.
What 17-4PH does not solve
It is worth being explicit about the boundary, because the grade’s reputation runs ahead of what it does.
- It does not replace 316 in a chloride duty. 17-4PH’s corrosion resistance is moderate, and in the hardest conditions it is lower than 304’s. Where chlorides are the problem — marine, coastal, chemical process — the answer is a higher-alloy austenitic grade, not a harder precipitation-hardening one.
- It does not make a part non-magnetic. It is martensitic and magnetic throughout.
- It does not remove the need for a finish. Passivation still follows machining, and where the part is both hardened and visible, the finish sits at the end of the route.
- It does not make a poor design work. A part failing in fatigue because of a sharp internal corner will fail in 17-4PH too, just later. The load case and the geometry still have to be right.
Where a drawing crosses one of those boundaries, the honest answer is to say so at the quotation stage rather than supply a part that is stronger and wrong.
The callout that belongs on the drawing
| Instead of | Write |
|---|---|
| 17-4PH | 17-4PH, condition H1025 (or the condition the load requires) |
| 17-4PH, high strength | 17-4PH H900, accepting lower toughness and corrosion resistance |
| 17-4PH, welded | Reconsider — build the assembly in 304 or 316L |
| 17-4PH, ±0.01 mm | 17-4PH, rough machine / age / finish after aging |
| 17-4PH, non-magnetic | Wrong grade — specify 316L and state the requirement |
| Stainless, strong and corrosion resistant | 17-4PH with a named condition, or 304 with a reviewed section |
The single most valuable line is the condition. Adding “H1025” or “H1150” to the grade callout tells the shop what strength and toughness you are buying, and it is the difference between a quote that can be priced properly and one that has to come back with a question.
Send the drawing, the grade and condition, and the loads if the part is strength-critical. The quote comes back within 24 hours with DFM feedback, and where the condition is genuinely open we will say which one the load actually calls for rather than defaulting to the strongest. Orders start at 50 pieces per style and material, samples from a single piece in 5–10 days, and every batch ships with a material certificate (MTR) tracing the heat plus pre-shipment photos.
In practice the grade choice is settled by the fastener rather than by the datasheet: 304 covers most custom screws and washer sets, while 17-4 PH appears where a part has to hold a thread under load at temperature. When the quantity is under a thousand pieces, the material and the small batch setup are the two lines that decide the price, not the bar stock itself.
Frequently asked
- Is 17-4PH stronger than 304?
- Far stronger. In the H900 condition 17-4PH reaches roughly 1,170 MPa yield strength, against about 215 MPa for annealed 304 — around five times as much. It also hardens by heat treatment, which 304 cannot do at all. Where a 304 part would have to grow substantially in section to survive a load, 17-4PH usually lets the geometry stay as designed.
- Is 17-4PH more corrosion resistant than 304?
- Generally no. 304's corrosion resistance is better in most environments, and the gap widens in the hardest 17-4PH conditions. 17-4PH is a good performer relative to carbon and alloy steels and is far better than a 400-series grade, but it is not an upgrade on 304 for a corrosion-driven application. If corrosion is the requirement, 304 or 316 is the cheaper and better answer.
- What do the 17-4PH conditions mean?
- The condition is the aging temperature, and it sets the strength. H900 is aged at about 480 °C and gives the highest strength with the lowest toughness and corrosion resistance. As the aging temperature rises through H1025, H1075 and H1100 to H1150, strength and hardness fall while toughness, ductility and corrosion resistance improve. There is no single right condition — it follows from whether the part is strength-limited or toughness-limited.
- Can you machine 17-4PH?
- Yes, and the practical route is to machine in the solution-treated condition, where it cuts reasonably well, and then age it. In the aged condition it is hard and abrasive, and the finishing pass on a hardened part is often grinding rather than cutting. Because aging moves the part slightly, tight tolerances are usually applied after aging rather than before.
- Does 17-4PH shrink when it is aged?
- It moves — the dimensions change slightly during aging, typically by a small contraction. The amount is small but it is not zero, and on a tolerance held to ±0.01 mm it is enough to matter. That is why the sequence is usually rough machine, age, then finish, rather than machine to size and age afterwards.
- Is 17-4PH magnetic?
- Yes. It is a martensitic stainless steel, so it is magnetic, and it stays magnetic after aging. If a specification requires a non-magnetic part, 17-4PH is the wrong choice — 304 or 316L is the starting point, and the requirement should be stated on the drawing.
- When should I choose 17-4PH over 304?
- When the part is strength-limited and also has to resist corrosion. Shafts carrying load in a wet environment, valve stems, pump components, high-strength fasteners and load-bearing fittings are the typical cases. Where the requirement is corrosion alone, 304 or 316 costs a fraction as much and performs better; where the requirement is strength alone in a dry environment, an alloy steel such as 4140 is usually cheaper still.
Where to go next
Have a part this article describes?
Send the drawing, the material callout and the quantity. You get DFM feedback and a price within 24 hours, and orders start at 50 pieces per style and material.