Tool Nose Radius Compensation: G41, G42 and G40

10 July 2026

Mentor CNC Editör Ekibi

Tool-nose radius compensation is a vital function in CNC turning that eliminates the deviation between theoretical geometry and real manufacturing, taking part quality to the micron level. The G41, G42 and G40 codes start this compensation, set its direction, and cancel it.

📷 IMAGE AREA — Tool nose radius: the difference between the virtual (theoretical) sharp point and the real contact point, and taper/radius cutting with vs without compensation
Suggested alt text: tool nose radius compensation virtual point vs real contact point

1. What is tool-nose radius compensation?

Although the tip of the OD or boring inserts used on a CNC lathe looks sharp to the naked eye, under a magnifier that tip is actually a small arc (circular). This circular tip is called the tool nose radius. Common insert radii on the market are 0.2 / 0.4 / 0.8 / 1.2 mm.

The core problem — the theoretical virtual point vs the real contact point: when zeroing the machine (taking the offset), you touch the tool to the face and diameter of the part; the machine perceives a virtual sharpened point (an imaginary intersection) exactly at that corner. In straight turning (straight in Z) or straight facing (straight in X), this virtual point and the real contact point stay aligned and the part comes out to size. But in taper (angled) turning or when adding a fillet/radius, things change: the round nose of the tool touches the angled surface not from where the virtual point is, but from a real contact point on the side of the nose.

If we do not compensate: when turning a taper or radius on the OD, excess material is left on the part (the part comes out oversize); when making a fillet on the ID (bore), the part is over-cut. The control unit calculating this geometric deviation mathematically in the background and shifting the tool path by the radius amount is called compensation.

2. What the G41, G42 and G40 codes do

For compensation to work, the machine must be told on which side of the profile the tool stays according to its travel direction.

CodeFunctionMeaning on a lathe
G41 — compensation leftUsed when, looking along the travel direction, the tool stays on the left of the machining profile.Usually the tool stays on the left in reverse/back-chuck work or when boring (ID) from the back face of the part.
G42 — compensation rightUsed when, along the travel direction, the tool stays on the right of the profile.On a classic CNC lathe, when turning the OD (from the tailstock side toward the chuck) the tool is always on the right of the profile; so G42 is used almost always in OD finish turning.
G40 — cancelDisables the compensation started with G41/G42.Before operations such as threading and drilling, or when moving away from the part after finishing, compensation must be cancelled with G40; otherwise the machine drifts in unexpected directions on subsequent moves.

3. The offset page: R (radius) and T (imaginary-tip direction code)

Writing only G41/G42 in the program is not enough; two critical columns must be filled for each tool on the machine OFFSET / GEOMETRY screen: R and T.

  • R column (tool nose radius): you enter exactly the radius value printed on your insert. For example, if the insert is DNMG 150608, the trailing 08 means the radius is 0.8 mm; you write 0.8 in the R column.
  • T column (imaginary-tip direction code): expresses how the tool holder is mounted and at what angle it contacts the part, as a number from 0 to 9. A wrong direction code makes the machine calculate compensation in the opposite direction and scraps the part.
T direction codeImaginary tool-tip direction
T1Tool tip on the ID, facing up and to the right.
T2Tool tip facing up and to the left.
T3The direction of standard OD roughing and finishing tools. The tip faces the chuck (left) and the part (down). For OD turning with a standard-mounted tool, enter 3 here.
T4Tool tip facing down and to the right.
T0 / T9When the exact centre of the tool nose is used as reference (for special holders).

4. Example programming application and rules

Golden rule: G41 or G42 is not given in the block where you touch the tool directly to the part. This code must be read while the tool is still approaching in free space, before touching the part (with G00 or a linear G01), and the tool must enter the profile that way. This is called the lead-in (ramp-on) block. In the example below, after facing a Ø60 part, a chamfer (taper) and then a cylindrical OD down to Z-40 are machined; the tool is No. 1 with a 0.8 mm nose radius (OFFSET R: 0.8, T: 3).

O0041 (G41-G42 COMPENSATION LESSON) ;
G21 ;
G28 U0 W0 ;
G96 S220 M03 ;
T0101 ;   (No.1 OD finishing tool, read the geometry)
(APPROACH AND LEAD-IN BLOCK - COMPENSATION START)
G00 X70.0 Z5.0 M08 ;   (Safe approach in free space outside the part)
G01 G42 X50.0 Z2.0 F0.15 ;   (G42 activated in free space, tool to the right of the profile)
(PROFILE MACHINING)
G01 X50.0 Z0.0 ;   (Touched the face)
X0.0 ;             (Face down to the centre)
G00 Z2.0 ;         (Retract slightly off the face)
X46.0 ;            (Position to the chamfer start diameter)
G01 X56.0 Z-3.0 ;  (Clean chamfer, compensating the round nose)
Z-40.0 ;           (Cylindrical OD to size down to Z-40)
X65.0 ;            (Turning done, exit up off the OD)
(CANCEL BLOCK - COMPENSATION EXIT)
G00 G40 X100.0 Z100.0 M09 ;   (Cancel radius compensation with G40 and move away)
M05 ;
M30 ;

📷 IMAGE AREA — Lead-in block (G42 activated in free space), the compensated chamfer/radius tool path and the G40 cancel exit block
Suggested alt text: G42 lead-in block and G40 cancel compensated tool path

5. Detail analysis and missing-information note

G41/G42 compensation appears under both the tool geometry offset and the tool wear offset (G10) headings. An important micro-detail: when both corner radius (R) and chamfer data are entered at the same time, the system uses the corner R data with priority and ignores the chamfer data. Missing-information note: the internal parameter numbers the controls apply in the background while G41/G42 is active, and the instantaneous micro-position compensation formulas the axis motors perform, are not present in the source files; rely on your machine original manual for these specific internal parameters.