GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Machine Setup

CNC Z-axis calibration techniques

The Z axis sets depth, and depth sets every tolerance downstream. This guide covers the five CNC Z-axis calibration techniques we run on 3-axis and simultaneous 5-axis machines, the numbers that tell you when a machine has drifted, and the parts where Z error hurts most.

±0.005 mm tolerance16 five-axis centers100% inspection12-hour quote
CNC Z-axis calibration techniques: key steps on a machining center
Quick answer

Key takeaways

Z error is depth error0.02 mm of drift becomes 0.02 mm of wrong pocket depth or a scrapped floor.
Tool length is the first suspectRe-measure the tool before you touch the machine parameters.
Thermal drift is the usual causeA spindle that ran two hours is not the spindle you probed at 8 a.m.
Probing beats dial gaugesRepeatability under 2 μm is enough to trust the number you write down.
Five-axis needs pivot checksOn a tilting head or trunnion, Z is only correct for one rotary position.
Basics

What CNC Z-axis calibration techniques actually correct

The Z axis controls depth. Every pocket floor, every step, every drilled hole depth depends on the machine knowing exactly where the spindle nose sits relative to the table. If that number is wrong, the error shows up in the part, not in the control.

Calibration here means three separate corrections. Tool length offset tells the control how long the tool is. Work offset (G54 and its siblings) tells it where the part is. Thermal and mechanical compensation tells it how the machine has moved since the last measurement. Skipping any one of them leaves a residual error that no cutting strategy can fix.

A useful rule for production floors: the total Z uncertainty budget should sit at one third of your tightest depth tolerance. If a part calls for ±0.05 mm on a floor depth, keep total Z uncertainty under ±0.015 mm. Beyond that, you are gambling on luck, not on process control.

This matters most on parts where Z error is invisible until assembly: mold cavities, seal grooves, bearing seats, and any mating face that sets stack height. Those are the jobs where a 0.02 mm drift turns into a rejected lot.

  • 1
    Tool length offsetMeasured per tool, per holder, per machine.
  • 2
    Work offsetSet from a probed or indicated datum on the part.
  • 3
    CompensationThermal growth and backlash correction applied at the control.
Symptoms

How to tell a Z problem from everything else

Before you re-calibrate anything, confirm the error is actually in Z. A wrong X or Y position can look like a depth problem when the tool enters a sloped wall. Check the simplest evidence first: measure the same feature on three parts cut at different times of day.

If the error grows through the shift, thermal drift is the likely cause. If the error appears immediately after a tool change, the tool length offset or the holder is at fault. If the error only appears on one side of the table, the machine geometry or table flatness is suspect, not the offset.

Backlash and lost motion deserve their own test. Approach a Z datum from above and then from below, and compare the two readings. A difference above 0.01 mm means the thrust bearing, ball screw, or coupling needs attention before calibration will hold.

One more trap: chips under the tool holder taper. A single chip can shift tool length by 0.01 mm to 0.03 mm. Clean the taper, re-seat the holder, and re-measure before you decide the machine has drifted.

  • 1
    Drifts during the shiftThermal growth in spindle and ballscrew.
  • 2
    Jumps after tool changeHolder, pull stud, or offset entry.
  • 3
    One side of the table onlyGeometry or table flatness, not offset.
  • 4
    Different from above vs belowBacklash or lost motion in the Z drive.
Equipment

Tools and reference standards to keep at the machine

A calibration routine is only as good as its references. A granite surface plate, a certified height master or gauge block stack, and a spindle-mounted probe cover most of what a job shop needs. For five-axis work, add a certified sphere for pivot and rotary center checks.

Dial test indicators and test bars still have a place. Use them to verify that the probe is telling the truth, not as the primary measurement. A probe with a dirty stylus tip will report a clean, confident, wrong number.

Log everything. Date, machine, ambient temperature, spindle run time, tool number, measured value, and correction applied. After a few weeks the log tells you the thermal time constant of each machine, and you can schedule warm-up instead of chasing drift.

On our own floor we keep 16 simultaneous 5-axis machining centers and 127 CNC machines in total, so the log is not paperwork. It is how we decide which machine gets a warm-up cycle before a tight-tolerance job.

  • 1
    Granite plate and height masterThe ground truth for Z length checks.
  • 2
    Spindle probeFast, repeatable, and it must be verified.
  • 3
    Certified sphereFor rotary and pivot center checks on 5-axis.
  • 4
    Calibration logTurns drift into a predictable schedule.
Five-axis

Where 5-axis Z calibration gets harder

On a 3-axis machine, Z is one linear axis. On a tilting head or trunnion machine, the Z reading is only valid for one combination of A and C positions. Move the rotary axes and the true tool tip position moves with them.

That is why five-axis calibration adds pivot distance and rotary center checks. Pivot distance is the distance from the spindle gauge line to the center of rotation. Get it wrong by 0.05 mm and a tilted cut face is off by a visible amount on a 100 mm part.

Rotary center error shows up as a mismatch between features cut at different table angles. Rough the part at one angle, finish it at another, and the two operations no longer line up. For high-value work, verify the rotary centers whenever a machine has been crashed or moved.

A practical limit: if your rotary positioning repeatability is worse than 5 arc-seconds, chasing a 0.005 mm Z target is wasted effort. Fix the mechanical issue first. On our 5-axis cells we hold ±0.005 mm on critical features and Ra 0.8–1.6 μm on machined faces, and both numbers depend on the pivot checks being current.

  • 1
    Pivot distanceSpindle gauge line to center of rotation.
  • 2
    Rotary centerVerify after any crash or relocation.
  • 3
    Angle-dependent errorFeatures cut at two angles no longer match.
  • 4
    Repeatability firstBelow 5 arc-seconds, or fix the mechanics.
