G49 cancels tool length compensation on your CNC machine. Once you call it, the machine stops accounting for any H offset. From that point on, it moves the spindle nose — not the tip of the cutting tool — to each programmed location.
You’ll almost always be running a tool. So G49 isn’t something most programmers use all the time. But it’s worth understanding so you know what it does and how to use it safely if you need it.
Key Takeaways
- G49 cancels tool length compensation
- After G49, the machine moves the spindle nose, not the tool tip
- It’s rarely required — most programs never call it at all
- Some machines immediately shift position when G49 is called, which can cause a crash
- Tool length comp is also cancelled by M30, a control reset, or by calling H0
| G49 – At A Glance | |
|---|---|
| Function | Cancel tool length compensation |
| Type | Modal (Group 8) |
| Cancelled by | G43, G44 |
| Related codes | G43, G44, H code |
What does G49 do?
G49 turns off tool length compensation. That means the machine no longer adjusts for the physical length of the cutting tool.
When you use a G43 or G44 code, you’re telling the machine: “This tool is a certain length — account for it when you move in Z.” G49 cancels that. The machine goes back to moving the raw spindle position with no offset applied.
What is tool length compensation?
Tool length compensation is how your CNC accounts for the fact that every cutting tool is a different length. You measure each tool and enter that value into the offset library as an H offset.

When you program G43 H02, you’re saying: “Turn on tool length compensation using offset number 2.” The machine reads that value and adjusts all Z moves accordingly.

This is important because your program is written to a specific reference point — usually the top of the part. Without tool length compensation, the machine has no idea how long the tool is and can’t hit the right depth.
Where do you actually see G49?
Most programs don’t call G49 at all.
You’ll almost always have a tool loaded, and you’ll almost always want the machine to account for that tool’s length. Canceling that compensation mid-program is rarely useful.
Some programmers include G49 in their safety block — a group of codes at the start of a program that resets the machine to a known state. Others skip it and just make sure the correct H offset is called whenever they change tools.
As long as you’re calling the right offset for the currently loaded tool, G49 is optional.
Code examplE
Here’s a typical tool change section where G49 would appear:
G49 (Cancel tool length compensation)
G91 G28 Z0 (Return to machine home in Z)
M06 T02 (Tool change to tool 2)
G90 G54 G00 X0 Y0 (Move to part zero)
G43 H02 Z1.0 (Apply tool 2 length offset, move to clearance)
G49 is called before the Z home move. That clears the old offset before the machine moves. Then G43 is called again with the new tool’s H value.
COMMON MISTAKE – Calling G49 while the tool is still near the part
On some controls, canceling tool length compensation causes an immediate Z-axis shift — because the machine moves to where the spindle nose would have been, not where the tool tip is.
If you’re anywhere near the workpiece, this can cause a crash. Always retract Z to a safe clearance height before calling G49.
Try it yourself
Other CNC cancel commands
Code | Description |
G40 | Cancel cutter compensation |
G49 | Cancel tool length compensation |
G50 | Cancel scaling |
G67 | Cancel custom macro call |
G69 | Cancel rotation |
G80 | Cancel canned cycles |
Codes that do the same thing
You don’t have to use G49 to cancel tool length compensation. These will also cancel it:
- M30 — End of program / rewind also resets TLC
- H0 — Calling a height offset of zero effectively cancels compensation
- Control reset — Pressing reset on the control clears active offsets on most machines
If you’re switching tools, calling G43 H[new offset number] is the cleanest approach — you don’t need to cancel first.
FAQS
What does G49 do in CNC?
G49 cancels tool length compensation. After G49 is called, the machine moves the spindle nose to programmed positions instead of the cutting tool tip.
Do I need G49 in every program?
No. Most programs don’t use G49 at all. As long as you’re calling the correct H offset for each tool, there’s no need to cancel tool length compensation between tool changes.
What happens if I call G49 while the tool is near the part?
On some machines, calling G49 mid-program causes the Z-axis to shift immediately. This can result in a crash if you haven’t retracted to a safe height first. Always move Z to a clearance position before calling G49.
What’s the difference between G43 and G49?
G43 turns tool length compensation ON using a specified H offset. G49 turns it OFF. You’ll use G43 at the start of a tool path; G49 is used when you want to cancel that offset before a tool change or end of program.