M03 CNC Code Explained: An Easy Intro for Beginners [Spindle On Clockwise]

What does a M03 CNC code do?

The M03 code turns the CNC spindle on in a clockwise direction.

On a CNC mill, M03 is used with right hand tools. This is by far the most common type of tooling used with machining centers.

The M03 is often programmed together with a spindle speed using the S code such as S1000 M03.

Programming the speed on a previous line is also acceptable. Using the code below will functionally be no different than S1000 M03.



If no speed is given on the same line as the M03 code, the CNC machine will use the last set speed in the machine’s memory.

To ensure the proper speed is set when turning the spindle on with M03, it is good practice to set the speed even if it has not changed since it was last set.

Learn CNC Programming – It’s Easier Than You Think!

Learning G Code doesn’t have to be difficult…

If you know what to focus on.

Join our simple, easy-to-follow course, “G Code Made Easy: CNC Programming for Beginners“. We walk you through all the important codes – with simple explanations and real-world examples.

Want to become a super-skilled CNC programmer? Join now to take the shortcut to becoming a G Code Master today!

Make Learning G Code Easy

M3 vs M03

Some people get confused about whether the 0 is required to include with an M03 code.

To clear this up, there is no need to include the zero in the code. 

The CNC machine will read the code the same. It really is just a matter of preference.

Often you will see the full M03 code used in textbooks or other reference materials. In practice though, many prefer the shortened M3 code in their programs.

If you are working on your own, then go with whichever format you prefer. 

If you work in a bigger shop, make sure to stick to the format that the business has been using.

M03 vs M04

Spindle direction

There are two codes for turning the CNC spindle on.

The M03 code turns it on in a clockwise direction. M03 is used with right hand tooling.

The M04 code turns it on in a counterclockwise direction. M04 used with left hand tooling.

If you need to change directions, then it is best to stop the spindle before changing directions.

Which code turns off the spindle?

The code to turn off the CNC spindle is M05.

The same M05 code is used no matter which direction the spindle is currently rotating.

Other CNC codes to know when working with M03

Because the M03 code is used so often, there are a number of codes that are used together with the M03 command.

Some of the most frequently used are:

  • S – Sets the spindle speed – Most controllers will allow a range of either 1-9,999 or 1-99,999
  • M05 – Spindle stop
  • G96 – Constant surface speed mode – On lathes this mode tells the machine to maintain a constant surface speed so as the part being machined gets smaller, the spindle will turn faster to maintain the same speed at the cutting point
  • G97 – RPM speed mode – This code tells the CNC to run the spindle at a constant number of revolutions per minute

Want to learn more about CNC G Code?

Leave a Comment