CNC Machining

How routers, mills and lathes work and how to use them: programming, workholding, CAM, designing parts for machining, cutting different materials, and staying safe, with worked examples and diagrams.

A CNC (computer numerical control) machine moves a tool along programmed paths, so it cuts the same part every time. This guide covers the machining side: how mills, routers and lathes work, how to program and hold a part, how to design parts that machine well, how to cut different materials, and how to stay safe. For spindle speeds and feed rates see Speeds & Feeds. For laser cutters see Laser Cutting.

Start here: what do you need?

I need to…Go to
understand the machine types, the axes, and how a part is madeCNC Machines and Workflow
choose an end mill, drill or holder, or fix tool wear and breakageMilling: Operations and Tooling
use a lathe: inserts, speeds, threading, parting, surface finishTurning: Lathes and Operations
hold a part in a vise, clamp it, or fixture itWorkholding and Fixturing
read or write G-code, set work offsets, program a latheG-code and Programming
set up CAM toolpaths, adaptive clearing, finishing and postsCAM and Toolpaths
design a milled part that is cheap and easy to machineDesigning for CNC Milling
design a turned part: length, shoulders, grooves, threadsDesigning for Turning
machine aluminum, steel, stainless, brass or titaniumMachining Metals
machine plastics, wood, MDF, composites or foamMachining Plastics, Wood and Composites
stop chatter, find out why parts are the wrong size, or work safelyTroubleshooting, Accuracy and Safety
cut sheet with a laserLaser Cutting

A suggested order

If you are new to machining, read the pages in this order. Each builds on the one before, and the previous and next links at the top and bottom of every page follow it. The design pages are useful even if you send your parts to a shop.

  1. CNC Machines and Workflow: Routers, mills, lathes and mill-turn machines, how they differ, and how a design becomes a finished part.
  2. Milling: Operations and Tooling: Facing, pocketing, slotting, profiling and drilling, with end mill geometry, coatings, holders and chip load.
  3. Turning: Lathes and Operations: Lathe anatomy, facing, turning, boring, grooving, threading and parting, inserts, speeds and surface finish.
  4. Workholding and Fixturing: Vises, soft jaws, clamps, vacuum tables, chucks and collets, and how to hold a part without bending it.
  5. G-code and Programming: Coordinates, work offsets, arcs, canned cycles and subprograms for mills, plus lathe G-code and machine accuracy.
  6. CAM and Toolpaths: Roughing and finishing strategies, adaptive clearing, lead-ins, scallop height, simulation and post processors.
  7. Designing for CNC Milling: Inside corner radii, wall thickness, pocket depth, holes, threads, tolerances and what drives the cost of a part.
  8. Designing for Turning: Length-to-diameter limits, shoulders, grooves, undercuts, threads, bar stock and what needs a second operation.
  9. Machining Metals: Aluminum, steels, stainless, brass, copper, titanium and cast iron: machinability, tools, coolant and problems.
  10. Machining Plastics, Wood and Composites: Acetal, nylon, acrylic, PEEK, hardwoods, MDF, carbon fiber and foam: melting, fraying, dust and tool choice.
  11. Troubleshooting, Accuracy and Safety: Chatter, tool breakage, size and finish problems, thermal growth, inspection and safe practice.

Quick reference: formulas

QuantityFormulaPage
Spindle speedn = 1 000 × Vc ÷ (π × D)CNC Machines and Workflow
Feed rate (milling)Vf = n × z × fzCNC Machines and Workflow
Material removal rateMRR = ae × ap × Vf (mm³/min)CNC Machines and Workflow
Cutting powerPc = ae ap Vf kc ÷ (60 × 106) kWCNC Machines and Workflow
Chip-thinning factorD ÷ (2 √(D ae − ae2))Milling: Operations and Tooling
Tool deflectionδ = F L³ ÷ (3 E I), I = π D4 ÷ 64Milling: Operations and Tooling
Turning: feed rate, removal rateVf = n × f; MRR = Vc f ap (cm³/min)Turning: Lathes and Operations
Theoretical turned finishRa = f² ÷ (32 r)Turning: Lathes and Operations
Thread depth (ISO metric, external)h = 0.6134 × PTurning: Lathes and Operations
Strap clamp forceFclamp = Fbolt b ÷ (a + b)Workholding and Fixturing
Scallop height (ball cutter)h = R − √(R² − (s ÷ 2)²)CAM and Toolpaths
Chatter lobe speedsn = 60 fn ÷ (z k)Troubleshooting, Accuracy and Safety
Thermal growthΔL = α L ΔTTroubleshooting, Accuracy and Safety
Steps per mm(full steps × microsteps) ÷ travel per revolutionG-code and Programming

