G-code reference

G49 G-Code: Tool Length Compensation Cancel

Tool Length Compensation Cancel — Cancels G43/G44 tool length offset. It is typically placed in safe start lines and before tool changes.

By cnccode · Updated
PropertyValue
CodeG49
FunctionTool Length Compensation Cancel
Modal group08
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG49

What does G49 do?

Cancels G43/G44 tool length offset. It is typically placed in safe start lines and before tool changes.

G49 is modal: once programmed it remains in effect for the following blocks until another code from modal group 08 replaces it or the control is reset.

Syntax and parameters

Format
G49

G49 example program

Example
G91 G28 Z0
G49
G90

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Cancelling with a Z move active causes a sudden Z jump on some controls — cancel at home.

Controller compatibility

G49 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G49 modal?
Yes. G49 belongs to modal group 08 and stays active until another code of that group is programmed.
What does G49 mean in CNC?
G49 means Tool Length Compensation Cancel. Cancels G43/G44 tool length offset. It is typically placed in safe start lines and before tool changes.
What is the difference between G49 and G43?
G49 is Tool Length Compensation Cancel, while G43 is Tool Length Compensation (+). See the G43 page for its syntax and examples.
Can I use G49 on a lathe?
Usually not with the same meaning: G49 is documented here for milling machines. Check your control manual for the equivalent.