GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC calculation basics

Current calculation formulas for CNC programming and treatment

This page explains the handful of formulas for CNC programming that actually get used at the machine, where each one breaks down, and how the numbers change when a part goes to heat treatment. Written for engineers and buyers who need to sanity-check a program before metal is cut.

±0.005 mm toleranceRa 0.2–0.8 μm available4,000 mm max size12-hour DFM reply
Formulas for CNC programming and treatment shown on a shop reference sheet
Definitions

What the core formulas for CNC programming actually describe

Almost every cutting calculation on a shop floor comes from four quantities: surface speed, feed per tooth, depth of cut and the resulting metal removal rate. Surface speed is how fast the tool edge travels along the material, expressed in meters per minute or surface feet per minute. Feed per tooth is how far the cutter advances while one insert is in the cut. Depth of cut is how much material the tool bites radially and axially. Metal removal rate is the product of all three, and it decides how long a cycle takes.

The surface speed formula is Vc = (π × D × n) / 1000, where D is tool diameter in millimeters and n is spindle speed in rpm. Rearranged for programming, n = (Vc × 1000) / (π × D). That is the number you type into the S word. Feed rate in mm/min comes from f = fz × z × n, where fz is feed per tooth and z is the number of flutes. Three lines of arithmetic, and the whole program changes.

These formulas are descriptive, not prescriptive. They tell you what a given rpm and feed will produce. They do not tell you whether the setup can take it, whether the chips will clear, or whether the spindle has the torque at that speed. That judgment stays with the programmer and the operator.

One more thing worth writing down: unit consistency. Mix millimeters and inches inside the same calculation and the answer is wrong by a factor of 25.4. Pick one system per job and stay in it.

  • 1
    VcSurface speed in m/min; the input you actually choose
  • 2
    nSpindle speed in rpm; the S word in the program
  • 3
    fzFeed per tooth in mm; the chip the insert has to make
  • 4
    zNumber of flutes or inserts on the cutter
Inputs

Choosing the inputs: speeds, feeds and the values that matter

Surface speed is selected from the tool material and the workpiece material, in that order. Carbide in aluminum runs far faster than carbide in titanium. A coated carbide end mill in 6061-T6 might run 300 to 500 m/min. The same cutter in Ti-6Al-4V (TC4) drops to roughly 40 to 70 m/min. In 17-4PH stainless, expect 60 to 100 m/min. HSS tooling sits much lower across the board.

Feed per tooth is a chip-thickness target, not a speed. A 10 mm three-flute carbide end mill in aluminum usually runs 0.05 to 0.15 mm per tooth for roughing. In stainless, 0.03 to 0.08 mm per tooth. In titanium, 0.02 to 0.06 mm per tooth, because the material work-hardens and a thin chip rubs instead of cutting. Go too light and the edge polishes the surface. Go too heavy and the tool deflects.

Depth of cut is where shops differ most. A conservative radial stepover of 10 to 25 percent of cutter diameter keeps deflection low on long tools. High-efficiency roughing paths push radial engagement down to 5 to 10 percent while taking axial depth equal to one or two times the diameter. Both are valid. The first is easier to prove out on a first article.

Roughing and finishing rarely share the same numbers. Roughing cares about removal rate and tool life. Finishing cares about surface finish, which depends on feed per tooth and the corner radius of the insert. A finishing pass at 0.03 mm per tooth with a 0.8 mm corner radius gives a much smoother wall than the same feed with a sharp corner.

  • 1
    Aluminum 6061-T6Roughly 300–500 m/min with coated carbide
  • 2
    Stainless 17-4PHRoughly 60–100 m/min; watch work hardening
  • 3
    Titanium TC4Roughly 40–70 m/min; keep the chip thick enough
Verification

Checking the numbers before the first cut

Spindle speed and feed you can calculate in a minute. The rest of the check is about whether the machine can execute the result. Power at the cut is the usual limit on heavy roughing. A rough estimate is that cutting power in kW rises with removal rate, and removal rate climbs fast when you increase depth of cut. If the calculated removal rate needs more than roughly 70 to 80 percent of spindle power, the cut will bog down.

Torque matters more than power at low rpm. Large-diameter face mills and big drills run slowly, and that is exactly where spindle torque is weakest. A 50 mm face mill at 800 rpm will stall a machine that handles a 16 mm end mill at 8,000 rpm without complaint. Check the torque curve, not just the peak power figure.

Tool deflection is the silent variable. It does not appear in any basic formula, but it sets the real limit on finishing accuracy. A long, small-diameter tool will bend under cutting force, and the wall comes out tapered or the floor comes out convex. Shorten the gauge length, reduce radial engagement, or change to a stiffer tool. If the part needs ±0.005 mm, this is the check that decides whether the process holds.