Quick reference: cutting speeds

Typical starting cutting speeds for carbide tools. Use the lower end on a small or light machine. Full details, tool materials and coolant are on Speeds & Feeds and Machining Metals.

MaterialCarbide (m/min)Carbide (SFM)
Aluminum alloys180–600 m/min591–1 969 SFM
Brass (free-cutting)120–230 m/min394–755 SFM
Plastics (acetal, nylon, acrylic)150–300 m/min492–984 SFM
Mild steel (1018, A36)75–150 m/min246–492 SFM
Gray cast iron75–150 m/min246–492 SFM
Alloy steel, annealed (4140)60–120 m/min197–394 SFM
Stainless steel (304)60–120 m/min197–394 SFM
Titanium (Ti-6Al-4V)30–60 m/min98–197 SFM

Quick reference: what machining can hold

ProcessTypical toleranceTypical surface finish (Ra)
CNC router±0.1–0.2 mm3.2–12 µm (wood and plastic vary)
CNC milling±0.05–0.1 mm (±0.01 with care)1.6–3.2 µm
CNC turning±0.02–0.05 mm (±0.01 with a finishing pass)0.8–3.2 µm
Reaming, boring±0.01–0.02 mm (H7)0.8–1.6 µm
Grinding±0.002–0.005 mm0.2–0.8 µm

These are typical values; see Tolerances by Process and Surface Finish for more detail and for the cost of tightening them.

Calculators

Safety

  • Know how to stop the machine fast, and never leave a running machine unattended.
  • Eye and ear protection, no gloves or loose clothing, hair tied back, near any spinning cutter or chuck.
  • Use extraction for dust: wood, MDF, composites and some metals produce hazardous dust and fumes.
  • Air-cut a new program and check the zero before you cut material.
  • See Troubleshooting, Accuracy and Safety and Workshop Safety; laser safety is on Laser Cutting.

FAQ

How do I choose between a router, mill and laser?

A laser is best for flat sheet parts and engraving in wood, acrylic and leather. A router suits larger parts in wood, plastics and soft aluminum with real depth. A mill is for metal parts that need accuracy and rigidity, and a lathe for round parts. A router and laser combined often cover a small shop’s needs.

Can a hobby CNC cut steel?

Only with a rigid machine, a small cutter, very light cuts and patience; most hobby routers are too flexible. Aluminum, brass and plastics are more realistic. Cutting metal sheet with a laser needs a fiber laser, not a CO2 or diode laser.

Why are my parts not the size I drew?

Check three things: that the steps per mm are correct (a test square will tell you), that the tool radius or kerf has been compensated, and that the material has not moved or changed with temperature. See Troubleshooting, Accuracy and Safety.

Should I design for milling or for turning?

Make round parts on a lathe (shafts, pins, bushings, spacers), and prismatic parts with flats, pockets and patterns on a mill. A part with both can use a lathe and a mill, or a mill-turn machine. See Designing for CNC Milling and Designing for Turning.

What is “climb milling”?

The cutter turns in the direction that pulls it into the stock as it cuts. It produces a better finish and a thinner chip at the exit, and it is the default in most CAM software, but a machine with backlash can grab the cutter, so check that the machine is rigid and use light cuts.

Where do I start with feeds and speeds?

With the tool maker’s data or the CNC Feeds & Speeds Calculator, then adjust by sound, chip shape and finish. The formulas are on CNC Machines and Workflow.

References

  • Oberg, E. et al., Machinery’s Handbook, 31st ed., Industrial Press (cutting data, formulas, tolerances, numerical control).
  • Sandvik Coromant, Metal Cutting Technology and Turning Handbook, and other tool-maker handbooks.
  • NIST, The NIST RS274NGC Interpreter, Version 3 (the reference definition of G-code).
  • Kalpakjian, S. and Schmid, S., Manufacturing Engineering and Technology, Pearson.
  • Smid, P., CNC Programming Handbook, Industrial Press.

Last reviewed: October 2026. Cutting data are starting points: machines, tools and materials differ, so test on scrap, and follow your machine maker’s safety instructions and local rules.