Shop Floor Charts

CNC G-Code and M-Code List

Common Fanuc-style codes used on most CNC mills. Codes vary by control and builder - always confirm in your machine's programming manual.

G-codes

CodeFunction
G00Rapid positioning
G01Linear feed move
G02 / G03Circular interpolation CW / CCW
G04Dwell
G17 / G18 / G19Plane select XY / XZ / YZ
G20 / G21Inch / metric units
G28Return to reference (home)
G40Cutter comp cancel
G41 / G42Cutter comp left / right
G43 / G49Tool length comp + / cancel
G54 - G59Work coordinate systems
G80Cancel canned cycle
G81Drill cycle
G82Spot drill with dwell
G83Peck drill
G84Tapping cycle
G85Boring (feed out)
G90 / G91Absolute / incremental
G94 / G95Feed per minute / per rev
G98 / G99Canned cycle return: initial / R plane

M-codes

CodeFunction
M00Program stop
M01Optional stop
M03 / M04Spindle CW / CCW
M05Spindle stop
M06Tool change
M08 / M09Coolant on / off
M30Program end and rewind
M98Subprogram call
M99Subprogram return

Formulas

RPM = (SFM × 3.82) / Dia
IPM = RPM × Flutes × Chip load
Tap feed (IPM) = RPM / TPI

Printable PDF version - G & M Code Quick Card
Clean letter-size sheet for the toolbox or shop wall. Instant download, $3.99.
Get the PDF - $3.99 All 6 sheets - $12.99