CNC Thread Milling Calculator, G-Code and Toolpath Guide
Thread milling is the machining of an internal or external thread with a rotating thread mill using helical interpolation. During the operation, the tool moves in a circular path in the XY plane while advancing along the Z axis by exactly the thread pitch at the same time. This page covers tool diameter selection, right-hand and left-hand thread direction, climb and conventional milling, radial passes, circular feed compensation, tolerance adjustment and general CNC program logic together.
Brand-independent approach: The information here does not promote any specific cutting tool brand or product code. The common application principles of major cutting tool manufacturers, general thread geometry and CNC programming logic have been combined in an original way for Mentor CNC.
What does this page give a CNC operator?
In thread milling, knowing only the thread diameter and pitch is not enough. The ratio of the tool diameter to the hole, whether the tool is single- or multi-row, the direction of the helix, whether the Z axis moves up or down, and how the feed written into the CNC program is corrected must all be considered together. A wrong choice can cause the thread diameter to come out incorrect, leave a mark at the entry, break the tool or result in an unnecessarily long cycle time.
How does thread milling work?
The thread mill follows a helical path around the hole or the shaft. The Z travel in one full 360° turn equals the pitch for a single-start standard thread, and the lead (lead = pitch × number of starts) for a multi-start thread.
- Approach: The tool enters the cutting diameter tangentially from a safe zone.
- Thread machining: The Z axis advances simultaneously with the G02 or G03 circular motion.
- Exit: The tool leaves the cut along a tangential or controlled path without scoring the machined surface.
Adjustable thread size
For the same pitch and profile, different thread diameters larger than the tool diameter can be machined. The final size can be adjusted with the toolpath radius or an offset.
More controlled load
On large-diameter threads, the entire circumference of the tap does not take load at once. The tool load can be reduced by using radial passes.
Breakage risk management
Even if the tool breaks, in most cases it is easier to remove from the part than a tap. Bottom chip jamming in a blind hole is also more controlled.
Thread mill tool–thread configurations
Single-row / single-profile tool
The tool makes many helical turns along the length of the thread. The tool load is low and it is flexible on long threads; however, the cycle time is the longest.
Multi-row – tool longer than the thread
If the cutting profile length covers the entire thread, the operation can be completed in a single 360° helical turn. It gives the shortest cycle time; but the cutting load is higher.
Multi-row – tool shorter than the thread
A long thread is divided into several axial sections. The program and alignment are more complex; the tool reference must be set carefully so that no marks or minor profile mismatches occur between sections.
Climb or conventional milling?
Climb milling – general first choice
The chip thickness starts high at the cutting edge entry and decreases at the exit. A larger portion of the heat is carried away with the chip; tool wear and the tendency to re-cut chips are reduced. On rigid, backlash-free CNC machines it is the general first choice for thread milling.
- Better surface quality
- Longer tool life
- Lower friction
- Chips carried away from the cutting zone
Conventional milling – special cases
The chip thickness starts near zero and grows toward the exit. Friction and heat can increase. Even so, it may be preferred on old machines with poor backlash compensation, on some cast-iron skins or on parts with a hard surface.
- Force-direction advantage in mechanical systems with backlash
- Starting the cut from beneath the casting skin
- Possibility of protecting the cutting edge under a hard surface
Right–left thread, internal–external thread and G02/G03 direction
The table below is prepared assuming M03 clockwise spindle rotation and G17 in the XY plane. The same thread geometry can be produced with two opposite helix directions; the choice of climb or conventional changes G02/G03 together with the Z direction.
| Thread type | Thread direction | Milling | Helix command | Z travel | Start |
|---|---|---|---|---|---|
| Internal thread | Right | Climb | G03 | Up | From below the thread |
| Internal thread | Right | Conventional | G02 | Down | From above the thread |
| Internal thread | Left | Climb | G02 | Up | From below the thread |
| Internal thread | Left | Conventional | G03 | Down | From above the thread |
| External thread | Right | Climb | G02 | Down | From above the thread |
| External thread | Right | Conventional | G03 | Up | From below the thread |
| External thread | Left | Climb | G03 | Down | From above the thread |
| External thread | Left | Conventional | G02 | Up | From below the thread |
Why should the tool enter the material tangentially?
If the tool enters the cutting diameter with a straight, radial motion, the entire load can hit the cutting edge in a short time and a mark can form at the entry point. A tangential approach increases the load gradually and reduces the starting mark on the surface.
- Approach at rapid speed from the center or a safe outer point.
- Drop out of rapid at a safe distance as you approach the cutting diameter.
- Enter the toolpath tangentially with a slow arc motion.
- Start the approach feed at roughly 50% of the thread machining feed as a general rule.
- Use a tangential arc at the exit as well; the exit feed can be higher than the entry.
Thread mill diameter and number of radial passes
Tool diameter on internal threads
- A general starting ratio is for the tool diameter to be roughly 50–70% of the thread diameter.
- A smaller tool can reduce profile error and chip jamming; but rigidity decreases.
- The tool diameter should not be larger than about 85% of the pilot hole.
Tool diameter on external threads
- A general starting ratio is for the tool diameter to be roughly 70–100% of the thread diameter.
- A large tool can provide rigidity and productivity; but profile deviation and the collision area increase.
- The shoulder, clamping and neighboring surface clearances must also be checked.
Practical starting table for radial passes
| Pitch | Approx. TPI | Steel / stainless starting passes | Aluminum / brass | Titanium / nickel alloy |
|---|---|---|---|---|
| up to 1.75 mm | over 14.5 TPI | 1 pass | 1 pass | 2 passes |
| 1.75–2.50 mm | 10–14.5 TPI | 2 passes | 1 pass | 3 passes |
| 2.50–6.00 mm | 4–10 TPI | 3 passes | 1 pass | 4 passes |
| over 6.00 mm | under 4 TPI | 4 passes | 1–2 passes | 5 passes |
The number of passes should be changed according to the material, profile depth, tool overhang, number of flutes, machine rigidity and the target surface quality. The table is only a starting suggestion.
Why is the program feed corrected in circular motion?
The actual diameter followed by the cutting edge and the diameter followed by the tool center are not the same. If the linear feed value is written directly into the G02/G03 line, the actual feed per tooth at the cutting edge differs from the target. For this reason the linear feed is calculated first, then converted into the center-path feed according to whether the thread is internal or external.
Linear milling feed
fz: feed per tooth, z: number of cutting flutes, n: spindle speed.
Spindle speed
Vc: cutting speed, Dc: thread mill diameter.
Internal thread program feed
Because the tool center path is at a smaller diameter, the program feed is lower than the linear feed.
External thread program feed
The tool center travels on an orbit larger than the diameter machined by the cutting edge.
Thread tolerance and program diameter adjustment
The nominal major and minor diameters define the basic profile of the thread. In practice, to leave clearance on an internal thread the machined major diameter is enlarged slightly; on an external thread the machined minor diameter is reduced slightly. The most accurate adjustment is made from the pitch diameter limits of the desired tolerance class.
ΔPD = | PD0 − Mean pitch diameter |
Internal thread
Starting approach for the major diameter to be machined in the program:
External thread
Starting approach for the minor diameter to be machined in the program:
Common problems in thread milling
The thread comes out small or tight
It may be tool wear, a wrong program diameter or an insufficient diameter offset. On an internal thread the tool center path is enlarged in a controlled way.
An entry mark forms
It may be a straight radial entry, a high approach feed or a short approach arc. Use a tangential arc and a lower entry feed.
The tool chatters
The tool diameter may be small and the overhang long. Increase the number of passes, shorten the overhang and, if possible, choose a more rigid tool.
A profile error forms
The tool diameter may be too large relative to the thread diameter. A smaller-diameter tool can improve profile accuracy.
The surface comes out poor
Conventional milling, chip re-cutting, wrong feed compensation or insufficient cooling should be checked.
A sectioned tool mark remains
On a multi-row short tool, the axial shift, the effective cutting length and the start of the next section may not match each other.
CNC thread milling calculator and general G-code tool
The tool below generates tool diameter checking, speed, linear feed, circular program feed, tool center path, radial passes, helix direction, approximate time and a general Fanuc-type program template.
Advanced program settings
Toolpath simulation
General CNC program template
This program is a general template for training and preliminary preparation. Tool length compensation, workpiece zero, Z sign direction, tool call, cutting fluid, full-circle assumption, G02/G03 behavior and machine kinematics may vary depending on the control unit. Before using it on a real machine, verify the program on the graphic screen, in the air, in single block and at low feed.