How Does CNC Machine Work
A CNC machine reads a program, moves a spinning tool along a calculated path, and removes material until the part matches the drawing. This page breaks the loop into seven steps, gives parameter ranges you can use, and points out where most first runs go wrong. Written for engineers and buyers who need to judge whether a part suits CNC at all.

Key takeaways
What actually happens inside a CNC machine
A CNC machine is a subtractive system with three layers. The program layer holds the G-code: coordinates, feed rates, spindle speeds, coolant commands and tool changes. The control layer is an industrial computer that reads that code and turns each block into motion commands. The machine layer is the iron: bed, columns, spindle, ball screws, linear guides, servo motors and the vise or chuck holding the work.
The loop is closed at the servo. The controller issues a target position, the drive moves the axis, and an encoder or glass scale reports where the axis really is. Any difference becomes a correction on the next cycle, which repeats in the millisecond range. That is why a CNC can hold ±0.005 mm on a good day and still be wrong by 0.05 mm if the tool is pushed too hard.
Material removal is simple in principle. The tool edge shears metal, the chip slides up the rake face, and heat leaves mostly with the chip. Everything in the process exists to keep that cut stable: enough spindle speed, a feed that keeps the edge biting rather than rubbing, coolant or air to clear chips, and a toolpath that does not leave thin walls singing.
Two numbers describe the cut. Surface speed (m/min or sfm) is how fast the edge travels through the material. Chip load (mm per tooth) is how much material each edge takes per revolution. Multiply chip load by teeth and RPM and you get feed rate. Get chip load too low and the edge rubs, work-hardens stainless and dulls fast. Get it too high and you break tools or move the part in the vise.
- 1ProgramG-code, tool list, offsets, work coordinate system
- 2ControlMotion planner, servo loop, spindle drive, feedback
- 3MachineStructure, spindle, axes, workholding, coolant
From CAD model to toolpath: how the cut is planned
The workflow starts with a solid model and a defined stock size. The CAM programmer picks a work coordinate origin, usually a corner or the center of a bore, and decides how many setups the part needs. A part that can be reached from five sides in one setup will be more accurate than the same part flipped three times, because every flip adds a datum error.
Roughing removes the bulk with the largest tool that fits. A 12 mm three-flute carbide end mill in aluminium 6061 might run at 12,000 rpm and 0.08 mm per tooth, giving a feed around 2,880 mm/min with adaptive clearing at 30–40 percent stepover. The aim is constant chip load, not maximum depth. Leave 0.3–0.5 mm of stock on walls and floors for finishing.
Finishing controls the surface and the tolerance. A 6 mm four-flute tool at 0.03–0.05 mm per tooth, 0.1 mm stepover and 0.2 mm radial depth will hold Ra 0.8–1.6 μm in aluminium. Tight internal corners need a tool smaller than the corner radius, which means a longer, weaker tool. If the drawing shows a sharp internal corner, the honest answer is that a mill cannot make it; the corner needs a relief or a different process.
Toolpath strategy matters as much as the cutting data. Trochoidal and adaptive paths spread the load and let you use the full flute length. Conventional offset paths are faster to program and fine for simple pockets. For thin floors, support the part from below or leave tabs, otherwise the floor will deflect and spring back after the last pass.
- 1Origin choiceA bore center is more repeatable than a sawn edge
- 2Stock allowance0.3–0.5 mm on walls, 0.2 mm on floors
- 3Thin featuresAdd tabs or supports below 1.5 mm wall thickness
Machine setup, offsets and the first article
Setup begins with workholding. A vise is fast and rigid for prismatic parts up to about 200 mm. Soft jaws machined in place give better grip and repeatability than hard jaws. For thin plates, vacuum chucks or a fixture plate with clamps at the corners avoids crushing the middle. Every clamp that touches the part is a place where the part can move or bow.
Tool setting comes next. Tool length offsets are measured with a presetter or a touch-off on the table. A 0.02 mm error in tool length shows up as a 0.02 mm error in depth, which matters on a 0.05 mm tolerance callout. Diameter offsets are usually entered from the manufacturer's data and then trimmed after the first cut.
The first article is a deliberate check, not a formality. Measure the features that carry the tightest tolerances and the datum faces first. If the first part is 0.03 mm oversize on a pocket, adjust the diameter offset rather than reprogramming. If the part moves in the vise, stop and re-fixture; no offset will fix a loose setup.
On a 5-axis or mill-turn machine, the rotary centerline must be calibrated before the run. A few tenths of a millimeter error at the rotary axis is amplified at the end of a long part. Probing on the machine, where available, catches stock variation and thermal drift without a trip back to the CAD seat.
- 1Preset every toolRecord length and diameter before the run starts
- 2Check the datum firstA wrong datum rejects every feature downstream
- 3Log the trimNote every offset change so the next run starts closer
Where CNC stops making sense
CNC is a poor fit for parts that are mostly hollow or have long thin walls. A 0.8 mm wall on a 100 mm tall aluminium housing will move during and after cutting, no matter how careful the toolpath is. Casting, vacuum casting or sheet metal will be cheaper and more stable.
Deep narrow pockets are another limit. A pocket 6 mm wide and 60 mm deep needs a tool with a 10:1 length-to-diameter ratio, which deflects under load and leaves a tapered wall. If the design allows a wider pocket or a relieved corner, the part becomes machinable and the price drops.
Cost also decides. A single prototype in aluminium is fast on a 3-axis mill. A run of 10,000 identical small brackets is usually cheaper as a die casting or a stamping, with CNC reserved for the critical faces. It is worth comparing the two before committing to a tool.
Finally, consider the material. Plastics like POM and PEEK cut cleanly but hold heat and can warp. Titanium Ti-6Al-4V and Inconel 718 need low surface speeds, rigid setups and plenty of coolant. They machine well, just slowly, and the quoted price reflects that.
- 1Long thin wallsBelow roughly 1.5 mm wall on a tall part, expect movement
- 2Deep narrow slotsAbove 6:1 depth-to-width, deflection shows in the wall
- 3High volume simple partsCompare casting or stamping before cutting thousands
How a CNC job runs, step by step
Seven steps from drawing to shipped part
- 11. Review the drawing and the materialConfirm the material grade, temper and stock size. Note tolerances tighter than ±0.05 mm and any surface finish callout. Flag features that cannot be milled, such as sharp internal corners or blind undercuts.
- 22. Build the CAM setup and toolpathChoose the origin, the number of setups and the tool list. Rough with adaptive clearing at 30–40 percent stepover, leave 0.3–0.5 mm on walls, then finish with a smaller tool at 0.1 mm stepover. Post the G-code and check the simulation for gouges and rapid collisions.
- 33. Load the program and set offsetsTransfer the file to the controller, load tools in the correct pockets and enter length and diameter offsets. Set the work coordinate system with an edge finder or probe. Dry-run above the part with rapid override at 25 percent before cutting anything.
- 44. Cut the first articleRun the program with feed override at 50–70 percent for the first minute and listen for chatter. Measure the critical features immediately. Adjust diameter offsets for size and work offsets for position, then log the changes.
- 55. Inspect and adjustCheck the tightest tolerance first, then the datum, then the finish. If a wall is thin and springing, reduce radial depth and take a spring pass. If the finish shows chatter, shorten the tool, reduce stepover or change the flute count.
- 66. Run production with in-process checksCut the batch with periodic measurement every 10–20 parts depending on tolerance width. Watch spindle load and chip color for signs of tool wear. Replace tools on a count rather than on a hunch.
- 77. Final inspection and packClean the parts, deburr edges and check thread gauges. Measure the drawing's key characteristics against the report. Pack with protection on machined faces and include the inspection record when the customer asks for it.
Tolerance and finish you can expect by process
Values are typical shop-floor results, not laboratory limits
| Process | Typical tolerance | Surface finish | Best for |
|---|---|---|---|
| 3-axis milling | ±0.02 mm | Ra 1.6–3.2 μm | Prismatic parts, open pockets, plates |
| 4-axis milling | ±0.01 mm | Ra 0.8–1.6 μm | Parts with features on four sides |
| 5-axis milling | ±0.005 mm | Ra 0.8–1.6 μm | Complex angles, contoured surfaces, one-setup work |
| CNC turning | ±0.01 mm | Ra 0.8–1.6 μm | Round parts, shafts, bushings, fittings |
| Mill-turn | ±0.005 mm | Ra 0.2–0.8 μm | Round parts with milled flats or cross holes |
| Surface grinding | ±0.005 mm | Ra 0.2–0.8 μm | Hardened flats and tight parallelism |
| Wire EDM | ±0.005 mm | Ra 0.4–0.8 μm | Sharp internal corners, hardened stock |
When to send the part to a CNC shop
If your part has tight tolerances, complex angles or a design that is still moving, CNC is the right call. If it is a thin hollow shell or a simple high-volume bracket, ask for a DFM review first and compare processes.
Common questions
Does a CNC machine need a special computer to run?
No. The machine has its own controller, a dedicated industrial computer that reads G-code and drives the axes. You prepare the program on a normal workstation with CAM software and transfer it by USB, network or a memory card.
The controller handles the real-time motion loop, which is why it is separate from the office PC. It also stores tool offsets, work offsets and machine parameters.
How long does it take to set up a first CNC run?
For a simple 3-axis part, programming and setup often take longer than the cutting. A bracket with two setups might need a few hours of CAM work and 30–60 minutes on the machine before the first article.
Complex 5-axis parts with tight tolerances can take a full day of setup and first-article checks. After that, repeat runs are much faster because the program, fixtures and offsets already exist.
Can one CNC machine make any shape?
No. A mill removes material with a rotating tool, so it cannot reach around internal corners or cut a true square internal corner. Undercuts and enclosed cavities need a different process or a split design.
Turning makes round parts. Five-axis machining adds reach and angle control but still needs line of sight for the tool. If a feature is unreachable, the drawing has to change.
What decides the surface finish on a CNC part?
Four things: tool geometry, cutting data, rigidity and material. A sharp tool with the right chip load and a light finishing pass produces Ra 0.8–1.6 μm in aluminium. A worn tool or a long unsupported tool leaves chatter marks.
Coolant and chip evacuation also matter. Recutting chips scratches the finished wall, which is why air blast or through-spindle coolant helps on deep pockets.
Why does the price change so much between two similar parts?
Tolerance, setup count and material removal volume drive most of it. A part with three setups and a ±0.005 mm bore costs far more than the same outline with a ±0.05 mm bore cut in one setup.
Stock size matters too. A part machined from near-net stock removes less material, cuts faster and wastes less metal. Sending a revised model early often saves more than negotiating the rate.
Is CNC suitable for one prototype part?
Yes. Setup dominates the cost of a single part, but the part is usually delivered in days. No tooling is needed, so design changes are cheap before the design freezes.
Once the design is stable and volumes grow, compare CNC against casting or molding. The crossover point depends on geometry and tolerance, not on a fixed number.
Send your drawing and get a real answer
Upload a STEP file and get a quotation plus a free DFM analysis within 12 hours. No minimum order quantity, from one prototype to 10,000+ parts.
12-hour quote100% inspectionNDA on request