---
title: "How to Read a Thread Milling G-Code Program Without Getting Lost"
description: "A thread milling program is one helix wearing G-code: an arc in XY with a Z move on the same line. Read the pitch, the radius logic, and the comp, in that order."
url: https://gcodepractice.com/journal/how-to-read-a-thread-milling-g-code-program/
canonical: https://gcodepractice.com/journal/how-to-read-a-thread-milling-g-code-program/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-05
updated: 2026-06-05
category: "Practice"
tags: ["thread-milling", "helical", "g-code", "reading"]
lang: en
---

# How to Read a Thread Milling G-Code Program Without Getting Lost

> **TL;DR** Thread milling programs revolve around one signature block: helical interpolation, a G02 or G03 arc in XY with a simultaneous Z word on the same line, where one full circle of arc paired with one pitch of Z travel cuts one turn of thread. Everything else in the program supports that block: positioning to the hole, a lead-in arc onto the thread diameter (usually under G41/G42 comp), the helix itself (sometimes repeated or looped for multiple turns), and a lead-out. Read the pitch off the Z word, the thread size off the radius arithmetic, and the climb-versus-conventional intent off the arc direction.

Thread milling intimidates on first contact because its core block does something single-point training never showed: three axes interpolating together. The unlock is realizing the program is drawing a screw thread in space, one helix at a time, and every confusing line is one of four supporting jobs around that helix.

## The signature block: an arc that also climbs

Helical interpolation is [standard circular interpolation](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g2-g3) with a Z word added: `G03 X.. Y.. I.. J.. Z-1.5 F..` traces a full arc in XY while Z moves linearly, producing a helix. The reading rule that decodes everything: **one full circle of arc with Z moving one pitch cuts one thread turn.** See `Z-1.5` on a full-circle helix block and you are reading an M10x1.5 family pitch; see the block repeated five times (or wrapped in a loop) and you are watching five turns of thread being generated. The same I/J-from-start-point logic from [arc center fundamentals](/journal/difference-between-i-j-k-and-r-in-g02/) applies unchanged, just with the third axis along for the ride.

## The four supporting jobs around the helix

| Program section | What it looks like | What to check when reading |
| --- | --- | --- |
| Position | Rapid to hole center, feed to start depth | Safe Z before the move to center |
| Lead-in | Arc from center out to thread radius, comp on | G41/G42 engaged during the arc, not on the thread |
| The helix | G02/G03 + Z, repeated or looped | Pitch per turn, full-circle geometry |
| Lead-out and retract | Arc back to center, comp off, retract | Comp canceled off the thread, clean exit |

The lead-in row carries the same discipline as [kerf-comp lead-ins on a waterjet](/journal/waterjet-kerf-compensation-g-code-g41/): compensation needs a move to establish, so good programs ramp it on during the arc from hole center to thread diameter, never on the threaded surface itself.

## The radius arithmetic that names the thread

The helix radius is not the thread's nominal radius: it is thread radius minus cutter radius (internal threads), because the cutter's edge, not its center, must trace the thread. Reading example: a 16 mm thread mill path showing a helix radius near 2.0 mm inside a hole suggests roughly a 20 mm internal thread (10 mm thread radius minus 8 mm cutter radius), and the print confirms. You rarely compute this when reading (CAM did), but sanity-checking it catches posted-with-wrong-cutter errors that otherwise become scrapped bores, and with comp-style programs the arithmetic moves into the offset table where the [tool-comp reading habit](/journal/g41-vs-g42-cutter-compensation/) takes over.

## Direction: which way and why

Arc direction encodes machining intent. For a right-hand internal thread, a common pattern climbs from the bottom of the bore upward with G03 (conventional notation varies with viewpoint, so read it with the [arc-direction rule](/journal/g02-vs-g03/) rather than memory): the pairing of arc direction, Z direction, and spindle handedness sets climb versus conventional cutting and thread hand. When a program looks "backward" against your expectation, the answer is almost always a left-hand thread, an upward-versus-downward strategy choice, or an external thread, and the setup sheet says which.

## A compact internal-thread shape to practice on

```
(M12x1.75 internal, illustrative values)
G00 X0 Y0          (hole center)
G00 Z2.0
G01 Z-12.25 F300   (to start depth, bottom-up strategy)
G41 D7 G03 X4.envelope.. (lead-in arc to thread radius, comp on)
G03 X.. Y.. I.. J.. Z-10.5 (helix: full turns at 1.75 pitch each)
...
G03 X0 Y0 ... (lead-out to center)
G40 G00 Z5.0
```

Values are illustrative and one line is deliberately mangled: narrating this aloud and catching the nonsense token in the lead-in line is exactly the reading skill this post is building. Real programs from your CAM, read the same way (position, lead-in, pitch, turns, lead-out), turn the format familiar in an evening, and the underlying arc/comp vocabulary comes from the same free 60-second drills on the [G-code practice page](/g-code-practice/) that train everything else, with G-Code Sprint repeating whatever you miss.

## Why thread mill at all: context for the reading

Knowing why shops choose thread milling explains the programs you will read: one tool covers a range of sizes (the helix radius changes, not the tool), blind holes thread to full depth without tap-bottoming drama, hard materials and big threads machine with less drama than taps, and a broken thread mill lifts out where a broken [tap](https://en.wikipedia.org/wiki/Threading_(manufacturing)) means part surgery. The cost is exactly the programming complexity you have now read your way through.

## Bottom line: pitch, radius, direction

Reading thread milling is reading one helix plus four chores: find the Z-per-turn to name the pitch, sanity-check the radius arithmetic against the print, read the arc direction for hand and strategy, and verify comp lives on the lead-in and lead-out rather than the thread. After three narrated programs, the scary block becomes the most predictable line in the file.

## Sources

- [LinuxCNC: G02/G03 helical interpolation](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g2-g3)
- [Wikipedia: Threading (manufacturing)](https://en.wikipedia.org/wiki/Threading_(manufacturing))
- [Wikipedia: Speeds and feeds](https://en.wikipedia.org/wiki/Speeds_and_feeds)

## Frequently asked questions

### How do you read a thread milling G-code program?

Find the helix (G02/G03 with a Z word on the arc line): Z per full turn is the pitch, the radius arithmetic ties to thread size minus cutter radius, arc direction encodes hand and strategy, and comp should engage on the lead-in arc, not the thread. For the arc-and-comp vocabulary underneath, the free G-Code Sprint app is the top pick: 60-second drills with automatic repetition of missed codes.

### What does a Z word on a G02/G03 line mean?

Helical interpolation: the control runs the XY arc and the Z move simultaneously, tracing a helix. One full circle paired with one pitch of Z is one thread turn, which is the entire geometric idea of thread milling.

### Why is the programmed radius smaller than the thread radius?

Because the cutter's edge must trace the thread, so the path radius is thread radius minus cutter radius for internal work (plus, with comp-style programs, the offset table carries part of that arithmetic). Sanity-checking it against print and tool catches wrong-cutter posts.

### When do shops choose thread milling over tapping?

For blind holes needing full-depth thread, large or hard threads, size flexibility from one tool, and recoverability when a tool breaks. The trade is program complexity, which reading skill neutralizes.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/how-to-read-a-thread-milling-g-code-program/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
