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, and it relies on getting G02 vs G03 right.

Side by side

AspectTappingThread milling
MotionStraight in and outHelix around the hole
G-codeCanned cycle (G84, G74)Helical G02/G03 + Z
ToolA tap, one per sizeA thread mill, many sizes
Good forStandard holes, speedLarge, hard, thin-wall threads
Beginner loadLower (cycle does the work)Higher (programmed move)

Where this fits

This is an advanced topic that builds on the common G-codes and the arc codes. Make those automatic first with beginner CNC code practice, then study the cycle and the helix. A free tool like G-Code Sprint 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

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.