Fanuc G76 Threading Cycle Calculator: 2-Line & 1-Line CNC Lathe Code
To program a Fanuc G76 threading cycle on a CNC lathe, calculate the single-side radial thread height H = 0.61343 × P, the external minor core diameter X = D_major - (2 × H), and the constant-volume first pass depth Q_1 = H / √n, formatting P and Q in integer microns (or ten-thousandths of an inch) without decimal points.
Interactive Fanuc G76 Threading Cycle & Constant-Volume Pass Calculator
Generate syntax-verified Fanuc 0i/31i two-line (G76 P.. Q.. R.. / G76 X.. Z.. P.. Q.. F..) and Haas single-line (G76 X.. Z.. K.. D.. F.. A..) CNC lathe threading blocks with degressive pass progression.
How Do You Decode the Fanuc Two-Line G76 P-Word and Q-Word Integer Syntax?
When programming single-point threading on a Fanuc Series 0i-TF, 16i/18i, or 31i-Model B turning center, the control uses a two-block canned cycle (G76 P(m)(r)(a) Q(d_min) R(d) followed by G76 X(u) Z(w) R(i) P(k) Q(Δd) F(L)) that automatically distributes radial cutting depths so every pass removes an equal cross-sectional chip area. Under ISO International Metrology Standard (ISO 68-1) and ASME Geometric & Mechanical Standards (ASME B1.1) external thread geometry, the sharp 60° fundamental triangle height is H_0 = 0.866025 × P, while the actual radial thread depth from crest to rounded root radius is H_radial = 0.61343 × P. Multiplying H_radial by 2 and subtracting from the nominal major diameter yields your programmed target core diameter X = D - 1.22687 × P.
The most frequent cause of Fanuc syntax alarms (PS0007 Illegal Decimal Point) or catastrophic insert breakage on pass #1 is entering a decimal point inside the P or Q address words. In the first block, P(m)(r)(a) is a packed 6-digit integer: the first two digits (m = 01 to 99) set the number of spring finishing passes, the middle two digits (r = 00 to 99) set the pullout chamfer distance in tenths of a lead, and the final two digits (a = 60, 55, 29, 00) specify the included tool tip angle for compound flank infeed. In the second block, P (total radial thread height) and Q (first pass depth) must be expressed in integer microns (0.001 mm, so 1.534 mm is written P1534) in metric G21 mode, or integer ten-thousandths of an inch (0.0001", so 0.0472" is written P0472) in imperial G20 mode.
| ISO Thread | Pitch (P) | Radial Depth (H) | Core Minor Dia (X) | Fanuc P-Word | First Pass (Q_1) | Fanuc G76 Line 2 Block |
|---|---|---|---|---|---|---|
| M6 × 1.0 | 1.00 mm | 0.613 mm | ⌀ 4.773 mm | P613 | Q250 (6 passes) | G76 X4.773 Z-18.0 P613 Q250 F1.0 |
| M8 × 1.25 | 1.25 mm | 0.767 mm | ⌀ 6.466 mm | P767 | Q289 (7 passes) | G76 X6.466 Z-22.0 P767 Q289 F1.25 |
| M10 × 1.5 | 1.50 mm | 0.920 mm | ⌀ 8.160 mm | P920 | Q325 (8 passes) | G76 X8.160 Z-25.0 P920 Q325 F1.5 |
| M12 × 1.75 | 1.75 mm | 1.074 mm | ⌀ 9.853 mm | P1074 | Q358 (9 passes) | G76 X9.853 Z-30.0 P1074 Q358 F1.75 |
| M16 × 2.0 | 2.00 mm | 1.227 mm | ⌀ 13.546 mm | P1227 | Q388 (10 passes) | G76 X13.546 Z-35.0 P1227 Q388 F2.0 |
| M20 × 2.5 | 2.50 mm | 1.534 mm | ⌀ 16.933 mm | P1534 | Q443 (12 passes) | G76 X16.933 Z-40.0 P1534 Q443 F2.5 |
| M24 × 3.0 | 3.00 mm | 1.840 mm | ⌀ 20.319 mm | P1840 | Q492 (14 passes) | G76 X20.319 Z-45.0 P1840 Q492 F3.0 |
Why Does G76 Use Constant-Volume Square-Root Pass Progression (Δd_n = Q_1 × √n)?
If a CNC lathe plunged a V-shaped 60° threading insert inward by a constant linear step on every pass, each successive cut would engage twice the flank length of the previous pass—quadrupling cutting forces at the bottom of the thread and tearing the workpiece out of the chuck jaws. To keep spindle torque and carbide flank pressure constant from first pass to final root, Fanuc and Haas G76 cycles govern pass depth k using the square-root progression law traceable to NIST (National Institute of Standards and Technology) and Machinery's Handbook (Industrial Press): the cumulative depth at pass k is d_k = Q_1 × √k. Therefore, to finish a thread of radial height H in exactly n roughing passes, set your first pass depth to Q_1 = H / √n and specify a compound modified flank infeed angle of 29.0° to 29.5° so the leading cutting edge shears a clean single-sided chip curl.
| Unified Thread | TPI & Pitch | Radial Depth (H) | Minor Dia (X) | P-Word (0.0001 in) | First Pass (Q_1) | Fanuc G76 Line 2 Block |
|---|---|---|---|---|---|---|
| 1/4"-20 UNC | 20 TPI (0.0500") | 0.0307" | ⌀ 0.1887" | P0307 | Q0116 (7 passes) | G76 X0.1887 Z-0.75 P0307 Q0116 F0.0500 |
| 5/16"-18 UNC | 18 TPI (0.0556") | 0.0341" | ⌀ 0.2443" | P0341 | Q0120 (8 passes) | G76 X0.2443 Z-1.00 P0341 Q0120 F0.0556 |
| 3/8"-16 UNC | 16 TPI (0.0625") | 0.0383" | ⌀ 0.2983" | P0383 | Q0128 (9 passes) | G76 X0.2983 Z-1.00 P0383 Q0128 F0.0625 |
| 1/2"-13 UNC | 13 TPI (0.0769") | 0.0472" | ⌀ 0.4056" | P0472 | Q0142 (11 passes) | G76 X0.4056 Z-1.25 P0472 Q0142 F0.0769 |
| 5/8"-11 UNC | 11 TPI (0.0909") | 0.0558" | ⌀ 0.5135" | P0558 | Q0161 (12 passes) | G76 X0.5135 Z-1.50 P0558 Q0161 F0.0909 |
| 3/4"-10 UNC | 10 TPI (0.1000") | 0.0613" | ⌀ 0.6273" | P0613 | Q0164 (14 passes) | G76 X0.6273 Z-1.75 P0613 Q0164 F0.1000 |
Before pressing Cycle Start on high-lead or coarse-pitch threads, always verify that your spindle speed does not exceed the Z-axis rapid servo tracking limit of your lathe. Because the Z-axis carriage must accelerate to a linear feed rate of V_z = RPM × Pitch within a 2-pitch Z-start clearance distance, running an M24 × 3.0 thread at 1,800 RPM demands a synchronized feed rate of 5,400 mm/min, which causes pitch lead error on older ball screws. Cross-check your finished pitch diameter with our Three-Wire Thread Measurement Calculator, compare internal hole sizes on our Master Tap Drill Chart, verify synchronous mill-turn cycles on our G84 Rigid Tapping Feed Calculator, or program helical bores on our CNC Thread Milling Calculator.
When switching between Fanuc two-line controls and Haas NGC or legacy Fanuc 0-T single-line controls, note that Haas replaces the integer micron words with decimal values: K specifies the radial thread height (with a decimal point), D specifies the first pass depth (without a decimal point on older Fanuc 1-line, or with a decimal point on Haas), and A sets the compound tool nose angle (0 to 60). Always dry-run new threading macros 50 mm in front of the chuck face in single-block mode to confirm your control's parameter bit settings.