Cutter compensation explained: G41, G42 and G40 on a CNC mill
Cutter compensation in 90 seconds, with narration. Press play to watch.
A mill program describes the part. The machine, though, positions the centre of the tool. If the program sends the centre of a 1/2” end mill straight down the part line, every wall ends up 0.250” off: an outside profile comes out 0.500” small across, and a pocket comes out 0.500” big. Cutter compensation fixes that. It’s also called cutter radius compensation (CRC), tool radius compensation or just cutter comp. You program the part line, and the control moves the tool over by its radius, onto the side you choose.
G41, G42 and G40
- G41: cutter comp left. The tool runs on the left of the programmed path.
- G42: cutter comp right. The tool runs on the right of the programmed path.
- G40: cancel. The tool centre goes back to running on the programmed point.
Left and right are seen looking along the direction of travel, as if you were riding behind the tool, not looking at the screen or the machine. That’s why the same profile can need G41 or G42: reverse the direction you cut it in and the side flips.
Climb or conventional
With the spindle turning clockwise (M03) and an ordinary right-hand cutter:
- G41 = climb milling. Run an outside profile clockwise, or a pocket counterclockwise.
- G42 = conventional milling. The other way round.
Most finishing passes on a rigid CNC mill are climb cuts, so G41 is the one you’ll write most often. Use G42 when you want a conventional cut on purpose, for example on a hard scale skin or a less rigid setup.
The D offset
G41 D01 tells the control which offset holds the tool size. The control looks the value up in the tool offset table, so the program never contains the tool size itself.
- Haas mills keep a diameter by default, with a geometry column and a wear column. Setting 40 (Tool Offset Measure) switches the table between diameter and radius.
- Fanuc mills usually keep a radius in the D offset. Check how your machine is set up before you type a number.
The wear column is where you size the part. Say an outside profile measures 0.0010” big across. Each wall is 0.0005” too far out, so the tool needs to act 0.0005” smaller in radius. That’s −0.0010 in diameter wear on a Haas, or −0.0005 on a Fanuc that keeps a radius. A negative wear removes more on an outside profile and opens up a pocket. You don’t have to edit the program or re-post it from CAM.
Write the D number to match the tool, so T1 uses D01. If the D points at another tool’s offset, the control compensates for the wrong cutter.
Turn it on safely
Comp doesn’t switch on in place. The control needs a move to get the tool over to its offset position. These rules keep that move from cutting into the part:
- Start comp on a straight move (G00 or G01), never on an arc. Both Haas and Fanuc alarm when G41, G42 or G40 is on a G02/G03 block.
- Make the lead-in longer than the tool radius, and start it away from the part. On a Haas, a comp start move shorter than the radius gives alarm 367, Cutter Comp Interference.
- Cancel with G40 on a straight move away from the part, after the last cut. Cancel it before a tool change, a G28 home return or the end of the program. On a Haas, M30 or M02 with comp still on is an alarm.
Here’s a complete Haas program that cuts a 3.000” × 2.000” outside profile, 0.250” deep, with a 1/2” end mill. It climb-cuts clockwise with G41.
%
O01050 (OUTSIDE PROFILE - CUTTER COMP G41 - HAAS)
(STOCK 3.5 X 2.5 X 1.0 - X0 Y0 LOWER LEFT CORNER - Z0 TOP)
(PART 3.0 X 2.0 - 0.25 DEEP)
(T1 1/2 FLAT END MILL - FLUTE 1.0 - STICK OUT 1.5)
G20 G17 G40 G49 G80 G90
T1 M06
G54 G00 X-0.5 Y-0.5 S4000 M03
G43 H01 Z1. M08
Z0.1
G01 Z-0.25 F15.
G41 D01 X0.25 Y0. F20.
Y2.25
X3.25
Y0.25
X0.
G40 X-0.5 Y-0.5
G00 Z1. M09
G28 G91 Z0. M05
G90
M30
%
The tool feeds down to depth at X-0.5 Y-0.5, clear of the part. The G41 D01 move is 0.90” long, well over the 0.250” radius, and it ends at the start of the first wall. The tool then goes clockwise round the part. The last wall runs past the start corner to X0., and G40 takes the tool back out to X-0.5 Y-0.5 before it retracts. Run it in NC Proof Mill and it finishes with no errors or warnings.
Now the same profile with two common mistakes: the tool starts too close to the part, and the program ends without G40.
%
O01051 (CUTTER COMP MISTAKES - HAAS)
(STOCK 3.5 X 2.5 X 1.0 - X0 Y0 LOWER LEFT CORNER - Z0 TOP)
(T1 1/2 FLAT END MILL - FLUTE 1.0 - STICK OUT 1.5)
G20 G17 G40 G49 G80 G90
T1 M06
G54 G00 X0.1 Y-0.05 S4000 M03
G43 H01 Z1. M08
Z0.1
G01 Z-0.25 F15.
G41 D01 X0.25 Y0. F20.
Y2.25
X3.25
Y0.25
X0.
G00 Z1. M09
M30
%
NC Proof Mill flags both:
- Line 11, warning: the comp start move is 0.1581” long, shorter than the 0.2500” tool radius. The tool can’t reach its offset position going forward, so it moves backward.
- Line 17, error: M30 with cutter comp G41 still on. The Haas control alarms.
Inside corners and small arcs
On an outside profile the tool can always get round a corner. On the inside it can’t get into a corner tighter than itself:
- An inside arc smaller than the tool radius can’t be cut. A 0.125” corner radius with a 1/2” end mill (0.250” radius) is an alarm on the control, not a smaller corner. Use a smaller tool, or make the corner radius at least the tool radius. Making it a little bigger is better, so the tool doesn’t wrap the whole corner at full engagement.
- A move shorter than the tool radius between two inside corners leaves the tool nowhere to go without cutting into the next wall. The control alarms (Haas: 367 Cutter Comp Interference) or the part is gouged.
NC Proof Mill checks both on every compensated move. It reports the arc radius against the tool radius, and the line number, so you know which corner to fix.
Check it before Cycle Start
Cutter comp mistakes tend to show up at the worst moment: first part, first wall, with the spindle running. NC Proof Mill runs the compensated path the way the control would and draws it in 3D on the stock. It reports:
- a comp start or end on an arc;
- a lead-in shorter than the tool radius;
- inside arcs smaller than the tool;
- moves too short to compensate;
- a D number that doesn’t match the tool, or D00;
- comp left on through a tool change, G28 or M30;
- on Fanuc, too many blocks in a row with no X/Y move while comp is on.
In Stock & tools, each tool has a D offset field, so you can try the program with a worn or undersize cutter. You’ll see exactly how far the walls move.
Cutter compensation FAQ
What is the difference between G41 and G42? G41 puts the tool on the left of the programmed path and G42 on the right, seen looking along the direction of travel. With the spindle in M03 and a right-hand cutter, G41 gives climb milling and G42 gives conventional milling.
What does G40 do? G40 cancels cutter compensation, so the tool centre runs on the programmed point again. Program it on a straight move away from the part, before a tool change, a G28 home return or the end of the program.
Is the D offset a radius or a diameter? On a Haas mill it is a diameter by default; Setting 40 (Tool Offset Measure) switches it to radius. On most Fanuc mills the D value is a radius. Check how your machine is set before entering a value.
Why does the control alarm when cutter comp turns on? The usual causes are a lead-in move shorter than the tool radius, comp turned on or off on an arc, an inside arc smaller than the tool radius, or a move too short to compensate. On a Haas this is alarm 367, Cutter Comp Interference.
How do I make a profile smaller with cutter comp? Enter a negative value in the wear column of the D offset. On a Haas in diameter mode, -0.0010 makes an outside profile 0.0010 in smaller across (0.0005 in per wall) without editing the program.
Paste your own profile into NC Proof Mill and watch the compensated path before it goes to the machine. The user guide explains the rest of the app.