Comprehensive Guide to CNC G‑Codes for Fanuc Controls
G-codes are also called preparatory codes (preparatory functions).

Complete CNC G Code List
Complete G Code List
List of G-codes commonly found on Fanuc and similarly designed CNC controls
| G Code | Group | Function | ||
| A | B | C | ||
| G00 | G00 | G00 | 01 | Positioning (Rapid traverse) |
| G01 | G01 | G01 | Linear interpolation (Cutting feed) | |
| G02 | G02 | G02 | Circular interpolation CW or helical interpolation CW | |
| G03 | G03 | G03 | Circular interpolation CCW or helical interpolation CCW | |
| G04 | G04 | G04 | 00 | Dwell |
| G07.1(G107) | G07.1(G107) | G07.1(G107) | Cylindrical interpolation | |
| G08 | G08 | G08 | Advanced preview control | |
| G10 | G10 | G10 | Programmable data input | |
| G11 | G11 | G11 | Programmable data input cancel | |
| G12.1(G112) | G12.1(G112) | G12.1(G112) | 21 | Polar coordinate interpolation mode |
| G13.1(G113) | G13.1(G113) | G13.1(G113) | Polar coordinate interpolation cancel mode | |
| G17 | G17 | G17 | 16 | X Y plane selection |
| G18 | G18 | G18 | Z X plane selection | |
| G19 | G19 | G19 | Y Z plane selection | |
| G20 | G20 | G70 | 06 | Input in inch |
| G21 | G21 | G71 | Input in mm | |
| G22 | G22 | G22 | 09 | Stored stroke check function on |
| G23 | G23 | G23 | Stored stroke check function off | |
| G25 | G25 | G25 | 08 | Spindle speed fluctuation detection off |
| G26 | G26 | G26 | Spindle speed fluctuation detection on | |
| G27 | G27 | G27 | 00 | Reference position return check |
| G28 | G28 | G28 | Return to reference position | |
| G30 | G30 | G30 | 2nd, 3rd and 4th reference position return | |
| G31 | G31 | G31 | Skip function | |
| G32 | G33 | G33 | 01 | Thread cutting |
| G34 | G34 | G34 | Variable—lead thread cutting | |
| G36 | G36 | G36 | 00 | Automatic tool compensation X |
| G37 | G37 | G37 | Automatic tool compensation Z | |
| G40 | G40 | G40 | 07 | Tool nose radius compensation cancel |
| G41 | G41 | G41 | Tool nose radius compensation left | |
| G42 | G42 | G42 | Tool nose radius compensation right | |
| G50 | G92 | G92 | 00 | Coordinate system setting or max. spindle speed setting |
| G50.3 | G92.1 | G92.1 | Workpiece coordinate system preset | |
| G50.2(G250) | G50.2(G250) | G50.2(G250) | 20 | Polygonal turning cancel |
| G51.2(G251) | G51.2(G251) | G51.2(G251) | Polygonal turning | |
| G52 | G52 | G52 | 00 | Local coordinate system setting |
| G53 | G53 | G53 | Machine coordinate system setting | |
| G54 | G54 | G54 | 14 | Workpiece coordinate system 1 selection |
| G55 | G55 | G55 | Workpiece coordinate system 2 selection | |
| G56 | G56 | G56 | Workpiece coordinate system 3 selection | |
| G57 | G57 | G57 | Workpiece coordinate system 4 selection | |
| G58 | G58 | G58 | Workpiece coordinate system 5 selection | |
| G59 | G59 | G59 | Workpiece coordinate system 6 selection | |
| G65 | G65 | G65 | 00 | Macro calling |
| G66 | G66 | G66 | 12 | Macro modal call |
| G67 | G67 | G67 | Macro modal call cancel | |
| G68 | G68 | G68 | 04 | Mirror image for double turrets ON |
| G69 | G69 | G69 | Mirror image for double turrets OFF | |
| G70 | G70 | G72 | 00 | Finishing cycle |
| G71 | G71 | G73 | Stock removal in turning | |
| G72 | G72 | G74 | Stock removal in facing | |
| G73 | G73 | G75 | Pattern repeating | |
| G74 | G74 | G76 | End face peck drilling | |
| G75 | G75 | G77 | Outer diameter/internal diameter drilling | |
| G76 | G76 | G78 | Multiple threading cycle | |
| G80 | G80 | G80 | 10 | Canned cycle for drilling cancel |
| G83 | G83 | G83 | Cycle for face drilling | |
| G84 | G84 | G84 | Cycle for face tapping | |
| G86 | G86 | G86 | Cycle for face boring | |
| G87 | G87 | G87 | Cycle for side drilling | |
| G88 | G88 | G88 | Cycle for side tapping | |
| G89 | G89 | G89 | Cycle for side boring | |
| G90 | G77 | G20 | 01 | Outer diameter/internal diameter cutting cycle |
| G92 | G78 | G21 | Thread cutting cycle | |
| G94 | G79 | G24 | Endface turning cycle | |
| G96 | G96 | G96 | 02 | Constant surface speed control |
| G97 | G97 | G97 | Constant surface speed control cancel | |
| G98 | G94 | G94 | 05 | Per minute feed |
| G99 | G95 | G95 | Per revolution feed | |
| – | G90 | G90 | 03 | Absolute programming |
| – | G91 | G91 | Incremental programming | |
| – | G98 | G98 | 11 | Return to initial level |
| – | G99 | G99 | Return to R point level | |
G00 Positioning (Rapid traverse)
- CNC G-Code G00 Rapid Traverse
- CNC G Code Introduction for CNC Programmers
G01 Linear interpolation (Cutting feed)
- CNC G Code Introduction for CNC Programmers
- CNC Programming for Beginners a Simple CNC Programming Example
- Lathe CNC Programming Example
G02 Circular interpolation CW or helical interpolation CW
- CNC Programming for Beginners a CNC Programming Example
- CNC Lathe Programming Example
- CNC Circular Interpolation Tutorial G02 G03
G03 Circular interpolation CCW or helical interpolation CCW
- CNC Arc Programming Exercise
- CNC Circular Interpolation Tutorial G02 G03
G04 Dwell
- G04 Dwell Time Calculation Made Easy
G10 Programmable data input
- Fanuc G10 G-Code for CNC Machine Programmable Offset Setting
G20 Input in inch
- Fanuc G20 Measuring in Inches with CNC Program Example
G21 Input in mm
- Fanuc G21 Measuring in Millimeter with CNC Lathe Programming Example
G32 Thread cutting
- CNC Fanuc G33 G32 Threading G Code
G32 Taper Threading
- Taper Threading with G32 a CNC Programming Example
G33 Thread Cutting
- CNC Fanuc G33 G32 Threading G Code
G70 Finishing cycle
- CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
- Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
G71 Stock removal in turning
- CNC Fanuc G71 Turning Cycle or Stock Removal Canned Cycle
- G71 Rough Turning Cycle One-line Format
- CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
- Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
G72 Stock removal in facing
- CNC Fanuc G72 Canned Cycle Facing
G73 Pattern repeating
- CNC Fanuc G73 Pattern Repeating Cycle
- CNC Fanuc G73 Pattern Repeating Cycle CNC Program Example
G74 End face peck drilling
Peck drilling in Z axis.
G74 Peck Drilling Cycle
- Simple CNC Lathe Drilling with Fanuc G74 Peck Drilling Cycle
G74 Face Grooving
- Face Grooving with G74 G Code a CNC Programming Tutorial
G75 Outer diameter/internal diameter drilling
Grooving in X axis.
- CNC Fanuc G75 Grooving Cycle
- Fanuc G75 Grooving Cycle CNC Program Example
- G75 Canned Cycle Grooving CNC Programming Example
G76 Multiple threading cycle
Thread cutting cycle, G76 threading cycle, Fanuc G76 threading cycle, G76 thread cycle.
- Fanuc G76 Threading Cycle
- G76 Thread Cycle a CNC Programming Example
G76 Threading Cycle One Line Format
- G76 Threading Cycle One Line Format for Fanuc 10/11/15T
G76 Taper Threading
- Tapered Threading with Fanuc G76
G76 Multi Start Threading
- Multi-Start Threading with Fanuc G76
G76 Thread Infeed
- Controlling Thread Infeed with Fanuc G76
G92 Thread cutting cycle
CNC Fanuc G92 Threading Cycle, G92 thread cutting cycle.
- CNC Fanuc G92 Threading Cycle
G92 Taper Threading Cycle
- Taper Threading with G92 Threading Cycle
- CNC Programming Example G92 Taper Threading Cycle
G94 Facing Cycle (Endface turning cycle)
- Fanuc G94 Facing Cycle CNC Example Program
G94 Feed Per Minute / G98 Feed Per Minute
- G-Code G94 Feed Per Minute
G95 Feed Per Revolution / G99 Feed Per Revolution
- G-Code G95 Feed Per Revolution
CNC Machine
- Complete Fanuc G Code Reference – All Commands Explained
- Comprehensive Hurco Lathe G‑Code Reference for Dual‑Screen & Max Consoles
- Comprehensive Hurco Mill G‑Code Reference for CNC Machinists
- Comprehensive Mach3 Mill G‑Code Reference Guide
- Complete Tormach G‑Code Reference for PCNC 1100 & 770
- Heidenhain TNC 426 M Codes: Complete Reference Guide
- Complete G‑Code Reference for Centroid CNC Lathes
- Milltronics Centurion 7 G‑Code Reference: Complete List of G Codes
- Comprehensive Fanuc G-Code Reference for CNC Programming
- Comprehensive Mazak M-Series G‑Code Reference for CNC Machinists