NCBy Kezuriba Editorial Team

Thread Mill Programming: Helical Interpolation, G02/G03 and Z Direction, Feed Correction, Entry, Controls

For an internal right-hand thread, use G03 and go bottom to top. Convert the feed to the tool-center speed!

Chips, the Kezuriba mascot
Thread Mill Programming: Helical Interpolation, G02/G03 and Z Direction, Feed Correction, Entry, Controls

On a machining center, more and more shops make internal threads with a thread mill (thread milling cutter) instead of a tap. A tap just turns and is pushed in, but a thread mill turns while moving in a helix around the hole to cut the thread, so it needs an NC program. This article explains with diagrams the five things you need to write that program: how helical interpolation works, the combinations of G02/G03 and Z direction, feed correction, arc entry, and the differences between controls. At the end there is a calculator that generates the program from your conditions.

How a Thread Mill Works: Rotation + Orbit + One Pitch per Turn

1Rotation: spindle turns (M03)The thread form has no lead2Orbit: around the holeArc interpolation G02/G03 (helical)3Z moves 1 pitch per turnAll three together cut a helical groove!Smaller than the hole; cuts one wall onlyCenter is offset (D − d) ÷ 2 from hole center
How a thread mill cuts an internal thread (conceptual diagram; the yellow dotted line is the tool path). The ridges of the cutter are rings with no lead; moving three things at once, tool rotation, orbit around the hole and Z feed, produces a thread with a helix[1][7].

A thread mill’s cutting edge is a row of rings shaped like thread ridges. Being rings, they have no helix (lead) and by themselves would only cut a groove. So three motions are made at the same time: the tool’s rotation (spindle turning), its orbit around the hole (circular interpolation), and a Z feed of one pitch per orbit. Together they cut a helical groove, which is the thread. Moving this “arc + straight line” in a single block is called helical interpolation. On a machining center that can move X, Y and Z at the same time, you can usually use it just by adding Z to G02/G03 (on some machines it is an option)[1][7].

The tool is smaller than the hole and rotates while touching one side of the wall. The tool center travels on a circle offset from the hole center by (D − d) ÷ 2, where D = nominal diameter of the thread and d = diameter of the tool’s cutting edge. You can write the program either as the tool-center path, or as the thread circle and let cutter radius compensation (G41) handle it; the way of writing differs (explained later).

Thread Mill vs. Tap: When to Use Each

Conceptual diagram comparing a tap broken in a hole with a thread mill moving in a helix
Left: a tap broken in a blind hole. Right: a thread mill, thinner than the hole, cuts by orbiting in a helix, so it can be pulled out even if it stops (conceptual diagram)[3].
One tool, many threadsWith the same pitch, one tool cuts threads of different nominal diameters, and both right- and left-hand threads. Size is adjusted by NC compensation[1].
Down to the bottom of blind holesSuits blind holes with little room in the pilot hole: the incomplete thread is one ridge or less. Pilot hole depth only needs thread length + 1 pitch[1].
Removable even if it breaksThe tool is thinner than the hole, so it can be pulled out of the part even if it stops. Use it for expensive parts or hard-to-machine materials where you want to avoid tap breakage[3].
Big threads on small machinesIt cuts a little at a time with its side, so even large-diameter threads need little spindle power (rigidity is still needed). Chips also break into small pieces[1].

It has weaknesses too. You need a machine with simultaneous 3-axis motion and helical interpolation, and because of the arc entry, main cut and exit, it is often slower than tapping (especially when a single-form tool makes many turns). You also have to set up the radius compensation value against a thread gauge. In addition, a tool for internal threads cannot cut external threads: in a metric thread, the crest and root of the internal and external thread are cut differently[1]. As a rule of thumb, use taps for many small-diameter threads, and a thread mill for hard-to-machine materials, expensive parts, large diameters, or blind holes where the thread is needed deep to the bottom.

Cutter Types: Single-Form and Multi-Form

