G76 threading cycle calculator

Works out the thread height and final diameter for an ISO metric 60° thread and writes a Fanuc-style two-block G76 example. Controls that use a one-block G76 (for example Haas and LinuxCNC) need a different format.

Example code – check it and dry-run it, at your own risk. This program is a generic example, not written for your machine or control. Read every line against your control’s manual, simulate it, then run it above the work in single block with reduced rapids and feed before cutting. Check the work offset, tool length offset, units and clearance heights. See the terms of use.
How it works, guides and notes

How it works

An ISO 60° thread has a sharp-V height H = 0.866025 × P. The basic external thread depth is 17/24 of H (0.613435 × P), so the minor diameter is d − 1.226869 × P. The basic internal depth is 5/8 of H (0.541266 × P). In the two-block form, the first block sets spring passes, chamfer and tool angle (the six P digits), the minimum cut (Q) and the finish allowance (R). The second block gives the final diameter (X), the end of the thread (Z), the thread height (P) and first cut depth (Q), both in micrometres with no decimal point, and the pitch (F).

Hand check: M20 × 2.5 external: H = 2.165, h = 0.613435 × 2.5 = 1.534 mm, final X = 20 − 3.067 = 16.933 mm. Second block: G76 X16.933 Z-40.0 P1534 Q500 F2.5.

Control-specific: how many passes the control takes, how the minimum cut and finish allowance are applied, decimal point handling and the units of P and Q all depend on the control and its parameters. The pass table is an estimate. One-block G76 formats use different letters and meanings. Check your manual. For sizes and tolerances see the thread calculator.

FANUC, Haas, Siemens, Heidenhain, LinuxCNC and Grbl are names or trademarks of their respective owners. They are mentioned only to describe which controls a code format relates to. Lathe Calculator is not affiliated with or endorsed by any of them. Trademarks.

Spotted a mistake? Report an error.