What Is Cutter Compensation? G41, G42 Explained

Cutter compensation is a CNC feature that automatically shifts a cutting tool’s path to account for the tool’s size, so the programmed coordinates can describe the actual part shape rather than the center of the tool. Without it, a programmer would need to manually calculate every coordinate based on where the tool’s center should be, not where the finished surface should end up. With cutter compensation turned on, the controller does that math in real time, offsetting the tool by its radius so the cutting edge lands exactly on the programmed profile.

Why Cutter Compensation Exists

When a CNC mill cuts a profile, the tool contact point (the outer edge) is what shapes the part, but the machine actually moves the tool’s center. If you program a straight wall at X = 50.0 and your end mill has a 5mm radius, the tool center needs to travel at X = 55.0 or X = 45.0, depending on which side of the wall you’re cutting. For a simple rectangle, doing this math yourself is easy. For a complex contour with arcs, angles, and transitions, it becomes tedious and error-prone.

Cutter compensation solves this by letting you program the exact part geometry. You tell the controller the tool’s radius, activate compensation, and the controller shifts every move by the right amount. This also means that if you swap to a slightly different tool size, or the tool wears down during a production run, you only need to update one number in the offset register instead of recalculating every coordinate in the program.

G41, G42, and G40: The Core Codes

Three G-codes control cutter compensation on most CNC mills:

  • G41 activates left cutter compensation. The tool offsets to the left of the programmed path, relative to the direction of travel.
  • G42 activates right cutter compensation. The tool offsets to the right of the programmed path.
  • G40 cancels cutter compensation, returning the tool center to the exact programmed coordinates.

Which code you need depends on the direction the tool is moving along the workpiece. If you’re cutting a profile by climbing upward along the left side of a part, the tool needs to sit to the left of the material, so you’d use G41. If the tool were traveling in the opposite direction along that same edge, you’d use G42. The simplest way to think about it: stand behind the tool and look in the direction it’s moving. G41 shifts it left, G42 shifts it right.

A D-code typically accompanies G41 or G42 to tell the controller which offset value to use. For example, “G41 D01” activates left compensation using the offset stored in register 01. That register holds either the tool’s radius or diameter, depending on a machine setting. On Haas mills, Setting 40 determines whether the controller interprets the offset value as a radius or a diameter.

Computer, Control, and Wear Compensation

CAM software like Mastercam offers three distinct ways to handle cutter compensation, and they differ in where the offset math happens and how much control the machine operator retains.

Computer compensation has the CAM software calculate all the offset positions before the program ever reaches the machine. The posted G-code contains the already-shifted tool center coordinates, with no G41 or G42 codes in the file. This produces a clean, predictable toolpath, but it locks the operator out of making adjustments at the machine. If the tool wears during a run, there’s no register to tweak.

Control compensation takes the opposite approach. The CAM software outputs the actual part profile coordinates along with G41/G42 codes, and the CNC controller calculates the offset in real time using the value stored in the radius register. The operator can adjust that register at any time to fine-tune part dimensions, compensating for tool wear or slight variations in tool diameter.

Wear compensation is a hybrid. The CAM software calculates the compensated positions (like Computer mode) but also outputs G41/G42 codes. The operator can then make small adjustments through a separate wear register on the controller. This is useful in production environments: the program runs on the pre-calculated path, but as the tool gradually wears over dozens or hundreds of parts, the operator dials in small corrections without editing the program. When using Wear mode, the controller ignores the main radius register and only reads the wear register. The reverse is true for Control mode.

How the Controller Calculates the Offset Path

When cutter compensation is active, the controller reads ahead in the program, usually one or two moves, to figure out where the tool center needs to be so the cutting edge stays tangent to the programmed profile. For straight lines, this is a simple perpendicular shift by the tool’s radius. For arcs, the controller adjusts the arc’s radius: an outside corner gets a larger-radius arc for the tool center, while an inside corner gets a smaller one.

The controller also handles transitions between moves. At an outside corner where two straight cuts meet, it typically rolls the tool around the corner in a small arc so the cutting edge stays in continuous contact with the part. At inside corners, it computes the intersection point where the two offset lines meet and sends the tool there directly.

This look-ahead behavior is why cutter compensation requires a lead-in move. You can’t activate G41 or G42 on the same line where you start cutting the part. The controller needs at least one linear move to ramp into the offset position before it reaches the actual workpiece geometry.

Common Errors and Interference Alarms

The most frequent problem machinists encounter with cutter compensation is the interference alarm. On Haas controllers, this shows up as Alarm 367: “Programmed path cannot be computed with tool size.” It means the controller tried to offset the tool path and found that the geometry doesn’t work with the current tool radius.

The most common cause is an inside corner or pocket radius that’s smaller than the tool. If your program calls for a 3mm inside radius but your tool has a 5mm radius, the offset path would require the tool to occupy space inside the material, which is physically impossible. The controller catches this conflict and stops. The fix is either to use a smaller tool or to adjust the part geometry to allow for a larger inside radius.

Another trigger is moves that are too short relative to the offset amount. If a linear move is smaller than the compensation offset, the controller can’t compute a valid path. This sometimes happens when operators enter wear offset values that are unexpectedly large, or when geometry has tiny segments that looked fine in the CAM software but break down once the controller applies the offset.

Forgetting to include a proper lead-in or lead-out move also causes problems. If you activate compensation too close to the workpiece or cancel it mid-cut, the tool can gouge the part as it transitions in or out of the offset position.

Practical Benefits in Production

The biggest advantage of cutter compensation in a production setting is speed of adjustment. When you’re running 500 parts and measuring each tenth one, you’ll notice the dimensions gradually drifting as the tool wears. With compensation active (in Control or Wear mode), the operator updates a single offset value by a few thousandths of an inch and the next part comes out on size. No program editing, no re-posting from the CAM system, no downtime.

It also simplifies programming. When the program describes the actual finished part, it’s easier to verify against the print. Anyone reading the code can see the part dimensions directly in the coordinates instead of trying to reverse-engineer what the finished surface will look like after mentally subtracting the tool radius from every move.

For shops that run the same program with different tool sizes, cutter compensation makes that possible without maintaining multiple versions of the code. A roughing pass with a larger tool and a finishing pass with a smaller one can use the same profile geometry, each with its own offset register pulling the tool to the right position.