Single1 ridgeMany turnsMulti (comb)Many ridges, 1 turnFast, but flexes
Left: single-form cutter with one ridge. Right: multi-form cutter with ridges lined up like a comb (conceptual diagram)[1].
Single (1 ridge)Multi (comb type)
Turns for the main cutThread length ÷ pitch (+ entry and exit)1 turn if the cutting length ≥ thread length (+ entry and exit)
Machining timeLongShort
Cutting force / deflectionLow. Suits deep threads and long tool overhangThe whole cutting length engages at once, so it flexes easily and tends to taper (different diameter at the mouth and the bottom)
OSG’s termSingle feed (single pass)Multi feed (multi pass)

A multi-form tool whose cutting length is shorter than the thread is stepped along Z in several passes (only for tools whose neck diameter is smaller than the thread root diameter). Tools with a cutting length of one ridge, with bottom-cutting edges, or with a roughing ridge at the tip must always be moved in the single-form way[1]. As a guide, keep the tool diameter to 70% of the thread diameter or less: the larger the diameter, the larger the error in the thread profile (in Sandvik’s example for M30×3, a 21.7 mm cutter gives 0.07 mm error, an 11.7 mm cutter gives 0.01 mm)[2]. However, special tools designed with the thread profile for a given diameter may exceed 70%, so follow the “minimum machining diameter” in the catalog.[1].

Rotation Direction and Z Direction: Four Combinations

The hand of the thread (right- or left-hand) is determined by the combination of rotation direction (G02/G03) and Z direction (up or down). For a normal right-hand cutter with the spindle in forward rotation (M03), when cutting by climb milling, which is better for tool life, there are four combinations:[2][4][5][9].

Internal, right-handView from aboveG03Bottom to top Z+Internal, left-handView from aboveG03Top to bottom Z−External, right-handView from aboveG02Top to bottom Z−External, left-handView from aboveG02Bottom to top Z+
Combinations for spindle forward (M03), right-hand cutter, climb milling. Internal threads use counterclockwise (G03), external threads clockwise (G02); whether the thread is right- or left-hand is set by the Z direction[2][5][9].

Memory aid: internal = G03, right-hand = “bottom to top”An internal right-hand thread rises counterclockwise from the bottom of the hole. Because the tool moves from the bottom toward the mouth, it is less likely to push chips down to the hole bottom with its end face, and it also avoids bottoming out in a blind hole[1]. If you lower Z while keeping G03, you get a left-hand thread, so beware of the mistake of setting Z the wrong way by looking only at the rotation direction.

The general view is that climb milling favors tool life and conventional milling favors surface finish[1]. Sandvik also says to use climb milling if the machine, fixture and workpiece allow it[2]. However, if climb milling makes a parallel internal thread taper (different diameter at the mouth and the bottom), switching to conventional milling, which has lower cutting force, may fix it[1]. For left-hand cutters for reverse spindle rotation, or tools made to cut a right-hand thread from top to bottom (such as Harvey Tool’s Tri-Form), the directions in the table change, so check the rotation direction in the tool’s catalog.[10][1].

Feed Correction: Tool-Center F Is Lower Than at the Cutting Edge

Internal (M16, tool φ7.7)Dotted = tool-center circle, radius 4.15Edge runs on radius 8 → center F is 52%External (M16, tool φ12)Dotted = tool-center circle, radius 14Edge runs inside → center F is 175%
The machine’s feed F is the speed of the tool center. On an internal thread the cutting edge runs outside the center, and on an external thread inside it, so convert the edge feed (the value calculated from feed per tooth) to the center value (figures calculated with OSG’s formula; the external-thread figure is scaled to 0.62)[1].

The feed calculated from the feed per tooth fz in the cutting-conditions table (fz × number of teeth × rpm) is the speed on the circle the cutting edge follows. But the F the machine follows is the speed of the tool center. On an internal thread the edge travels a larger circle outside the center, so entering F as it is makes the edge too fast, which increases the feed per tooth and causes chipping or breakage[1]. OSG’s formulas are as follows (D = nominal thread diameter, d = tool diameter).

  • Internal thread: F = fz × number of teeth × rpm × (D − d) ÷ D
  • External thread: F = fz × number of teeth × rpm × (D + d) ÷ D

