---
title: "G41 vs G42: Cutter Compensation Left vs Right"
description: "G41 offsets the cutter to the left of the path and G42 to the right. Here is how cutter compensation works, the D register, and how to engage it without a crash."
url: https://gcodepractice.com/journal/g41-vs-g42-cutter-compensation/
canonical: https://gcodepractice.com/journal/g41-vs-g42-cutter-compensation/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-04
updated: 2026-06-04
category: "Code reference"
tags: ["g-code", "g41", "g42", "cutter-comp", "beginner"]
lang: en
---

# G41 vs G42: Cutter Compensation Left vs Right

> **TL;DR** G41 is cutter compensation left and G42 is right, judged looking in the direction of travel. They offset the tool from the programmed path by its radius, stored in a D register, so you can program the part contour straight from the print. G40 cancels it. Compensation must be turned on and off in a linear lead-in or lead-out move, never during an arc.

A cutter has width, but a drawing shows a line with no width. Cutter compensation bridges that gap: it lets you program the part outline exactly as drawn and have the control automatically keep the tool's edge on that line. `G41` and `G42` choose which side of the line the tool rides.

## What cutter compensation does

Without compensation, you would have to calculate the tool-center path yourself, offsetting every coordinate by the cutter radius. With it, you program the **part contour** straight from the print, and the control shifts the tool by its radius for you. That value lives in a `D` offset register, so changing one number adjusts for a worn or different-diameter tool without touching the program. The behavior is documented in the [LinuxCNC compensation reference](https://linuxcnc.org/docs/html/gcode/g-code.html) and the standard [cutter radius compensation guides](https://www.helmancnc.com/cutter-radius-compensation-g41-g42/).

## G41 left vs G42 right

The only thing `G41` and `G42` decide is which side of the programmed path the tool sits on. The trick is the reference frame: imagine standing behind the tool, looking in the direction it is moving.

| Code | Offset side | Looking along the direction of travel |
| --- | --- | --- |
| `G41` | Left | Tool rides to the left of the path |
| `G42` | Right | Tool rides to the right of the path |
| `G40` | None | Compensation cancelled |

The side you choose, combined with the spindle direction, also determines whether you are climb or conventional milling, which is why the choice is not arbitrary. The full address grammar for these codes is summarized on the [Wikipedia G-code page](https://en.wikipedia.org/wiki/G-code).

## The D register holds the radius

Like tool length offset, cutter comp reads a stored value. Here the `D` register holds the tool's radius (or diameter on some controls). A typical engagement line looks like `G01 G41 X10. Y10. D02 F150`. That is the same idea as the `H` register in [G43 tool length offset](/journal/g43-tool-length-offset-explained/), just for radius instead of length. Keeping the three offsets straight matters:

| Offset | Code | Register | Corrects for |
| --- | --- | --- | --- |
| Work offset | `G54` | offset table | Part location |
| Tool length | `G43` | `H` | Tool length in Z |
| Cutter radius | `G41` / `G42` | `D` | Tool radius in XY |

The [work offset (G54)](/journal/g54-work-offsets-explained/) and the two tool offsets are separate systems, and beginners crash by confusing them, which is why cutter comp belongs on every list of [common G-codes for CNC beginners](/journal/common-g-codes-for-cnc-beginners/).

## Engaging and cancelling safely

The most common cutter-comp crash is turning it on or off in the wrong move. The control needs a straight **lead-in** move to ramp the tool from the programmed path out to the offset path:

```
G00 X-10. Y-10.        (approach point, off the part)
G01 G41 X0 Y0 D02 F150 (engage comp on a linear lead-in)
... contour moves ...
G01 X-10. Y-10.        (lead-out, clear of the part)
G40                    (cancel comp on the lead-out)
```

The rules that keep this safe: command `G41` or `G42` on a linear (`G00` or `G01`) move, make that move at least as long as the cutter radius, and never switch comp on or off during an arc. Cancel with `G40` on a lead-out move that takes the tool clear of the finished surface. These are exactly the kinds of setup details you learn to spot when you [read a CNC program](/journal/how-to-read-a-cnc-program-for-beginners/).

## Bottom line

`G41` is compensation left, `G42` is right, judged looking along the direction of travel. They offset the tool from the programmed path by the radius stored in the `D` register, so you can program the contour straight from the print. Engage on a linear lead-in, cancel with `G40` on a lead-out, and never toggle comp during an arc.

## Sources

- [LinuxCNC G-code reference (G40, G41, G42)](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [HelmanCNC: cutter radius compensation G41 G42](https://www.helmancnc.com/cutter-radius-compensation-g41-g42/)
- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)

## Frequently asked questions

### What is the difference between G41 and G42?
Both turn on cutter radius compensation, offsetting the tool from the programmed path by its radius. `G41` offsets to the left of the path and `G42` to the right, judged looking in the direction of travel. `G40` cancels it.

### What does the D value do in cutter compensation?
`D` points to the register holding the tool's radius (or diameter). The control uses it to decide how far to shift the path, so changing `D` adjusts for tool wear or a different cutter without re-posting.

### Why does cutter compensation need a lead-in move?
The control needs a straight move to ramp the tool out to the offset path, so `G41` or `G42` is commanded on a linear lead-in, not during an arc, and `G40` is cancelled the same way on a lead-out.

### What is the best way to remember G41 vs G42?
Drill the pair with active recall. A free app like G-Code Sprint shows `G41` and `G42` as side-by-side timed questions and repeats whichever one you keep missing.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/g41-vs-g42-cutter-compensation/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
