---
title: "Thread Milling vs Tapping: The G-Code Difference"
description: "Tapping uses a canned cycle like G84; thread milling uses helical interpolation with G02 or G03 plus Z. Here is how the two approaches differ in code."
url: https://gcodepractice.com/journal/g-code-for-thread-milling-vs-tapping/
canonical: https://gcodepractice.com/journal/g-code-for-thread-milling-vs-tapping/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-02
updated: 2026-06-02
category: "Code reference"
tags: ["thread milling", "tapping", "g-code", "advanced"]
lang: en
---

# Thread Milling vs Tapping: The G-Code Difference

> **TL;DR** Tapping and thread milling both make threads but with different G-code. Tapping drives a tap straight in and out, programmed with a tapping canned cycle such as G84 (often with rigid tapping). Thread milling spins a smaller thread mill and moves it in a helix, programmed with helical interpolation: G02 or G03 in the plane plus a simultaneous Z move. Tapping is a cycle; thread milling is a coordinated 3-axis move.

Tapping and thread milling both produce threads, but they are different operations with very different G-code. One is a canned cycle that drives a tap straight in; the other is a coordinated helix that mills the thread with a smaller tool. Knowing which code goes with which clears up a topic that confuses a lot of beginners.

## Tapping: a canned cycle

Tapping drives a tap into the hole and back out, cutting the thread directly. It is programmed with a tapping canned cycle, commonly `G84` (and `G74` for left-hand or reverse tapping on some controls), often with rigid tapping so spindle rotation and feed stay synchronized. The cycle handles the in-and-out motion for you once you give it the depth and feed.

## Thread milling: a programmed helix

Thread milling uses a smaller thread mill that spins fast and moves in a helix around the hole. There is usually no dedicated thread-mill cycle; instead you build the motion from **helical interpolation**: a `G02` or `G03` circular move in the plane combined with a simultaneous `Z` move, so the tool spirals down at the thread pitch. That is the same helical move covered in [how to program a helix in G-code](/journal/how-to-program-a-helix-in-g-code-g02-z/), and it relies on getting [G02 vs G03](/journal/g02-vs-g03/) right.

## Side by side

| Aspect | Tapping | Thread milling |
| --- | --- | --- |
| Motion | Straight in and out | Helix around the hole |
| G-code | Canned cycle (`G84`, `G74`) | Helical `G02`/`G03` + `Z` |
| Tool | A tap, one per size | A thread mill, many sizes |
| Good for | Standard holes, speed | Large, hard, thin-wall threads |
| Beginner load | Lower (cycle does the work) | Higher (programmed move) |

## Where this fits

This is an advanced topic that builds on the [common G-codes](/journal/common-g-codes-for-cnc-beginners/) and the arc codes. Make those automatic first with [beginner CNC code practice](/journal/beginner-cnc-code-practice/), then study the cycle and the helix. A free tool like [G-Code Sprint](/g-code-practice/) drills the foundational codes; confirm cycle syntax against your machine manual, since this is an educational overview.

## Bottom line

Tapping uses a canned cycle (`G84`) to drive a tap straight in; thread milling uses helical interpolation (`G02`/`G03` plus `Z`) to spiral a thread mill around the hole. Cycle versus coordinated helix is the core difference.

## Sources

- [LinuxCNC G-code reference (G84 tapping, helical G2/G3)](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)
- [CNCCookbook: G-code and M-code cheat sheet](https://www.cnccookbook.com/g-code-m-code-cnc-list-cheat-sheet/)

## Frequently asked questions

### What G-code is used for tapping?
A tapping canned cycle, commonly `G84` (and `G74` for left-hand or reverse tapping on some controls), often combined with rigid tapping so the spindle and feed are synchronized. The cycle drives the tap in to depth and back out automatically.

### What G-code is used for thread milling?
Helical interpolation: a `G02` or `G03` circular move in the plane combined with a simultaneous `Z` move, so the thread mill traces a helix at the thread pitch. There is no dedicated thread-mill canned cycle on most controls; it is built from helical moves.

### Is thread milling or tapping better?
Neither is universally better; they suit different jobs. Tapping is fast and simple for standard holes; thread milling handles large, hard, or thin-wall threads and lets one tool cut many sizes. The code reflects this: a cycle for tapping, a programmed helix for thread milling.

*G-Code Sprint is a study and practice tool only. It is not a CNC simulator, machine controller, or safety authority. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/g-code-for-thread-milling-vs-tapping/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