For example, in OSG’s example, cutting M8×1.25 with a φ5.7, 4-tooth tool at fz 0.01 mm and 4,467 min⁻¹, the cutting-edge feed is 178.7 mm/min while the tool-center F is 51.4 mm/min[1]. In Vargus’s example too, cutting M6×1 with a φ4.8 tool gave an edge feed of 238 mm/min against 47 mm/min at the center. If you mix them up, machining time becomes about 5 times longer, or the tool is overloaded.[6].

Don’t correct twiceIf the machine has “arc feed compensation” (it automatically lowers the feed on an inner arc), the F you already corrected in the program may be reduced again. If the actual feed differs from F, turn off the machine’s compensation or fix F[1]. Some NC controls also treat F as the speed along the helix (including Z) (according to the Haas training material)[5]. Because the pitch of a thread is small, the difference is only a few percent.

Writing the Program: Entry, One Turn, Exit

123451From hole center, P/8 below thread bottom2Straight line to (A/2, −A/2)3Enter on a quarter circle of radius A/2 (Z by P/8)4One full turn (G03, Z by P)5Exit on a quarter circle (Z by P/8) to centerA = (nominal dia. − tool dia.) ÷ 2② is 45° before the start point seen from hole center, soentry moves Z by P × 45 ÷ 360 = P/8
Path of the tool center when writing an internal right-hand thread in tool-center coordinates (top view; +Y is up). Entry and exit are quarter circles so the cutting edge engages gradually[4][5][2].

ISCAR’s technical document has an easy-to-follow example of cutting an M48×2 internal right-hand thread with a φ29 cutter, so we borrow its form as is (A = (48 − 29) ÷ 2 = 9.5, A/2 = 4.75; incremental G91, starting from the hole center at the thread bottom)[4].

G91
G01 G41 D1 X4.75 Y-4.75 Z0 F41   (② approach diagonally from the center. D1 is wear offset only)
G03 X4.75 Y4.75 R4.75 Z0.25     (③ enter on a quarter circle. Z is P/8 = 0.25)
G03 X0 Y0 I-9.5 J0 Z2.0         (④ one turn. Z is 1 pitch = 2.0)
G03 X-4.75 Y4.75 R4.75 Z0.25    (⑤ exit on a quarter circle)
G01 G40 X-4.75 Y-4.75 Z0        (back to the center)
  1. Approach from the centerStart P/8 below the hole center / thread bottom and move on a straight line to (A/2, −A/2). If you use cutter radius compensation, put G41 on this line (it cannot be applied in the middle of an arc)[5].
  2. Enter on a quarter circleA 90° arc of radius A/2 (G03 for an internal thread) enters the thread circle tangentially. Z moves P/8.
  3. One pitch per turnI−A J0 gives 360°, and Z moves P. For a single-form tool, repeat this line thread length ÷ P times (with G90, change the Z value by one pitch each time)[1].
  4. Exit on a quarter circle and returnLeave on an arc of the same shape while moving Z by P/8, then cancel compensation with G40 and return to the center.

If you write in tool-center coordinates, you must recalculate the path every time the thread size changes. OSG recommends writing the thread root circle (the nominal-diameter circle for an internal thread) directly as an arc, and entering “half the tool diameter + a fine adjustment for the pitch diameter” as the G41 offset. With this method you can match the diameter just by changing the offset value[1]. The calculator below outputs tool-center coordinates so that any machine can read it easily.

The offset value is not simply the tool radiusA thread mill has ridges with no lead and cuts a helical groove, so the flanks of the ridges engage slightly more (interference). If you use the tool radius as the offset value as it is, the pitch diameter comes out small and the GO side of the thread gauge will not go in. OSG stamps the recommended radius compensation value (RPRG) on the shank; for a φ7.7, P1, M10×1 tool, for example, the tool radius is 3.85 but the RPRG is 3.806[1].

