G42: Cutter compensation right
What G42 does
G42 shifts the tool path to the right by the stored radius. With a right-hand cutter it gives conventional milling on an outside profile. On a lathe with the turret in front, G42 is the usual choice for turning toward the chuck on an outside diameter.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Cutter compensation |
| Modal | Yes: stays active until replaced by another code from the same group |
G42 example
G42 D1 G01 X0. Y5. F300. Turn on right compensation with offset D1.
| Word | What it means here |
|---|---|
G42 | Cutter compensation right |
D1 | tool radius offset number |
G01 | Linear interpolation (feed move) |
X0. | X axis target (on a lathe, the diameter) |
Y5. | Y axis target |
F300. | feed rate (on threading codes, the lead) |
Codes people confuse with G42
| Code | What it does instead |
|---|---|
G41 | Cutter compensation left. Offsets the tool to the left of the path, looking in the direction of travel. |
Other codes in the cutter compensation group
Only one code from a modal group is active at a time. Programming any of these replaces G42.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G42
-
What does
G42do? (Mill and lathe) -
Which code: Offsets the tool to the right of the path.(Mill and lathe)
-
What does
G41do? (Mill and lathe)
Show the answers
- Offsets the tool to the right of the path.
- G42
- Offsets the tool to the left of the path, looking in the direction of travel.
Frequently asked questions
- What does G42 mean in CNC programming?
- Cutter compensation right. Offsets the tool to the right of the path.
- Is G42 modal?
- Yes. G42 belongs to the cutter compensation group and stays active until another code from that group is programmed.
- What is the difference between G42 and G41?
- G42 (cutter compensation right): offsets the tool to the right of the path. G41 (cutter compensation left): offsets the tool to the left of the path, looking in the direction of travel.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.