Heat treatment is the operation most designers leave off the print until the prototype comes back wrong. Machine a part from a bar of 6061 or a length of tool steel and it leaves the machine with two hidden problems: a skin of residual stress pushed in by the cutter, and mechanical properties that are whatever the stock came with. Heat treatment is how you fix both — it can soften the part to relieve that stress and restore machinability, or harden it to survive wear, load, and temperature. But heat treatment is not free. The same furnace cycle that moves the hardness moves the dimensions too, and a part that was straight and on size before the oven can come out a few thousandths bigger, or bowed, or with a thin layer of scale. This guide walks through the heat treatments that matter to machined parts — annealing, stress relieving, hardening, tempering, and precipitation hardening — what each one does, why each one distorts, and how to sequence machining and heat treatment so the part comes out straight and on size.
Two reasons a machined part goes to the furnace
Machining is a cold-working process in disguise. Every cut plows the tool through the metal, and even a light finish pass pushes a shallow layer of material past its yield point. The result is a part with a balanced but locked-in stress field: the skin is stretched or compressed relative to the core, and the part holds its shape only because all those stresses cancel out. The moment you cut more material off one face — or heat the part — that balance breaks and the part moves. This is the first reason parts get heat treated: stress relief, to take the locked-in energy out before it can pull the part out of tolerance.
The second reason is properties. Stock metal arrives at whatever condition the mill supplied: 6061 aluminum is typically delivered in the T6 precipitation-hardened condition, while many steels arrive in a soft, normalized state that machines easily but is too soft to hold up in service. If the finished part has to resist wear, fatigue, or impact, heat treatment is how you push the hardness and strength up after the machining is done. The two goals point in opposite directions — one softens to remove stress, the other hardens to add strength — and knowing which one the part needs is the first decision in any heat-treatment plan.
Annealing and stress relieving: taking the fight out of the metal
Annealing is the general-purpose reset. The part is heated above its recrystallization temperature, held, and cooled slowly in the furnace, which lets the deformed grains reform into a soft, uniform structure and lets the residual stress relax almost completely. For steels, full annealing is followed by furnace cooling; for cold-worked brass and copper, the same idea softens a part that has work-hardened from drawing or machining. The payoff is a material that cuts easily and holds still — the two things a machinist most wants from a difficult second operation.
Stress relieving is a lighter version of the same idea. It heats the part to a temperature below the recrystallization point — for carbon steels, typically 550–650 °C (1020–1200 °F), and for aluminum well below its aging temperature — holds it long enough for the locked-in stress to relax, and cools slowly. Because the temperature stays below the point where the structure changes, stress relieving changes hardness and strength very little. Its whole job is to take out the internal stress so the part will not move during later machining or in service. The trade-off is that stress relief is rarely complete: it removes the bulk of the stress, not all of it, and a heavily cold-worked part may still carry a small residual after the cycle.
The thing that surprises people first is that even annealing and stress relief cause distortion — just less of it than hardening. As the stress relaxes, the part is free to move, and a part machined with a strong imbalance of stress across its section will bow or twist slightly as it lets go. That is why the sequence matters as much as the temperature: a part should be stress relieved before the finish cuts, so the movement happens while there is still stock to clean up.
Hardening and tempering: how a part gets hard, and how it pays
Hardening is the opposite direction. For a through-hardening steel, the part is heated into the austenite range, then quenched — dropped into oil, water, or a polymer solution — so fast that the carbon cannot diffuse out and the structure freezes into martensite, a hard but brittle phase. The quench is where most of the trouble lives. The outside of the part cools and contracts first, the inside follows, and the rapid, uneven cooling plus the volume change from forming martensite is what bends, twists, and cracks parts. Thin sections quench faster than thick ones; sharp corners concentrate stress; a long slender shaft will bow.
Tempering is the mandatory second half. Martensite as-quenched is hard but too brittle to use, so the part is reheated to a lower temperature — typically 150–650 °C depending on the alloy and the hardness target — held, and cooled. Tempering trades a little hardness for a lot of toughness and, crucially, it also relaxes some of the quench stress. A hardened part that is never tempered is a crack waiting to happen. The hardness-versus-temperature trade is the classic heat-treat dial: a higher tempering temperature means lower hardness and higher toughness, and the spec is always a balance between the two. The distortion from hardening is not a defect you can inspect away — it is built into the process, and every serious heat-treat plan assumes the part will move and leaves finish stock to correct it afterward.
Precipitation hardening and aluminum: why 6061 stays put until it does not
Most of the aluminum through a machine shop is 6061, and 6061 is nearly always specified in the T6 condition — solution heat treated and artificially aged before it ever reaches the shop. The key fact is that this hardening was already done at the mill: the material arrives hard and stays hard as long as it is not reheated. Take 6061-T6 back above roughly 200–250 °C (400–480 °F) and the fine precipitates that give it its strength begin to coarsen and overage, and the part loses hardness permanently. That is why aluminum is almost never re-hardened after machining — it is cut from already-hardened stock, and the only heat treatment you normally run on it is a low-temperature stress relief that stays well below the aging temperature so the T6 temper survives.
Stainless steels split the difference. Austenitic grades such as 316L cannot be hardened by heat treatment at all — they only work-harden from deformation — so treating 316L usually means stress relieving to counter the work hardening left by machining, not adding hardness. Precipitation-hardening grades such as 17-4 PH are the opposite: an aging treatment after machining is how the strength is added. The table below is the working summary of how the common treatments compare, and the takeaway is that the material decides which treatment even makes sense before temperature and time do.
| Process | Typical temperature | What it does | Hardness change | Distortion risk | Typical use |
|---|---|---|---|---|---|
| Annealing | Above recrystallization | Softens, reforms grain, relieves stress | Reduces | Low | Restore machinability, remove work hardening |
| Stress relieving | Below recrystallization | Relaxes residual stress | Minimal | Low | Stabilize before finish machining |
| Through hardening + tempering | Austenitize, quench, temper | Forms martensite, adds strength | Large increase | High | Wear surfaces, shafts, tooling |
| Precipitation hardening | Moderate, alloy-specific | Age-hardens via precipitates | Moderate increase | Low–moderate | 6061-T6 aluminum, 17-4 PH stainless |
| Case hardening (carburize / nitride) | Surface layer only | Hardens skin, keeps soft core | Surface increase | Moderate | Gears, cams, bearing surfaces |
The pattern to read from the table is simple: the harder a treatment pushes the material, the more the part moves, and the more finish stock you have to leave to correct it. Annealing and stress relief are gentle because they mostly let the part relax; hardening is aggressive because it forces the part into a new structure, and the structure change is exactly what moves the geometry.
Distortion: the geometry tax of heat treatment
Distortion has three causes, and they usually act together. First, thermal stress: the part heats and cools unevenly because its sections are different thicknesses, and uneven expansion and contraction bends it. Second, phase change: when steel forms martensite, the crystal structure changes volume by a small percentage, and that volume change is not uniform through the section, which distorts the shape. Third, residual stress redistribution: whatever stress was already locked in from prior machining lets go during the cycle and moves the part. All three scale with section change — a part with one thick wall and one thin web will move more than a uniform block — and all three are amplified by fast heating, fast quenching, and poor furnace support.
Control is mostly about removing the reasons rather than fighting the result. Stress relieve before finish machining. Leave uniform stock on the part so heating and cooling are even. Support long and thin parts so they cannot sag under their own weight at temperature. Ramp the temperature slowly, and for the hardest-to-hold parts, hold them in a fixture that constrains the shape through the cycle. The honest rule is that you cannot eliminate distortion from heat treatment; you can only move it to where it can be machined away.
Sequencing the process: machine first or heat treat first
The single most useful decision in heat-treatment planning is where the oven sits in the sequence, and the answer is almost always: rough machine, heat treat, then finish machine. Roughing removes the bulk of the material and leaves uniform stock; heat treatment then does whatever it is going to do to the part — relieve stress, harden, or both — and the finish passes cut the now-stable part to final size. Trying to heat treat a fully finished part is how you end up with a hardened part that is no longer on size and has to be scrapped, because there is no stock left to correct the movement.
There are only a few cases where heat treatment comes after final machining. Thin, precise parts that cannot be re-cut after hardening — some stamping and forming tooling, for example — are hardened last and accepted with whatever small movement results. And surface treatments such as nitriding, which add a hard case at low temperature, are deliberately run on finished parts because the case is thin and the distortion is small. For everything else, the checklist below is the order we work through when a drawing calls out a heat treatment.
- Read the heat-treat call-out as a sequence, not an operation. "Harden to 40 HRC" changes where every finish cut happens.
- Identify the material and its temper first. 6061-T6 is already hardened; 316L cannot be hardened; 17-4 PH must be aged.
- Rough machine first, then heat treat, then finish machine. Leave uniform stock so the part can move and still clean up.
- Stress relieve before the finish cuts, not after — the movement has to happen while there is stock left.
- Account for quench distortion in the design, especially on parts with mixed section thicknesses or sharp corners.
- Temper everything you harden. Untempered martensite is a crack, not a part.
- Keep aluminum stress relief below the aging temperature or you destroy the T6 temper.
- Inspect hardness after the cycle, not once at the end. A part that missed the hardness spec is scrap by finish machining.
"Heat treatment is the one operation that changes a part you already made. The shop that treats it as a sequence — rough it, stabilize it, then cut it to size — gets a part that is straight, hard where it should be, and on tolerance. The shop that treats it as an afterthought gets a warped, cracked, or soft part and a lesson in why the oven comes before the finish pass. The metal does not care about the schedule; it only cares about temperature, time, and how evenly you got there."
Heat treatment sits between machining and everything the part does in service, and getting it right is less about the furnace than about the plan. Pick the treatment by what the part actually needs — stress relief to stay stable, hardening to survive load, or both — and place it in the sequence where its movement can be cleaned up. Do that, and the same part comes off the machine straight, on size, and with the hardness the drawing actually asked for.
If you are quoting a part with a heat-treat call-out and want the machining — and the stress relief, hardening, and final sizing that follow it — planned as one sequence instead of rediscovered on the floor, send the drawing over and we will walk you through the order of operations, from our materials range through CNC milling to final hardness, before a single part ships.