Procedure

Step-by-step CNC Z-axis calibration techniques

Run in this order. Each step assumes the previous one passed.

  • 1
    Warm up the spindleRun the spindle at a mid-range speed for 20–30 minutes and exercise Z through its full travel. A cold machine grows 0.01–0.03 mm in Z over the first hour of cutting, so calibrate warm, not cold.
  • 2
    Clean every interfaceWipe the spindle taper, holder taper, and pull stud with lint-free cloth and alcohol. One chip under the taper shifts tool length by 0.01–0.03 mm. Check the holder for fretting or scoring while it is out.
  • 3
    Measure tool lengthSet each tool on the presetter or against a granite plate with a height master. Record the value and enter the offset. Repeat the measurement twice; if the two readings differ by more than 0.005 mm, find out why before moving on.
  • 4
    Verify the probeTouch off a certified gauge block or height master three times and compare. Repeatability within 2 μm is acceptable. Clean the stylus tip. A bent stylus will pass a single check and fail over a shift.
  • 5
    Set and confirm the work offsetProbe the Z datum on the part, then confirm with a dial indicator on the same surface. The two methods should agree within 0.01 mm. Check that the correct work offset is active before the first cut.
  • 6
    Test backlash in ZApproach a datum from above, then from below, and compare readings. Difference above 0.01 mm means mechanical work, not offset adjustment. Do not try to hide backlash in the compensation table.
  • 7
    Cut a test featureMachine a shallow pocket or step at a known depth in the same material as the job. Measure it with a micrometer or height gauge. Adjust the offset by the measured error and repeat until the feature is within one third of the drawing tolerance.
  • 8
    Verify rotary axes (5-axis only)Check the certified sphere at two or more table angles. Confirm pivot distance and rotary centers. Re-check after any crash, spindle change, or machine move.
Judgement

Which Z check to run, and when

Match the symptom to the check before you touch offsets.

SymptomLikely causeCheck to runCorrection
Depth error grows during a shiftThermal growthRe-probe datum warm and coldAdd warm-up cycle, log drift
Error appears right after tool changeTool length offsetRe-measure tool on presetterRe-enter offset, check holder
Same feature off at two table anglesPivot or rotary centerProbe certified sphere at anglesRecalibrate pivot distance
Reading differs above vs belowBacklash or lost motionTwo-direction datum approachMechanical repair first
Error on one side of table onlyTable flatness or geometryIndicator sweep across tableLevel and re-check geometry
Error after crash, any axisMultiple offsetsFull probe and sphere routineRecalibrate all axes and offsets

Calibrate Z before the first cut, not after the first reject

If depth tolerance is tighter than ±0.05 mm, treat Z calibration as a setup step, not a repair task. Warm the machine, verify the probe, and log the number. Send us your drawings and tolerances and we will tell you which features need that discipline.

FAQs

Z-axis calibration questions engineers ask

How often should a CNC machine be Z-calibrated?

For general 3-axis work, verify Z at the start of each shift and after any crash or spindle service. For tight-tolerance production, re-probe the datum every 4 to 6 hours of cutting and log the drift.

Five-axis machines need the pivot and rotary center checks on a fixed schedule, typically monthly, plus any time the machine has been moved or crashed. If your log shows drift is small and stable, you can extend the interval with evidence rather than guesswork.

Can I calibrate Z with a dial indicator instead of a probe?

Yes, and every shop should be able to. A dial indicator on a granite plate or height master is the reference method. The catch is time: a full tool set by hand can take an hour.

Use the indicator to verify the probe, then let the probe handle routine checks. If the two disagree by more than 0.01 mm, trust the indicator until you find the cause.

Why does my Z drift overnight?

Ambient temperature is the usual answer. A shop that cools to 18 °C overnight and warms to 26 °C by afternoon moves the machine structure and the part. Steel grows about 11 μm per meter per degree Celsius.

Log the room temperature next to the Z reading for a week. If the two track each other, the fix is thermal control or a warm-up cycle, not a new offset value every morning.

Does Z calibration change with the material?

The machine offset does not care what you cut. What changes is the result: aluminium and titanium cut at different temperatures and push the tool differently. On long roughing cycles in titanium, the tool itself grows and wears, which looks like Z drift.

Measure the finished feature, not the tool. If the feature is off but the offset checks clean, the tool is the variable. Replace or re-measure it.

What tolerance can I expect after a proper Z calibration?

The machine offset can be set to a few microns. What the part sees is larger, because tool wear, fixturing, material springback, and thermal movement all add to it.

On our machines we hold ±0.005 mm on critical features and Ra 0.8–1.6 μm on machined faces, with 100% inspection before shipment and reports on request. Those numbers depend on calibration being current, not on calibration being done once.

Is Z calibration different on a mill-turn machine?

The linear Z check is the same. What changes is that the B axis and the subspindle introduce more offsets to track, and parts often transfer between spindles mid-process.

Verify both turrets or spindles against the same reference, and check the transfer position with a test part. A mismatch there produces the classic symptom: two machined faces that should be flush, and are not.

Send your drawing, get a process review

Upload your part and tolerances. We quote and return a free DFM analysis within 12 hours, and production can start within 24 hours.

12-hour quote100% inspectionNo minimum order quantityNDA on request

Follow

More machining notes from GreatLight

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC