What is CNC Programming: Complete Beginner’s Intro

Nick Whitney

CNC Machining, CNC Routers, Guides

cnc programming complete guide

At CNCSourced, we’re a team from across the world, united by our passion for everything CNC, laser cutting, and more! We try to publish at least once per week, and we’re always up for talking anything DIY and making! Altogether we’ve written over 150 technical guides, from how to wire stepper motors, to brand-new ways to CNC carve granite with $5. You can read more about us on our about page.

In this article, I’m going to try and shed a little light on the profession of CNC programming.

I’ve been a CNC programmer for over 15 years, and in this article, I’ll share my tips for getting into CNC programming, as well as explain the basics. We’ll cover:

  • What is CNC programming?
  • Is CNC programming hard to learn?
  • What does a CNC programmer do?

And everything else you’d need to know about getting into this exciting industry!

I’ve also interviewed the Head of Programming at a CNC job shop for tips for landing your first CNC programming job, at the end of this article. 

So if you’re interested in getting an overview of CNC Programming for beginners, then you’re in the right place. You may be surprised at how accessible this world is!

What is CNC Programming?

CNC (Computer Numerical Control) programming is using software to program a machine to do a task. Typically, these machines are things like CNC mills and CNC lathes

These CNC machines receive their instructions using a programming language called g-code. G-code is created by a programmer at the machine or through a CAM (Computer-Aided Manufacturing) program. 

How Does CNC Programming Work?

Nearly all CNC machines use electric motors to move the machine’s components around. We call the direction of movement in a machine its axis. 

Commonly, CNC mills have 3 axis. In most milling machines the left and right are the “X” axis, toward and away are the “Y” axis, and up and down is the “Z” axis.

The programmer uses some form of software to program the machine to engage those motors. The motors are usually turning screws but sometimes they are turning belts or even chains. 

Turn the motor one way and the table of the machine moves away from the motor. Turn the motor the opposite way and the table moves toward the motor. 

All CNC programming is a series of motions, one after the other, or all at once.

Is CNC Programming Hard?

CNC programming’s difficulty depends on what you’re programming, and for what goal. Programming a 3D printer is simple – my kids do it for fun. But programming a CNC mill to cut metal is complex. It depends on which CNC machine you’re programming.

student learns cnc programming in cimco cad cam software
Student learns CNC programming using CIMCO CAD/CAM software. Source: Reddit

CNC programming can be extremely difficult, and it isn’t for everyone – sometimes the stress is ridiculous. You’ll need a rigorous understanding of principles and voluminous knowledge of material types and cutter specifications. 

But in the beginning, all you really need is a ready and willing desire to learn. And, hopefully, someone to show you the ropes. 

When I look back over my career it isn’t difficult to conjure up the names and faces of all the people who freely gave their knowledge. I owe them a debt of gratitude that I try to pay it forward whenever I can.

I’ll try and walk you through some of the different levels of complexity when it comes to CNC programming. First, you’ll need to understand what tolerance is. 


A simple way to describe tolerance is: “How close to perfect the finished part needs to be.” 

The closer to perfect, in both form and function, the more difficult the part is to make.

A human hair is, on average, around five-thousandths of an inch thick. That may sound small, but in the world of machining, it isn’t. 

To a machinist, five-thousandths is huge. You can park your car in five thousandths and never worry about scratching the paint.

So what does this mean in practical terms? Well, the tighter the tolerance, the more skilled the programmer needs to be. We’ll start at the simplest and work our way up.

3D Printing  

Gcode rendering on Prusa 3d printer using blender addon
G-code rendering on Prusa 3D printer using a Blender addon. Source: Reddit

This is the easiest form of programming. You take a model and drop it into a slicer program like Cura and it spits out a bunch of g-code. When you’re done you (hopefully) have a part that looks like the model. Your tolerance is virtually nonexistent and your measuring tool is your eyeball.

You’re working with plastic which is cheap and readily available, so the cost of failure is low. It’s also additive manufacturing, which means that you are starting with nothing and adding material to make a part.  

2D Machining

2-axis machining is the next step up. Machines that are 2-axis include CNC routers, laser cutters and engravers, and waterjet machines.

All CNC programming is fundamentally about making decisions. The more that a machine can do, the more options you’re required to consider. 

The toolpathing for these machines is typically more complex than a 3D printer because they utilize subtractive manufacturing. This means starting with stock, and then removing material until you get the desired part – like chipping away at a marble block to create a statue.

waterjet cnc metal cutting
Waterjet CNC metal cutting.

With subtractive manufacturing, you have to start worrying about new variables. Like, what cutter to use, how fast to spin, and how hard to push it through the material. Breaking cutters can get expensive.

The tolerances on these machines are usually still pretty wide because the machines can’t hold anything very tight. A tape measure will often suffice for measuring.

Because you have to purchase the materials ahead of time the cost of failure is higher, but the materials themselves are usually plywood, wood, or MDF. 

CNC Lathe

Programming a lathe is different from other types of machining because the tooling is stationary and the part is what is spinning. You have to consider how best to approach the part and how much tool pressure to apply.

A mistake can cause the part to come out of the chuck. This would ruin the part, potentially damage the machine, and possibly injure the operator.

programmable cnc lathe in manufacturing
Programmable CNC lathe.

CNC lathes are capable of quite a bit, but everything needs to be round and on the center of the part. Subsequently, many parts that are started on a lathe end up having additional features added later on other machines.

While technically only 2-axis, these machines are more difficult to program because of the types of materials they cut, like aluminum, iron, and steel, and the tight tolerances they hold. The chuck spins with a terrible amount of inertia, which makes CNC lathes more dangerous as well.

Tolerances on these machines are small. It’s not uncommon to cut parts to the tenths of a thousandth of an inch. You need very sensitive and accurate tools, like micrometers, to measure that small.

The materials that lathes work on are costly and so are the machines so the price of failure takes a large step forward from the previously mentioned machines.

3-Axis Mills

The 3-axis mill is the most common metal-cutting CNC machine. You use end mills to rough and finish different features, drills to make holes, and taps to thread them. Any given 3-axis mill will have a large library of tools in its arsenal, all with specific jobs.

3-axis mill with partial G-code for the drilling
3-Axis mill with partial G-code for drilling.

Depending upon the industry you’re servicing you might also cut complex surfaces using all 3-axis at once. 

These machines range in size from something you could fit in a garage to something you could fit a garage in. They hold tight tolerances and, like lathes, cut nearly every kind of metal. 

5-Axis Machining   

5-axis is about as complicated as it gets. Not only do you have the up-down, left-right, and toward-away movement of the 3-axis, but also tilt and rotate. 

And, incredibly, all 5 of these movements can happen simultaneously.

There is nearly no limit to how complex the pathing can get on these machines. As such, only experienced programmers write 5-axis code. 

When you start adding in the additional movements it is easy to lose track of simple things like “Which way is down?” You have to keep the relative position of the part to the machine in mind.

There are considerations on a 5-axis machine that aren’t present on other machines. For instance, spinning the table.

5-axis CNC machine. Source: Reddit

One of the biggest crashes I’ve ever seen in a shop came from a programmer not realizing that when he spun the part around it would collide with the head of the machine. This is simple mistake to make, but a costly one.

The spindle of the machine had to be replaced and the entire thing re-aligned before it could run properly. If I recall correctly, that simple mistake cost the company around forty thousand dollars.

All of this may sound intimidating. And trust me when I say that CNC programming is not for the faint at heart. But it can also be richly rewarding.

What a lot of people don’t understand is that CNC programmers are the modern equivalent of the blacksmith. We are the makers. We talk in terms of metal and hardness. Toughness and heat. Ours are lives filled with sharp edges and the deep rumbling growl of a machine that moves because we told it to.

Yeah, it’s tough. But if you ever wondered what it felt like to take a chunk of metal and shape it into something purposeful – to tear and rip and chisel and drill it into something useful and good – well, this might be the job for you.

What Does a CNC Programmer Do?

A CNC programmer’s job is to tell the machine to move in a direction a certain distance. There are a million other things, but this is the most basic. Move five inches to the left, now five inches away, now five inches to the right, now five inches toward. Congratulations, you’ve just made a square.

Here’s a fun trick to remember which axis is which, that I was taught nearly twenty years ago. 

Pretend you are standing in front of a typical CNC milling machine. Take your right hand and point it at the machine. Stick your thumb in the air like you’re making your hand into a gun. Now point your middle finger off to the left. These are the three directions of movement. Your thumb is the “Z” axis. Your pointer finger is the “Y.” And your middle finger is the “X.”

Brother M140X2 5-axis CNC machine for manufacturing
Brother M140X2 5-axis CNC machine for manufacturing. Source: Reddit

What does that have to do with programming? The answer is everything.

The kind of day that a programmer has is largely affected by the kind of parts they make. The more complicated, the tighter the tolerance, the more time spent programming.

When I first started out, I was making fairly simple parts right at the machine. In time, as my experience grew, I moved away from any one individual machine and started programming from an office, writing code for all of the machines in the building.

I’ve spent three minutes programming a simple square part with a hole in it, and I’ve spent three days programming a 5-axis part that took a crane to get into the machine.

It really all depends on what shop you work in and what industries they service. 

The Different Types of CNC Programming

There are a ton of different ways to get there but the end destination of all programming is g-code. 

G-code in NativeCAM for LinuxCNC
G-code in NativeCAM for LinuxCNC. Credit: BrendaEM

It’s the language of the CNC machine. It’s a little like binary code: simple instructions that, when piled and stacked, end up making complex things. Cutting the outside of a part might be a few lines of code. Cutting the 3 dimensional face of a mold might be a few million.

In the past, g-code was typed in by hand. Each move was laboriously entered into the machine one at a time. 

Luckily, the industry has progressed away from the barbarism of its youth. Now, programming is done predominantly in one of two ways:

Conversational CNC Programming

Firstly, there is conversational programming. This is done at the machine using its own software. 

conversational programming on a HURCO cnc machine
Conversational programming on a Hurco CNC machine. Source: Hurco

It’s quick, it’s intuitive, and very effective at doing simple tasks. You literally tell the machine to cut this line or drill these holes, and the program is then converted into g-code for you.

I used to know a guy who claimed he could, with conversational programming, face off the part with a face mill, spot drill four holes, and then drill and tap them, before I could even boot up my computer and load in my CAM (Computer-Aided Manufacturing) software. 

So we tried it. He won. But that was before Solid State hard drives. If the race had taken place these days I would have kicked his butt.

Programming with CAM Software

This leads us to the second type of CNC programming: programming with CAM. Essentially CAM is using a computer program to write your code for you. 

You can select different features and give the program instructions on what to do with them. It’s similar to conversational programming, but far more robust. 

Simply put, there are things that are just too complicated to do without aid from a CAM program. (Some people will argue with me on this point, but they’re just wrong. Take some massive part with complex 3-dimensional geometry all over it and try to program it by hand. It’s silly. As Chris Rock once said, “You can drive a car with your feet, but that doesn’t make it a good idea!”)

FreeCAD Path Workbench generates G-code for CNC machines.
The FreeCAD Path Workbench generates G-code for CNC machines. Source: FreeCAD

There are a huge number of different programs to choose from and narrowing down what works for you and your budget can get pretty involved. 

Luckily, we’ve done the heavy lifting already. You can check out a great article on different CAM choices here.   

Which Industries use CNC Programmers?

Just about everything that is manufactured is in some way related to CNC programming. 

Take the automotive industry for example. In any given car someone programmed a CNC machine to cut and drill the frame components. Someone else sized and bored the engine block. A CNC machine produced the gears in the transmission. Every piece of plastic was extruded or pressed into a mold that was machined. 

Within the manufacturing industry, there are other applications such as

  • Defense
  • Medical
  • Aerospace
  • Agriculture
  • Space
  • Electronics
  • Plastics
  • Cabinetry
  • Signs
  • Prototyping

The list goes on, almost ad infinitum.

Look around you right now. Wherever you are, I guarantee you can see the fruits of a CNC programmer’s labor. Anything metal or plastic can likely trace its roots back to a CNC machine. 

What Do You Need To Be A CNC Programmer?

People are going to tell you math skills and they’re right. But I suck at math and I’m a pretty good programmer – so maybe they aren’t as correct as they seem. Since we live in the future we have access to things like computers to figure out complicated geometry and trigonometry.

two engineers programming a CNC machine
Two engineers programming a CNC machine at work.

I once asked my high school math teacher, to her obvious annoyance, “Why do I need this stuff when I’ll always have access to a calculator?” 

Her answer, “It’s not like you’re going to be carrying around a calculator with you wherever you go,” has not aged well.

The reality of learning to be a CNC programmer is that you need to be able to listen and learn. You’ve never done anything like this before. There’s no frame of reference. It’s its own thing.  

Around here, kids can drive. I was dumbstruck by this. Why was it allowed? Then it was explained to me that they’ve been driving trucks and tractors since they were little, so letting them on the road isn’t as big of a step as I thought it was. 

But you haven’t been “sort of” CNC programming anything. So coming in, you need to be teachable. Once you get the basics, then the next thing is being able to problem solve. There is no hard and true way of programming a part. It’s as much art as it is application.

Any experience with CAD (Computer-Aided Design) or CAM software is also a plus.

How To Learn CNC Programming

If you want to know how to become a CNC programmer, my answer would be, “ask for it.” 

Go find a shop in your area and ask if they are hiring. It’s an industry built on the sharing of knowledge. You might be shocked at how eager people are to teach this stuff.

While there are classes that you can attend and they teach a lot of valuable information, they aren’t necessary to learn CNC programming. 

