G41 and G42 cutter compensation on a mill
With cutter compensation you program the part outline, not the path of the tool centre. The control offsets the path by the tool radius stored in a D register. Change to a different cutter, or correct a size, and you only change one number.
The codes
- G41: tool to the left of the programmed path, looking in the direction of travel.
- G42: tool to the right of the path.
- G40: cancel.
- D_: the offset register with the tool radius (or diameter, depending on a parameter).
With the spindle in M03, G41 gives climb milling, which is usually what you want (see climb vs conventional).

Example: outside contour of a 60 × 40 block
T5 M06 (D10 END MILL) G90 G54 G00 X-20. Y-20. S4000 M03 G43 H05 Z5. M08 G01 Z-5. F300. G41 D05 X0 Y-10. (lead-in, compensation on) Y40. X60. Y0 X-10. G40 X-20. Y-20. (lead-out, compensation off) G00 Z50.
The programmed points are the part corners. With D05 = 5.0 (radius of a Ø10 cutter) the tool centre runs 5 mm outside the outline.
Lead-in and lead-out rules
- Switch G41/G42 on with a straight move longer than the tool radius, starting away from the part.
- Do not start or cancel compensation on an arc: many controls give an alarm.
- Cancel with G40 on a straight move away from the part, not on the finished wall.
- For a smooth finish, lead in on an arc after the straight start-up move, tangent to the wall.
Using wear for size
The D register has a geometry and a wear part. If a pocket comes out 0.04 mm small on width (0.02 per side), put −0.02 in the radius wear: the tool moves 0.02 closer to the wall on each side. Outside contours: a part 0.04 big → −0.02 in wear.
Inside corners
The tool radius must be smaller than every inside radius of the contour. A Ø10 cutter cannot make an R4 corner: the control raises an interference alarm (see program alarms).
CAM and compensation
CAM systems can output "computer" compensation (tool centre path, no G41) or "control" compensation (outline with G41). Many shops use "wear" mode: CAM outputs the tool centre path with G41 and D = 0, so the operator can still correct size with wear.
Common mistakes
- Wrong D number, or D = diameter where the control expects radius.
- Lead-in move shorter than the radius.
- G42 by habit: conventional milling.
- Forgetting G40 before the next tool.
On a lathe the same idea is nose radius compensation: G41/G42 on a lathe.
Calculators, process sheet to program, simulation, codes and lessons. Free to start, no sign-in, on phone and laptop.
Open the app

