CNC mill · G-code
G43: tool length compensation
G43 adds the tool length offset to Z so programmed Z values are at the tool tip. G49 cancels it. Haas lists it in modal group 08. Formats below from Haas, LinuxCNC and Fanuc, each from its maker.
Worked example
Pick up tool 3's length before the first Z move. Written for this page in the Haas format.
T3 M06G00 G90 G54 X0 Y0S2500 M03G43 H03 Z0.1 (length offset 3, rapid to 0.1 above Z0)How each control writes it
Haas G43 H- Z-
One source: Haas Automation, the control's maker
- H
- Tool length offset number (non-zero)
- G44 subtracts the offset instead.
- From NGC software 100.21.000.1100 the offset is always applied unless G49 / H00 is commanded, and follows each tool change.
Source: Haas Automation, mill G43
LinuxCNC G43 <H->
One source: the LinuxCNC project, the control's maker
- H
- Tool number whose length is used; without it, the tool loaded by the last Tn M6 (optional)
- G43 causes no motion: the next Z move is compensated.
- H is a tool number, not an offset register.
Source: LinuxCNC documentation, "G43 Tool Length Offset" (archived Oct 29, 2026)
Fanuc G43 Z_ H_ ;
One source: FANUC, the control's maker
- Z
- The Z move made with the offset applied
- H
- Offset number holding the tool length
- FANUC 0i-MF (machining centre), from its operator’s manual. On another FANUC model, check that control’s manual.
- G44 subtracts the offset where G43 adds it. G49 or H0 cancels.
Source: FANUC B-64604EN-2/01, Operator's Manual, 0i-MF (machining centre), §6.1
How the controls differ
- Only Fanuc takes Z.
- A word two controls share can still mean different things: read each control's list above.
Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.