CNC Machinist Calculator Ultra

Home › Guides

G-code and M-code list

The codes you'll see in nearly every program on a Fanuc-style control. Builders differ in the details, so check your machine's manual for options and parameters.

G-codes

CodeMeaning
G00Rapid move
G01Linear move at feed rate
G02 / G03Circular move, clockwise / counterclockwise
G04Dwell
G17 / G18 / G19Plane select XY / XZ / YZ
G20 / G21Inch / metric units
G28Return to machine home (reference point)
G40 / G41 / G42Cutter compensation off / left / right
G43 / G49Tool length offset on / cancel (mill)
G54 – G59Work coordinate systems
G76Threading cycle (lathe) / fine boring (mill)
G80Cancel canned cycle
G81 / G83Drilling / peck drilling cycle (mill)
G84Tapping cycle
G90 / G91Absolute / incremental positioning (mill)
G96 / G97Constant surface speed / fixed RPM (lathe)
G98 / G99Mill: return to initial / R plane. Lathe: feed per minute / per revolution

M-codes

CodeMeaning
M00 / M01Program stop / optional stop
M03 / M04 / M05Spindle clockwise / counterclockwise / stop
M06Tool change (mill)
M08 / M09Coolant on / off
M30Program end and rewind
M98 / M99Call subprogram / return from subprogram

The full reference in your pocket. The app lists G-codes and M-codes, simulates G-code toolpaths, and helps with custom macros, G76 threading and G84 rigid tapping.

Open the G-code list Open the G-code simulator

App Store Google Play