M-code reference

M05: Spindle stop

M05 is spindle stop. Stops the spindle. It is modal, so it stays active on the following lines until another code from the same group replaces it.

What M05 does

M05 stops the spindle. It is written before a tool change on many machines and at the end of the program.

TypeM-code
MachineMill and lathe
GroupSpindle
ModalYes: stays active until replaced by another code from the same group

M05 example

M05

Spindle off.

WordWhat it means here
M05Spindle stop

Codes people confuse with M05

CodeWhat it does instead
M03 Spindle on, clockwise. Starts the spindle forward (clockwise) at speed S.
M09 Coolant off. Turns all coolant off.
M00 Program stop. Stops the program until the operator presses cycle start.

Other codes in the spindle group

Only one code from a modal group is active at a time. Programming any of these replaces M05.

  • M03 Spindle on, clockwise
  • M04 Spindle on, counterclockwise
  • M19 Spindle orientation
  • M29 Rigid tapping mode (Fanuc)

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: M05

  1. What does M05 do? (Mill and lathe)

  2. Which code: Stops the spindle.(Mill and lathe)

  3. What does M03 do? (Mill and lathe)

Show the answers
  1. Stops the spindle.
  2. M05
  3. Starts the spindle forward (clockwise) at speed S.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does M05 mean in CNC programming?
Spindle stop. Stops the spindle.
Is M05 modal?
Yes. M05 belongs to the spindle group and stays active until another code from that group is programmed.
What is the difference between M05 and M03?
M05 (spindle stop): stops the spindle. M03 (spindle on, clockwise): starts the spindle forward (clockwise) at speed S.
What is the difference between M05 and M09?
M05 (spindle stop): stops the spindle. M09 (coolant off): turns all coolant off.

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.

Free preview · no card Try G-Code Sprint