Enjoy 10% off your first order with code FIRST10, max $500 discount. Start an Instant Quotehello@rivcut.com

Heat Treatment Guide for CNC Parts: When and How to Harden

Heat treatment changes how your metal part performs. This guide covers annealing, hardening, tempering, case hardening and stress relief -- with temperature tables and timing for each process.

A large metal object with a lot of fire coming out of it

Photo by NIloy Tanvirul on Unsplash

Annealing

Annealing makes metal softer and easier to machine. You heat the part slowly, hold it at temperature, then cool it slowly. This relieves internal stresses and refines the grain structure.

Use annealing when your raw stock is too hard to machine well. It reduces tool wear and gives better surface finish.

Material Anneal Temp (F) Hold Time Cooling
1018 Steel 1550-1600 1 hr per inch Furnace cool
4140 Steel 1525-1575 1 hr per inch Furnace cool
4340 Steel 1500-1550 1 hr per inch Furnace cool
O1 Tool Steel 1400-1450 1 hr per inch Furnace cool
A2 Tool Steel 1550-1600 1 hr per inch Furnace cool (40F/hr max)
6061 Aluminum 775 2-3 hrs Air cool

Hardening

Hardening makes steel much harder and stronger. You heat the steel above its critical temperature, then quench it fast in oil, water, or air. The rapid cooling locks the crystal structure into a hard state.

Not all steels can be hardened. You need carbon content above 0.3% for meaningful hardening. Low carbon steels like 1018 won't get very hard through this method.

Steel Harden Temp (F) Quench As-Quenched HRC
1045 1475-1550 Water 50-55
4140 1525-1575 Oil 54-59
4340 1500-1550 Oil 55-60
O1 1450-1500 Oil 63-65
A2 1750-1800 Air 62-64
D2 1825-1875 Air 62-64
Important

Never use a hardened part without tempering first. As-quenched steel is extremely brittle. It can crack under impact or even from thermal shock.

Tempering

Tempering reheats hardened steel to a lower temperature. This reduces brittleness while keeping most of the hardness. The higher you temper, the softer and tougher the steel gets.

Always temper within 1-2 hours after quenching. Waiting too long can cause cracks.

Temper Temp (F) Resulting HRC (4140) Best For
300-400 52-56 Cutting tools, dies
400-600 48-52 Springs, hand tools
600-800 42-48 Shafts, gears
800-1000 35-42 Structural, impact resistant
1000-1200 28-35 Maximum toughness
Pro Tip

When you specify hardness on a drawing, give a range like "48-52 HRC." A single number like "50 HRC" is impossible to hit exactly. A range gives the heat treater room to work.

Case Hardening

Case hardening makes the outside hard while keeping the inside soft and tough. This gives you the best of both worlds: a wear-resistant surface with a ductile core that won't crack.

Carburizing

Carburizing adds carbon to the surface of low-carbon steel. The part sits in a carbon-rich atmosphere at 1650-1750F for hours. Carbon soaks into the surface 0.010-0.060 inches deep. Then you quench and temper as normal.

Best for: gears, shafts, pins and bearings.

Nitriding

Nitriding diffuses nitrogen into the surface at lower temperatures (925-1050F). It produces a very hard, thin case (0.005-0.030 inches). The big advantage: parts don't need quenching, so there's almost zero distortion.

Best for: precision parts that can't tolerate distortion.

Induction Hardening

Induction hardening uses an electromagnetic coil to heat only the surface of the part. Then it's quenched with water spray. You can harden specific areas while leaving the rest soft.

Best for: shafts, pins and areas that need localized wear resistance.

Stress Relief

Stress relief removes internal stresses from machining, welding, or forming. You heat the part to 1000-1200F, hold it for 1-2 hours, then cool slowly.

Internal stresses cause parts to warp or move during final machining. Stress relief prevents this. It's common for large parts, thin-walled parts, or anything with tight tolerances.

The typical workflow: rough machine, stress relieve, then finish machine to final dimensions. This gives the best dimensional stability.

Before vs After Machining

This is the most common question in heat treatment: should you machine first or heat treat first? The answer depends on final hardness.

Final Hardness Approach Why
Below 35 HRC Machine, then heat treat Soft enough to machine with carbide tools after heat treat if needed
35-45 HRC Machine, then heat treat Standard carbide tools still work; add grinding stock on critical surfaces
45-55 HRC Heat treat, then hard mill or grind Too hard for standard tools; need CBN or ceramic inserts
Above 55 HRC Heat treat, then grind only Only grinding can cut this hard; add 0.005-0.010" stock
Grinding Stock Rule

Always add 0.005-0.010 inches of grinding stock on critical surfaces before heat treatment. Parts grow and distort during heat treat. Grinding stock lets you bring everything back to spec after.

Frequently Asked Questions

Should I heat treat before or after CNC machining?

If final hardness is below 45 HRC, machine first and heat treat after. Above 45 HRC, heat treat first and finish with grinding or hard milling. Very hard parts (above 55 HRC) always need grinding after heat treatment.

What is the difference between hardening and tempering?

Hardening heats steel above its critical temperature and quenches it fast. This makes it very hard but brittle. Tempering reheats to a lower temperature to reduce brittleness. You almost always do both together.

Does heat treatment change part dimensions?

Yes. Parts typically grow 0.0005-0.002 inches per inch. They can also warp, especially thin sections. Add grinding stock on critical surfaces and machine to final size after heat treatment.

What is case hardening?

Case hardening makes the outside of a part hard while the inside stays soft and tough. Methods include carburizing, nitriding and induction hardening. It's used for gears, shafts and pins.

When should I use stress relief?

Use stress relief when your part has tight tolerances and multiple machining steps. Rough machine, stress relieve at 1000-1200F, then finish machine. This stops the part from warping during final cuts.

RivCut
RivCut Engineering Team
Reviewed by Jimmy Ho, Founder & CEO

Our team combines 30+ years of CNC machining expertise across aerospace, defense, medical and automotive industries. We write what we know -- from the shop floor.

Get Your Parts Machined and Heat Treated

Upload your CAD file and specify your hardness requirements. We coordinate machining and heat treatment under one roof.

No minimums · 100% Made in USA · Never brokered · Ships anywhere in the US