Understanding and Using G41/G42 Cutter Compensation in CNC Machining
Cutter compensation allows CNC machines to account for tool radius when generating toolpaths. Without it, your part dimensions may be incorrect — especially on internal and external contours.
This guide explains G41/G42 in detail, when to use them, and how to avoid common pitfalls.
🔧 What is Cutter Compensation?
In CNC milling, the programmed toolpath usually follows the part geometry centerline. However, because tools have physical dimensions (e.g., a 10mm end mill), we must compensate for the tool radius.
That’s where cutter compensation comes in.
🧠 G-Codes Involved
| G-Code | Meaning |
|---|---|
| G40 | Cancel cutter compensation |
| G41 | Cutter compensation LEFT of path |
| G42 | Cutter compensation RIGHT of path |
The direction (left/right) is based on tool movement, not part geometry.
🧭 G41 vs G42: Which One?
🟢 G41 — LEFT Compensation
Tool is offset to the left of the programmed path.
🔴 G42 — RIGHT Compensation
Tool is offset to the right of the path.
💡 Rule of thumb: Imagine walking along the path in the direction of cutting. G41 puts the tool to your left; G42 to your right.
⚙️ When to Use Cutter Compensation
Use G41/G42 when:
- Programming with part geometry, not tool centerline
- Compensating for tool wear or radius
- Running the same part with different tool diameters
CAM software usually handles cutter comp internally, but for manual programming or tweaks, cutter comp is vital.
🛠️ Example 1: Outside Profile Cut (Clockwise)
T1 M6 ; Tool 1 selected
G0 G90 G54 X0 Y0
G43 H1 Z50 ; Tool length offset
M3 S1000
M8
G0 X10 Y10
G1 Z-5 F100
G41 D1 ; Apply LEFT cutter comp using offset D1
G1 X100 Y10
G1 X100 Y100
G1 X10 Y100
G1 X10 Y10
G40 ; Cancel compensation
G0 Z50
M9
📝 Notes:
D1is tool radius stored in the offset table- G41 makes the machine cut outside the path, leaving correct part size
🛠️ Example 2: Inside Pocket (Counter-Clockwise)
G0 X50 Y50
G1 Z-3
G42 D1 ; Apply RIGHT comp for internal cut
G1 X80 Y50
G1 X80 Y80
G1 X50 Y80
G1 X50 Y50
G40
G0 Z50
📏 Where Is the Tool Radius Stored?
Tool radius is stored in the D-word offset register. Typically:
D1→ Offset 1 in tool tableD2→ Offset 2, etc.
These offsets contain tool radius, not diameter.
⚠️ Common Mistakes
- ❌ Applying G41/G42 too close to geometry → causes abrupt moves or errors
- ❌ Forgetting to cancel with
G40at the end - ❌ Wrong offset number (e.g., using D2 for Tool 1)
- ❌ Using wrong direction (left vs right)
✅ Best Practices
- Apply G41/G42 on a lead-in move, not on the part edge
- Always follow with
G40after the feature - Define tool radius correctly in offset table
- Avoid cutter comp on very tight curves or small radii (can cause alarms)
📐 Entry/Exit Moves for Cutter Compensation
To apply compensation safely, use lead-in and lead-out moves:
Lead-in Example:
G0 X5 Y5
G1 Z-5
G41 D1
G1 X10 Y10 ; Entry move with comp
Lead-out Example:
G1 X100 Y100
G40
G1 X105 Y105 ; Exit move after cancelling comp
🔄 G41/G42 and CAM Software
- Most CAM systems support wear compensation, meaning G41/G42 are activated but tool radius is only slightly adjusted via control
- Full compensation can be handled in the controller for on-machine tweaks
🧪 Simulation Tips
- Simulate G41/G42 paths to check for errors
- Watch out for tool crashes at corners or arcs
- Ensure controller mode matches CAM output (e.g., wear vs full comp)
🧩 When Not to Use G41/G42
- Toolpath already accounts for cutter size (CAM-based offset)
- Drilling or plunging operations
- Engraving with small tip tools
🔚 Final Words
Understanding G41/G42 is essential for any CNC programmer who wants full control over their cuts. Whether you program manually or tweak CAM output, cutter comp:
- Enables flexible tool sizing
- Helps adjust for wear on-machine
- Provides cleaner, more accurate parts
Use cutter compensation wisely — and never forget: G41 = left, G42 = right… and G40 = peace of mind.
Leave a comment