Program verification is the last gate. Simulate the toolpath, check for gouges and rapid collisions, and confirm that the stock model matches the blank. Most scrapped first articles come from a setup or fixture error, not from a wrong feed number.

  • 1
    PowerHeavy roughing limit; stay under about 70–80 percent of spindle power
  • 2
    TorqueThe real limit for large-diameter tools at low rpm
  • 3
    DeflectionSets achievable accuracy on long, slender tools
Heat treatment

How heat treatment moves the numbers

Heat treatment changes the material under the tool, so the formulas that were correct before the furnace are no longer correct after it. Annealing softens steel and makes it easier to cut. Normalizing gives a more uniform grain structure. Quenching and tempering raise hardness, and hardness drives surface speed down. A 4140 part at 28 HRC machines quite differently from the same part at 45 HRC.

The common mistake is to program pre-hardened stock with the same speeds used on annealed stock. The tool survives for a few parts, then fails suddenly. As a rule, drop surface speed as hardness rises, and expect feed per tooth to come down with it. Coated carbide and, in some cases, ceramic inserts are what make hardened material practical at all.

Heat treatment also moves dimensions. Quenching and tempering cause distortion, and the amount depends on section thickness and part geometry. Thin walls and long shafts move more. This is why hardened parts are usually roughed oversize, heat treated, then finished. The finish allowance has to be big enough to clean up the distortion. On a typical hardened steel part, that allowance is a few tenths of a millimeter per side, not a few hundredths.

For parts that need both hardness and tight tolerance, the sequence matters as much as the numbers. Rough, stress relieve, semi-finish, heat treat, then finish grind or finish mill. Each step removes a predictable amount of material, and the final pass is the one that holds ±0.005 mm.

Surface finish also changes after treatment. Oxide scale and decarburized layers have to come off before any finish pass counts. A light cleanup cut after heat treatment is normal practice, not extra work.

  • 1
    AnnealedLowest hardness; highest surface speed allowed
  • 2
    Quenched and temperedHardness sets the ceiling on speed and feed
  • 3
    Thin sectionsMove more in the quench; leave more finish allowance
Reference

Typical starting values by material and operation

Starting points only; confirm against tool supplier data and the actual machine.

MaterialOperationSurface speedFeed per tooth
Aluminum 6061-T6Rough, 3-flute carbide300–500 m/min0.05–0.15 mm
Aluminum 7075Finish, 3-flute carbide250–450 m/min0.03–0.08 mm
Stainless 17-4PHRough, coated carbide60–100 m/min0.03–0.08 mm
Steel 4140 annealedRough, coated carbide90–150 m/min0.05–0.12 mm
Steel 4140 at 45 HRCFinish, coated carbide50–90 m/min0.02–0.05 mm
Titanium TC4Rough, coated carbide40–70 m/min0.02–0.06 mm
InconelRough, coated carbide20–40 m/min0.02–0.05 mm
POM / PEEKRough, 2-flute carbide150–400 m/min0.05–0.15 mm

Where the calculation stops and the setup begins

Use the formulas to pick a starting point, then let the setup decide the rest. If the part is simple, short-tooled and soft, push removal rate hard. If the part is thin-walled, long-reach or hardened above 40 HRC, cut the numbers back and spend the time on the fixture and the finish allowance instead.

FAQs

Questions engineers ask about these calculations

Do I need to recalculate speeds and feeds for every tool in the program?

Yes, because surface speed depends on tool diameter. A 6 mm cutter and a 20 mm cutter cannot share the same rpm if they are cutting the same material. The formula n = (Vc × 1000) / (π × D) makes that clear: same Vc, different n.

Why does the same formula give poor results on a long tool?

Because the formula ignores deflection and vibration. A long tool with a small diameter bends under cutting force, and the actual chip load at the tip differs from the programmed value. Reduce radial engagement or shorten the tool's gauge length.

Should I use the tool supplier's recommended values or calculate them myself?

Start with the supplier's data, then verify with the formula. Supplier tables assume ideal rigidity and coolant. Your machine, fixture and part geometry will push the real values down. Treat the table as an upper bound.

How much material should I leave for heat treatment?

It depends on section thickness and geometry, but a few tenths of a millimeter per side is typical for hardened steel. Thin walls and long shafts distort more, so they need more allowance. Rough oversize, treat, then finish.

Does coolant change the calculation?

It changes the practical limit, not the arithmetic. Flood coolant lets you hold higher surface speed for longer. Through-tool coolant helps most in deep pockets and in titanium, where heat concentrates at the edge.

What is the most common arithmetic error in CNC programming?

Mixing units. Millimeters and inches in the same calculation produce an answer that is wrong by 25.4 times, and the error often survives simulation because the toolpath is still geometrically valid. Pick one unit system per job.

Send the drawing, get the numbers checked

Upload a model and we will review the toolpath assumptions, material condition and finish allowance before cutting. Quotation and DFM analysis within 12 hours.

12-hour quote100% inspectionNDA on request

Follow

More shop-floor notes from GreatLight

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC