G43 and G49: Tool Length Offset
G43 tells the control how long the current tool is, using the offset in the H register. G49 cancels the offset.
Every tool sticks out of the spindle by a different amount. The control needs to know that length so that Z0 in the program means the tip of the current tool, whatever tool it is. That length is the tool length offset, measured at the machine with a tool setter or by touching off, and stored in the control's offset table.
- G43 H_: turn the tool length offset on, using the value in register
H. - G49: cancel the offset.
- G44 applies the offset in the negative direction. It is rarely used.
When to call G43
Turn the offset on on the first Z move after a tool change, while the tool is still well above the part. The usual pattern is:
T1 M6loads the tool.G0 G54 X0 Y0 S12000 M3moves to the first XY position and starts the spindle.G43 H1 Z25applies tool 1's length and moves to a safe height in one line.
From then on, every Z move is corrected for that tool. When the next tool is loaded, a new G43 with its own H replaces the offset.
Example: two tools with their own offsets
(G43 and G49 example: two tools, each with its own length offset)
G21 G17 G90 G40 G49 G80
T1 M6 (6 mm flat end mill)
G0 G54 X0 Y0 S12000 M3
(Turn on tool 1's length offset on the first Z move)
G43 H1 Z25
Z2
G1 Z-1 F300
G1 X40 F800
Y20
X0
Y0
G0 Z25
M5
T2 M6 (5 mm drill)
G0 G54 X20 Y10 S2000 M3
(A new G43 replaces tool 1's offset with tool 2's)
G43 H2 Z25
G98 G81 X20 Y10 Z-6 R2 F150
G80
G0 Z25
M5
G49
M30
Both tools rapid to the same Z25 in the program; the control raises or lowers the spindle so each tool's tip ends up there.
G49in the safety line on line 2 makes sure no offset is left over from a previous program.G43 H1 Z25applies the end mill's offset on its first Z move.G43 H2 Z25applies the drill's offset after the tool change, replacing H1.G49near the end cancels the offset before the program finishes.
Common mistakes
- Missing G43: the control runs the tool as if its length were zero, so the tip is nowhere near where the program expects. Depending on how the machine is set up, the tool cuts air or plunges into the part.
- Wrong H number: the right tool with the wrong length. Keep H equal to T unless you have a good reason not to.
- Offset never measured: a new tool with an empty offset register behaves just like a missing G43.
Machine differences
- Fanuc and Haas use G43 with an H register. G44 is supported but rarely used.
- LinuxCNC accepts
G43without an H to use the loaded tool's length,G43 H_for another tool's length, and G43.1 for a dynamic offset. - Mach3 uses G43 with H and its tool table.
- GRBL uses only G43.1 (dynamic offset) and G49. Many GRBL users skip length offsets and re-zero Z after each tool change instead.
How CutViewer shows G43 and G49
CutViewer doesn't know your tool lengths, so it doesn't apply G43 or G49. It draws Z positions as programmed, which is where the tool tip will be if your offsets are measured correctly. The tool changes appear in the Job panel's tool list, with the lines and run time for each tool.
Frequently Asked Questions
What does G43 H1 mean?
Apply the tool length offset stored in register H1. The control adds that length to every Z position, so Z0 in the program is where the tip of that tool touches the part, not where the spindle nose is.
Does the H number have to match the tool number?
No, but it almost always should. T5 with H5 is the normal convention. Using the wrong H, for example a short tool's offset with a long tool loaded, is one of the most common causes of crashes.
Do I need G49 before every tool change?
Not usually. A new G43 with a different H replaces the previous offset. Many programs only use G49 in the safety line at the start and at the end of the program. On many Fanuc-style controls, H0 also means no offset.
What is G43.1?
A dynamic tool length offset used by GRBL and LinuxCNC, where the length is given directly on the line, for example G43.1 Z-12.5. GRBL has no tool table, so this is how it applies a length offset; there is no G43 with an H register.
More G-Code Guides
Rapid positioning and straight cutting moves.
Clockwise and counter-clockwise arcs with I/J/K or R.
Pause for a set time, in seconds or milliseconds.
Choose the XY, XZ or YZ plane for arcs.
Inch or millimetre units for the program.
Return to home or a second reference position.
Cutter radius compensation, left, right and off.
Work coordinate systems and machine coordinates.
Drilling canned cycles, from plain drilling to peck drilling.
Tapping cycle, and how to work out the feed rate.
Absolute positions or incremental distances.
Set the current position by shifting coordinates.
Feed per minute, per revolution, or inverse time.
Constant surface speed or a fixed spindle RPM.
Where a drilling cycle retracts between holes.
Spindle, coolant, tool change, stop and subprogram codes.
Check your own program before you cut: open it in CutViewer to see the toolpath in 3D, the run time and any problems.
Open CutViewer