G-codeCompensationModal group 8Mill

G43, G44 & G49: Tool Length Compensation

G43 tells the control how far the tool sticks out of the spindle, so a programmed Z-25 puts the tool tip 25mm below your part zero regardless of which tool is loaded. G49 cancels it. G44 applies the same offset in the opposite direction and you will almost never use it.

Syntax

G43 H__ Z__     Apply tool length offset, positive direction
G44 H__ Z__     Apply tool length offset, negative direction
G49             Cancel tool length compensation

Parameters

AddressMeaningNotes
HOffset register numberMatch to the tool number by convention: T01 uses H01
ZTarget Z positionThe offset is applied on this move, not before it

Example

O0001 (FACE AND DRILL)
G21 G17 G40 G49 G80 G90          (safe start block)
T01 M06                          (25mm face mill)
G54                              (work offset)
S2200 M03                        (spindle on)
G00 X-40. Y0.                    (position clear of part)
G43 H01 Z50. M08                 (comp on, well above part, coolant)
G01 Z0. F800                     (to face height)
X140. F1200                      (cut across)
G00 Z50.                         (retract)
G49                              (cancel comp)
G91 G28 Z0.                      (home Z)
M30

Controller differences

ControlBehaviour
FanucThe offset goes in on the G43 block itself, so G43 H01 Z50. arrives at Z50 with tool 1's length already applied. On some Fanuc controls a G43 H01 block with no Z word moves Z by the whole offset there and then. In a drilling canned cycle the offset is applied on the positioning move to R.
HaasM30 cancels the tool length offset whichever way Setting 56 is set. Setting 56, M30 Restore Default G, decides whether the rest of the modal G codes go back to their defaults at M30, G54 and G80 among them, so a program that leans on modal state left over from the last one behaves differently with it on and off.
Siemens 840DISO mode accepts G43 and H. The native Siemens dialect uses D numbers against the tool (T1 D1) and has no G43 at all. Post-processor dependent.
MazakMazatrol conversational handles this in the tool data page; G43 only applies in EIA/ISO mode.
OkumaOn an OSP mill the tool length offset codes are G53 to G59, so a G54 posted for a Fanuc work offset calls a tool length offset there instead. Work coordinate systems are selected with G15 and an H number.

What goes wrong

The big one is writing G43 with no Z word on the block. The offset goes in on the block where you write it, not on some later Z move, and on some Fanuc controls a bare G43 H01 moves Z by the whole offset there and then, from wherever the tool happens to be. With 125mm of tool that is a 125mm jump nobody gave a target. Put the Z on the same line, G43 H01 Z50., so the one move the block makes ends 50mm clear of the part, every time, no exceptions.

Second is T and H drifting apart. Convention says T01 uses H01, and it holds right up until someone renumbers tools mid-job or copies a program from another machine. Then you're cutting with tool 4 using tool 2's length. If it's shorter you get a shallow part and scratch your head. If it's longer you find out immediately.

Third is the offset table itself. Length and wear live in separate columns, and typing 125.6 into wear instead of geometry is a quiet way to lose an afternoon. Check which column you're in before you touch anything.

Last, don't rely on the machine cancelling comp for you at a tool change. Some do, some don't. A Haas drops the length offset at M30 whichever way Setting 56 is set, and the setting decides only whether the rest of the modal state, G54 and G80 included, survives into the next program. Put G49 in your safe start block and put it in your program ending. It costs nothing and it means a stale offset never carries into the next tool.

Updated 11 Oct 2026