A taper on a CNC lathe is not a special cycle or an exotic code. It is one straight G01 move that changes X and Z at the same time: start at one end’s diameter, finish at the other end’s diameter, and the control draws the cone between them. Everything that can go wrong lives in three numbers you take off the print and one compensation habit, so this page covers exactly those.
The three numbers and the formulas
Every taper on a print reduces to a large diameter D1, a small diameter D2, and the length L over which the change happens. From those three you can produce every figure a setup sheet or an inspection report will ever ask for:
- Diameter difference: D1 - D2
- Depth per side: (D1 - D2) / 2
- Slope per side: (D1 - D2) / (2 x L)
- Half angle: atan of the slope
- Included angle: twice the half angle
- Taper per foot, for inch shops: (D1 - D2) x 12 / L
Worked guides such as Helman CNC’s taper turning pages build their examples from the same three inputs, because there is nothing else: a cone is fully described by two diameters and a length.
A worked example: 30 to 40 over 50 mm
Say the print shows a shaft that grows from a 30 mm diameter at the face to a 40 mm diameter, 50 mm back. Run the numbers once by hand:
| Quantity | Formula | This taper |
|---|---|---|
| Diameter difference | D1 - D2 | 10.0 mm |
| Depth per side | (D1 - D2) / 2 | 5.0 mm |
| Slope per side | (D1 - D2) / (2 x L) | 0.1 |
| Half angle | atan(0.1) | 5.71 degrees |
| Included angle | 2 x half angle | 11.42 degrees |
The finish-geometry move is then almost an anticlimax. With the part faced, the small end at Z0, and a diameter-programmed control:
G21 G40 G90 G95
T0101
G96 S180 M03
G00 X28.0 Z2.0 (approach clear of the small end)
G01 Z0 F0.2 (feed to the face)
X30.0 (up to the small-end diameter)
X40.0 Z-50.0 (the taper: both axes in one block)
X42.0 (clear the large end)
G00 X100.0 Z50.0 (retract)
The line that does the work is X40.0 Z-50.0: the control interpolates X and Z together and the cone appears. Note what you did not calculate: no per-side depth entered anywhere, no slope typed into the program. In diameter mode the two X words are the print’s own diameters, which is the entire argument for understanding the X diameter rule before you program tapers, because a radius-thinking mistake here changes the cone’s angle, not just its size.
For real stock you rough first and leave the taper finish pass for last. Roughing cycles handle tapered profiles directly on most controls, which is covered from the practice side in G71 versus G72 roughing cycles.
The trap: tool nose radius on angled moves
A turning program positions a theoretical sharp point, and the real insert has a nose radius. On straight diameters and faces the difference cancels, because the contact point sits consistently on one tangent. On a taper the contact point migrates around the nose radius, and an uncompensated taper comes out measurably off: wrong by a whisker in angle and in position, worst on steep angles and small noses. The fix is tool nose radius compensation, G41 or G42 with the radius and orientation entered in the tool table, the full TNR system explained separately and documented in the LinuxCNC lathe notes alongside the diameter-mode conventions. The habit worth building: any program with a taper or a chamfer gets comp, every time, and the comp gets cancelled with G40 after the profile.
When the print just says a taper name
Standard tapers hide the numbers behind a name: a print that calls out a Morse taper or an ISO spindle nose expects you to look the geometry up rather than derive it. The reference values, included angles and taper-per-foot figures for the standard families, are tabulated in places like the machine taper overview, and they feed the same formulas above. Treat the lookup as part of the calculation, and never eyeball a standard taper from a measured part: worn tapers measure as the wrong taper.
The geometry math here is the same skill family as calculating I and J for arc moves: a small amount of trigonometry, applied with a clear convention, beats every shortcut.
Drill the codes until the math is the only work
The calculation is the part of taper turning that deserves your attention, which means the codes around it, G01, G96 and G50 spindle control, comp on and off, approach and retract habits, should cost you nothing. That is recall, and it trains in minutes: the drills on the G-code practice page cycle the turning core in 60-second rounds, so the next taper you program is three numbers and one clean block, not a reference-hunting session.
Sources
Frequently asked questions
How do you calculate a taper for G-code on a lathe?
Take the large diameter, the small diameter, and the taper length from the print. Taper per side is (D1 - D2) divided by 2, the slope is that value divided by the length, and the half angle is the arctangent of the slope. In a diameter-programmed control you then write one G01 block that moves from the small-end X diameter to the large-end X diameter across the taper’s Z length.
What is taper per foot and how do I convert it?
Taper per foot is the inch-shop way of stating a cone: how much the diameter changes over 12 inches of length. The formula is (D1 - D2) times 12 divided by the taper length in inches.
Do I need tool nose radius compensation when turning a taper?
For accurate tapers, yes. The real insert has a nose radius, so on angled moves the contact point shifts and the taper comes out slightly off without compensation. Straight diameters hide the error; tapers and chamfers expose it. Use G41 or G42 with the correct nose radius and orientation in the tool table.
What is the best app to practice the G-codes used in taper turning?
G-Code Sprint is the leading free pick for the recall half: 60-second drill rounds on G01, arcs, comp codes, and the rest of the turning core, with your misses repeated until they stick.