In fact, I’ve only ever worked with one person that went to college to be a CNC programmer. 

Where To Learn CNC Programming

There are college courses that you can take as well as trade schools. But, honestly, I would steer you away from those. 

cnc programming youtube videos
Some CNC programming video tutorials. Source: Youtube

If you are interested in learning how to program, you can get a basic idea of what it entails by watching Youtube videos. If it looks like something that you are interested in, then I would start applying at local shops. 

Every shop I’ve ever worked at – in fact, every shop that I have ever been to – is always hiring. If you’re enthusiastic, even with zero experience, they will likely give you a shot. That said, it’s likely to be sink or swim. You’ll learn pretty quickly whether or not you’ve got what it takes.

Even if your end goal is to be a CNC programmer I would recommend that you start as a machine tool operator. You’ll be running a machine and learning the basics of machining, which will help you prepare for programming later on. 

CNC Programmer Career Outlook

CNC programmers are in high demand. They are needed in every facet of Industry and it’s not a very popular career path. You can find some useful statistics here. In my experience, an experienced CNC programmer, machinist, or machine tool operator is worth their weight in gold.

Machine Tool Operator

In most cases, you’ll start your career in CNC programming as a machine tool operator. This person works directly at the machine. They are responsible for changing parts, measuring completed parts, and maintaining tooling.

Every shop does things differently but I would expect to work as a machine tool operator for a year or two. You’ll pick up a massive amount of knowledge that will be preparing you for the next step.


A machinist’s role is to program and run their machine. They will be intimately aware of the machine’s specifications and abilities. 

machinist programming industrial CNC lathe

This is the person you give a cart full of stock too and a blueprint and then you come back later to find a stack of finished parts.

CNC Programmer

While not necessarily more knowledgeable or skilled than a machinist, the CNC programmers job is usually broader. They will have a lot of different machines that they program for. 

They’ll need to understand the shop’s capabilities as a whole, and what machine is best suited to any individual job.

Some shops have a handful of programmers supporting a large number of operators while other shops might have only machinists. Every shop is unique in how they function.

CNC Programming Tips For Beginners

I’ve trained about a dozen people over the years. The first and most important thing I teach is that you have to be honest. If you don’t understand something, speak up. You won’t be able to fake your way through it later.

If you’ve ever started at a job you know that the training is usually garbage. For the most part, you kind of nod and try not to let your eyes glaze over. You’re thinking, “I get it, I get it, and what I don’t get I’ll figure out later once you leave me alone.” 

cnc machine monitor with program code

This will not work for machining! Pay attention, ask questions, and most importantly, don’t be afraid to say “I don’t understand that part.”

I recently had the opportunity to interview the head CNC programmer at Miltech Machine Corporation, Ryan Boss. Milltech is a job shop located in Kansas, USA. 

If you’re unfamiliar with the term “Job Shop,” what it basically means is that the shop makes all kinds of parts for all kinds of industries. At Miltech, you never know what kind of project is going to come in the door, which means they need to be flexible as well as capable.

Question: “So, how did you get your start in CNC Programming”?

Answer: “Just working on the job in a machine shop. I got into conversational programming to begin with. That really taught me how to work with the parts and how to make them how I needed to make them. At first, it was a lot of trial and error.” 

Question: “If you were to give advice to someone, let’s say just getting out of high school, who wanted to pursue a career as a CNC Programmer, what would you recommend they do?”

Answer: “I would say get into it. Look at some videos, watch some stuff online, and then just dive right in.”

Questions: “Do you think that a Tech school or something like that is necessary?”

Answer: “I never went to Tech school, I mean personally, I don’t believe that college is required. I got all of my training on the job. That said, there’s nothing wrong with a tech school and I’m sure it would be very beneficial.” 

Question: “When it comes to CNC Programming, what is your favorite part of the job?”

Answer: “Creating something. Taking something from nothing and making it. Even if I don’t have a blueprint, just coming up with the toolpaths and the geometry that I’m programming and figuring out all of that stuff. And then to have a finished part that you designed and created.”

Question: “As far as the future of programming do you think that it looks steady?” 

Answer: “I believe it’s just going to keep getting bigger and bigger.”

Questions: “So, even with A.I. and what’s coming you think that there will always be a need for a human sitting in that seat?”

Answer: “Always, always. Even if robots take over the operator’s position, pushing the buttons and loading the parts, I can still see needing someone to program that arm. Somebody still has to be there to program.”

Question: “So what’s the biggest change coming to Manufacturing?”

Answer: “Automation, definitely.”

For more related topics, here are some articles we recommend: