G40 G41 G42 Cutter Compensation

Cutter compensation offsets the tool from the programmed path by its radius, so you can program the finished part edge and let the control account for the actual tool size. Change tools or regrind and you only update the offset, not the program.

Code Action
G40 Cancel compensation
G41 Compensate left of the path
G42 Compensate right of the path

How it works

  • G41/G42 reference a diameter or radius offset register, usually called with a D word.
  • Engage and cancel compensation on a straight lead-in or lead-out move, never inside an arc.
  • Left or right is judged looking in the direction of travel.
G41 D01 X0.0 Y0.0 (turn on, comp left)
G40 X-0.5 (cancel on the way out)

FAQ

What’s the practical benefit of using cutter compensation instead of programming the exact tool path? Cutter compensation lets you program the actual part geometry rather than calculating an offset toolpath by hand, and lets you adjust for a different actual tool diameter, from wear or a tool change, just by changing the offset value, without reprogramming the path.

Related: plane selection.

Left or right of the path

Cutter compensation offsets the tool from the programmed path by its radius so the program can follow the part outline directly. G41 puts the tool to the left of the path in the direction of travel and G42 to the right. With a clockwise spindle, G41 produces climb milling. The offset value is called with a D number from the offset table.

Using it safely

Turn compensation on with a move that is long enough for the control to establish the offset, typically at least as long as the tool radius, and away from the part. Turn it off with G40 on a move away from the finished part. If an inside corner is smaller than the tool radius, the control may alarm or gouge the part. Wear offsets let you fine tune the finished size without changing the program.

Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.