G43 vs G44: Tool Length Compensation – Positive vs Negative Offset Explained
When programming the Z-axis in CNC, it’s critical to account for the actual length of the tool. Without this, the spindle might drive the tool too deep or too shallow — resulting in scrap or crashes.
That’s why tool length compensation exists: using G43 or G44 to apply a preset tool height to your Z moves.
⚙️ What Is Tool Length Compensation?
Your CNC controller has a tool table where each tool (T1, T2, etc.) is assigned a length value. Tool length compensation tells the machine:
“From this point on, adjust Z positions based on the length of Tool X.”
📐 G43 vs G44 Overview
| G-Code | Meaning | Offset Direction |
|---|---|---|
| G43 | Tool Length Positive | Z-axis offset positive |
| G44 | Tool Length Negative | Z-axis offset negative |
| G49 | Cancel Length Compensation | — |
G43 is by far the most common in modern CNCs.
G44 is rarely used and typically reserved for legacy systems or special inverse configurations.
🔍 G43 – Positive Tool Length Offset
🔹 Syntax:
G43 H01
H01references Tool Length Offset #1 from the controller’s tool table.
🔹 Example Usage:
%
O6001 (Tool Length Compensation - G43)
G21 G17 G90
T1 M6
G0 X0 Y0
G0 Z100
G43 H01 ; Apply tool length from offset 01
G1 Z5 F100 ; Move to Z5 considering tool length
...
G0 Z100
G49 ; Cancel compensation
M30
%
🧮 Tool Length Setup
| Tool | H-Number | Length (mm) |
|---|---|---|
| T1 | H01 | 120.000 |
| T2 | H02 | 95.300 |
| T3 | H03 | 103.000 |
Best practice:
Match T-number = H-number, e.g., T3 M6 ➝ G43 H03
🛑 What Happens Without G43?
If you forget to apply G43:
- The Z position is interpreted relative to the spindle face
- The tool might plunge into the part or hover in air
- Particularly dangerous in automatic tool changers
🔁 G44 – Negative Offset (Rare)
G44 is essentially the opposite of G43. It subtracts the offset from the Z-axis, rather than adding it.
G44 H01
Most modern machines and post-processors do not use G44.
Avoid unless explicitly required by your machine configuration.
❌ G49 – Cancel Length Compensation
Always cancel tool length offset at the end of a tool’s cycle.
G49
G0 Z100
This resets the controller’s height reference to default.
🧪 Real Example – Milling With Tool Length Comp
%
O7001 (Milling with Tool Length Comp)
G21 G17 G90
T2 M6
G0 X50 Y50
G0 Z100
G43 H02 ; Apply Tool 2's length offset
G1 Z-10 F200 ; Controlled Z-depth based on offset
...
G0 Z100
G49 ; Cancel tool length comp
M30
%
Without
G43 H02, the Z-10 command would not account for the tool’s length and could crash into the part.
💡 When Is Tool Length Set?
- During setup using a tool setter, touch probe, or manual measurement
- Values entered in machine tool table
- Sometimes set automatically by CAM post-processors
✅ Best Practices
| Practice | Why It Matters |
|---|---|
| Match T# to H# | Simplifies debugging and consistency |
| Always use G43 with Z-axis move | Applies offset in correct position |
| Cancel with G49 before tool change | Prevents lingering offsets |
| Simulate tool length before running | Avoid crashes and gouges |
| Use consistent Z reference point | Reduces mistakes across different tools |
📌 Summary Table
| G-Code | Description | Typical Use |
|---|---|---|
| G43 | Apply Positive Tool Offset | ✅ Standard |
| G44 | Apply Negative Tool Offset | ❌ Rare |
| G49 | Cancel Tool Length Comp | ✅ Required |
🔚 Final Thoughts
Tool length compensation is non-negotiable for safe and precise CNC operation. Whether you’re running a 3-axis vertical mill or a high-speed 5-axis machine, failing to properly apply G43 can destroy tooling and workpieces.
Think of G43 as “plugging in the tool’s height” before Z-axis motion.
Leave a comment