Skip to main content

G-Code Cheat Sheet

G-Code Cheat Sheet

This list is by no means exhaustive, and there are variations and extensions of these codes depending on the machine’s brand, model, and controller. Always refer to the specific manual for the CNC machine you are working with before programming or operating.

  • G0 – Rapid Move
  • G1 – Linear Move
  • G2 – Clockwise Circular Arc
  • G3 – Counter-Clockwise Circular Arc
  • G4 – Dwell (Pause)
  • G5 – Cubic Spline
  • G5.1 – Quadratic Spline
  • G7 – Diameter Mode
  • G8 – Radius Mode
  • G9 – Exact Stop Check Mode
  • G10 – Programmable Offset
  • G17 – XY Plane Selection
  • G18 – ZX Plane Selection
  • G19 – YZ Plane Selection
  • G20 – Inch Units
  • G21 – Millimeter Units
  • G28 – Return to Home
  • G28.1 – Return to Home (specific axes)
  • G29 – Return from Reference Point
  • G30 – Return to 2nd, 3rd, or 4th Reference Point
  • G31 – Straight Probe
  • G32 – Threading
  • G33 – Constant Pitch Threading
  • G38.2 – Straight Probe
  • G40 – Cutter Compensation Cancel
  • G41 – Cutter Compensation Left
  • G42 – Cutter Compensation Right
  • G43 – Tool Length Compensation Positive
  • G43.1 – Dynamic Tool Length Compensation
  • G44 – Tool Length Compensation Negative
  • G45 – Tool Offset Increase
  • G46 – Tool Offset Decrease
  • G47 – Tool Offset Double Increase
  • G48 – Tool Offset Double Decrease
  • G49 – Tool Length Compensation Cancel
  • G50 – Scaling Off
  • G51 – Scaling On
  • G52 – Local Coordinate System Setting
  • G53 – Machine Coordinate System Setting
  • G54 – Work Coordinate System #1
  • G55 – Work Coordinate System #2
  • G56 – Work Coordinate System #3
  • G57 – Work Coordinate System #4
  • G58 – Work Coordinate System #5
  • G59 – Work Coordinate System #6
  • G59 P~ – Extended Work Coordinate Systems (P1-P255 depending on the machine)
  • G61 – Exact Stop Mode
  • G64 – Path Blending Mode
  • G65 – Macro Subroutine Call with G65
  • G66 – Macro Modal Call
  • G67 – Cancel G66 Modal Call
  • G68 – Coordinate Rotation
  • G69 – Cancel Coordinate Rotation
  • G70 – Inch Pattern
  • G71 – Metric Pattern
  • G73 – High-Speed Peck Drilling Cycle
  • G74 – Left-Hand Tapping
  • G76 – Fine Boring Cycle
  • G80 – Cancel Motion Mode (typically used to cancel cycles)
  • G81 – Drilling Cycle
  • G82 – Counterboring
  • G83 – Deep Hole Drilling Cycle
  • G84 – Right-Hand Tapping
  • G85 – Boring, No Dwell at Bottom
  • G86 – Boring, Dwell at Bottom
  • G87 – Side Drilling Cycle
  • G88 – Boring with Manual Retract
  • G89 – Boring, Dwell, Retract
  • G90 – Absolute Positioning
  • G91 – Incremental Positioning
  • G92 – Set Position
  • G92.1 – Cancel G92 Offsets
  • G92.2 – Cancel G92 Offsets but retain Modal State
  • G92.3 – Restore G92 Offsets
  • G93 – Inverse Time Mode
  • G94 – Feed per Minute Mode
  • G95 – Feed per Revolution Mode
  • G96 – Constant Surface Speed (CSS)
  • G97 – Fixed RPM Mode (Cancel CSS)
  • G98 – Return to Initial Z after Cycle
  • G99 – Return to R Point after Cycle

Contact Us

Request A Quote