Guide · Milling

How to Cut a Spur Gear on a CNC Mill with a 4th Axis

Cut a spur gear on a milling machine with a rotary axis and a form cutter: choosing the cutter number, blank size, depth, indexing program and checking the teeth.

By cnccode · Updated
On this page
  1. 1. Identify the gear
  2. 2. Choose the cutter
  3. 3. Blank and setup
  4. 4. Program
  5. 5. Check
  6. More guides
  7. Frequently asked questions

For one replacement gear you do not need a hobbing machine. A mill with a 4th axis and a disc cutter is enough for ordinary accuracy.

1. Identify the gear

Count the teeth and measure the outside diameter. Module = outside diameter / (teeth + 2). The gear calculator gives all other values.

2. Choose the cutter

Involute form cutters come in sets of eight per module, because the tooth shape depends on the number of teeth. In the metric (module) numbering:

Cutter no.Teeth
112–13
214–16
317–20
421–25
526–34
635–54
755–134
8135 to rack

The DP series is usually numbered the other way round: number 1 is for 135 teeth and more. Read the marking on the cutter.

3. Blank and setup

  • Turn the blank on the same mandrel you use for milling, so the teeth run true to the bore.
  • Support the mandrel with a tailstock.
  • Set the cutter exactly on the centre line of the part. An error here makes leaning teeth.

4. Program

This example cuts 24 teeth of module 2 with A as the rotary axis along X. Depth 4.5 mm is cut in two steps. Z0 is the top of the blank and the cutter runs on a horizontal arbor or an angle head. Macro variables are used, so a Fanuc style control with Macro B is needed.

G-code (Fanuc Macro B)
#1=24 (TEETH)
#2=4.5 (FULL DEPTH)
#3=0
WHILE [#3 LT #1] DO1
G90 G00 A[#3*360/#1]
#4=1
WHILE [#4 LE 2] DO2
G00 X-40. Z5.
Z[-#2*#4/2]
G01 X40. F120.
G00 Z5.
#4=#4+1
END2
#3=#3+1
END1

Lock the rotary axis while cutting if your machine has a brake.

5. Check

Measure the span over several teeth with a disc micrometer before you take the part off. The calculator shows the number of teeth and the value without backlash. Subtract 0.05 to 0.15 mm and deepen the cut in small steps until you are there.

Frequently asked questions

Can I cut a gear without a form cutter?
Yes. With a 4th axis and a small ball-nose or end mill you can machine each flank as a surface. It is slow but works for large modules. Wire EDM is the most accurate way for single gears.
How accurate is a form-cut gear?
Good enough for hand drives and slow machinery. One cutter covers a range of tooth counts, so the shape is exact only for the lowest number in the range.
Was this page helpful?