Master CNC
Blog · 5 min read · 26 Oct 2026

G43 tool length compensation and G49

Every tool in a machining centre has a different length. G43 tells the control to add that tool's length offset, so Z0 is the top of the part for every tool. Get it wrong and the first Z move goes into the part or the vise.

How it works

T5 M06
G90 G54 G00 X0 Y0 S2000 M03
G43 H05 Z50. M08  (apply length offset 5, go to Z50)
  • G43 switches length compensation on, in the positive direction.
  • H05 is the offset register to use. Keep it the same as the tool number: tool 5, H05.
  • The offset is applied with a Z move in the same block. Make that first move to a safe height above the part.
  • G49 cancels it. Many programmers put G49 in the safe start line and before going home.
Tool change, then G43 H05 Z50 applies the tool length offset; H must match the tool
Length offset on, with a safe Z move.

What is in the H register?

It depends on how your shop measures tools:

  • Gauge line method: H is the length from the spindle gauge line to the tool tip (positive, for example 128.452). G54 Z holds the distance from the gauge line at machine zero down to the part top. Tools can be measured on a presetter or a tool setter, independent of the job.
  • Part-top method: H is the distance the spindle must move from machine Z0 down to touch the part top (negative). G54 Z is 0. Simple, but every tool must be re-touched for a new setup height.

Both work; mixing them on one machine does not. More in work offset vs tool offset.

Wear

The length offset page usually has a wear column too. If a pocket is 0.03 mm too shallow with tool 5, put −0.03 in its length wear: the tool goes 0.03 deeper.

Check before cutting

  1. After G43 H05 Z50., stop (single block) and check the distance from the tool tip to the part top: it should be 50 mm. A ruler or a 50 mm gauge block is enough.
  2. Look at the absolute Z on the screen: it should read 50.000.

Common mistakes

  1. H does not match the tool (T5 with H06): the tool is the wrong length by the difference.
  2. No G43 at all: Z positions are measured from the spindle face, not the tool tip.
  3. G43 without a Z move: on some controls the offset is only applied at the next Z move.
  4. G44 by mistake: negative compensation, the offset subtracts.
  5. Copying a program to another machine where tools sit in different pockets.

A wrong H is one of the most common crash causes on machining centres. Prove the first move of every tool in single block.

Try it in Master CNC

Calculators, process sheet to program, simulation, codes and lessons. Free to start, no sign-in, on phone and laptop.

Open the app