If the finish is good and nothing chips, cut the radial depth in one pass. If it tapers or chips, divide it equally (for 4 passes, 25, 50, 75 and 100% of the thread height), or use 80% for roughing and 100% for finishing, or add one more turn on the same path for finishing (spring pass)[1]. For hardened steel and difficult-to-machine materials, two or more passes is the basic rule[2].

Calculator: Enter Conditions, Get a Program

For internal and external metric threads (60° thread angle), this calculates the spindle speed, tool-center feed and number of turns, and outputs a program in the form above (approach from the center → quarter circle → turns → quarter circle) in tool-center coordinates, absolute (G90). The hole center is X0 Y0, the top surface is Z0, and the tool length offset is H01. Enter the feed per tooth and cutting speed from the conditions table in your tool’s catalog (the initial values are placeholders).

Spindle speed n = 1000 × Vc ÷ (π × d) Peripheral feed Fp = fz × z × n Tool-center radius r: internal (D − d) ÷ 2, external (d3 + d) ÷ 2 (d3 = D − 1.22687 × P) Tool-center feed F: internal Fp × (D − d) ÷ D, external Fp × (D + d) ÷ D Z moves P per turn Z moves P/8 on each quarter-circle entry and exit

Don't run it as isWhat comes out is an example of how to write it. After loading it on the machine, first run it once in the air with Z raised and check by eye that the rotation direction and the up/down direction match the table. Because this style does not use cutter radius compensation, fine diameter adjustment is done with the tool diameter value (or by adding G41 and using wear offset). NC controls differ in the angle that can be turned in one block, in how F is treated, and in how arc R is handled (next section).

Differences by Control

ControlHow to write helical interpolationFor multiple turns
FANUC type (ISO format)In G17, add Z to G02/G03 X Y I J (or R)Treat each block as one full turn, and either line up the rows or repeat with a G91 subprogram (confirm in the official manual)
Mitsubishi Electric / OkumaAdd Z to G02/G03Check the manual of your machine to see whether the number of turns can be specified
HaasAdd Z to G02/G03. F is the speed along the helix including ZIn G91, as in I-0.5 J0 Z0.125 L5, adding L repeats the same arc 5 times[5]
Siemens SINUMERIKG2/G3 X Y Z I J K TURN=TURN = number of full circles made before reaching the end point (0–999). Match the total Z to the sum of the angles turned[7]
HEIDENHAINPlace the pole CC at the hole center, then use CP IPA IZ DR±IPA = total angle of the helix (±5400° = up to 15 turns), IZ = height. DR and IPA have the same sign[8]

The HEIDENHAIN example (M6×1 internal thread, 5 turns) is CC X+40 Y+25 → LP PR+3 PA+270 RL → CP IPA-1800 IZ+5 DR- RL F50.[8]. Newer TNC and SINUMERIK controls also have dedicated thread-milling cycles. On any control, first check that the Z per turn matches the pitch, that G90 and G91 are not mixed up (for inch threads, pitch = 1 ÷ threads per inch).

Common Mistakes and Fixes

Conceptual diagram of checking a cut internal thread by inserting the GO side of a thread plug gauge
A finished internal thread is accepted or rejected with a thread plug gauge (GO / NO-GO), not with the mating bolt (conceptual diagram)[1].
  1. Diameter differs between mouth and bottom (taper) Caused by tool deflection. Shorten the overhang, split the radial depth, use a spring pass, lower the feed per tooth, switch to conventional milling, or change to a single-form tool[1][4].
  2. GO side of the gauge will not enterYou used the tool radius as the offset as it is, forgot to enter an offset, or the tool deflected. Start from the recommended value (RPRG) and adjust in steps of 1/3 to 1/4 of the pitch-diameter tolerance. Aim for about 75% of the tolerance for internal threads and about 25% for external threads[1].
  3. It came out left-handZ was lowered while G03 was kept (internal thread). Check the rotation direction and Z direction against the table, and run it once in the air to watch it[9].
  4. Pitch does not matchZ per turn differs from the pitch, G90 and G91 were mixed up, or the number of turns was increased with TURN or IPA without correcting the total Z[5][7].
  5. Tool chips or breaksThe feed correction was forgotten and the feed per tooth on the internal thread was too large, or chips packed. Convert to the tool-center F, and supply plenty of coolant or air[1].
  6. Wears out quicklyThe feed per tooth is too small and the tool rubs, or the feed was lowered twice by the machine’s arc compensation. Check that F is as calculated[1].

In studies by universities and tool makers, sensors mounted on the tool holder have shown that, of the cutting force in thread milling, the force pushing the tool away from the hole wall (radial force) affects thread accuracy[11][12]. This is why measures that reduce deflection (splitting the cut, shortening the overhang) work.

FAQ

Can I use the same pilot hole diameter for a thread mill as for a tap?
Yes. You can use the recommended pilot hole diameter for a cutting tap as it is. A guide for blind-hole depth is “thread length + 1 pitch”. The tool tip is about 1/2 pitch from the first full thread, so lower Z by the thread length plus one pitch[1].
Can one thread mill cut threads of different nominal diameters, such as M10 and M12?
Yes, if the pitch is the same and the tool is not too large for the thread diameter (for example M10×1.5 and M12×1.5). Right- and left-hand threads can also be cut with the same tool. However, a tool for internal threads cannot cut external threads[1].
Can I enter the value from the conditions table directly as F?
No. The feed calculated from the table’s feed per tooth is the speed of the cutting edge, while the machine’s F is the speed of the tool center. Multiply by (D − d) ÷ D for internal threads and (D + d) ÷ D for external threads. If you don’t, the feed on an internal thread is too high and can chip the tool[1].
Which is faster, a tap or a thread mill?
For many small-diameter threads, a tap is usually faster, because a thread mill needs entry, one-turn and exit arcs, and a single-form tool makes many turns. In return, there is less risk of breakage, you can adjust the diameter by compensation, and one tool works for many kinds of threads[1][3].

For what G02 and G03 themselves mean, see the G02 / G03 dictionary pages; for tapping, see the list of canned cycles (G84); for how to remove a broken tap, see How to remove a broken tap; for whole machining center programs, see Machining Center Programming for Beginners; for tap pilot holes and spindle speeds, see the tapping calculator.

Sources

  1. OSG, “Technical Data Series No. 33: Thread Milling Cutters (Thread Mills)” (revised May 2022)
  2. Sandvik Coromant, "Thread milling: application tips"
  3. Sandvik Coromant, "Thread milling"
  4. ISCAR, “Thread Milling” technical document (program examples and troubleshooting table)
  5. Haas Factory Outlet (Productivity Inc.), “Haas Mill Programming” training material (revised June 2026; reproduced with Haas’s permission, as stated in the document)
  6. Modern Machine Shop, "Get the Feed Rate Right When Thread Milling"
  7. Siemens, “SINUMERIK 840D sl Fundamentals Programming Manual”, 10.7 Helical interpolation (January 2015 edition)
  8. HEIDENHAIN, “TNC 410 User’s Manual”, 6.5 Helical interpolation
  9. HEIDENHAIN, “TNC 406 User’s Manual”, Helical interpolation (table of internal/external threads and directions)
  10. Harvey Tool, "Thread Milling Cutters"
  11. Matsui et al., “Study of machining phenomena in helical-interpolation thread milling based on monitoring in the tool rotating coordinate system” (in Japanese), Journal of the Japan Society for Abrasive Technology 64(5), 260-266 (2020)
  12. Matsui et al., International Journal of Automation Technology 18(4), 472-482 (2024)

More articles