Spur Gear Calculator: Profile Shift, Tooth Thickness, Contact Ratio and DXF Export
Enter the module, pressure angle, teeth and profile shift coefficients of a spur gear pair. You get the working center distance and pressure angle, the diameters, the tooth thickness, the span measurement, the contact ratio and a drawing of the meshing pair, which you can download as DXF or SVG. The geometry is checked against the worked examples in the KHK Gear Technical Reference.
Spur Gear Pair
Metric module. The default is the worked example of KHK Table 4.3.
| Quantity [mm] | Pinion (1) | Gear (2) |
|---|---|---|
| Center distance a | 56.4999 | |
| Working pressure angle αw | 26.0886° | |
| Center distance modification y | 0.83329 | |
| Reference diameter d | 36.000 | 72.000 |
| Base diameter db | 33.829 | 67.658 |
| Working pitch diameter dw | 37.667 | 75.333 |
| Addendum ha | 4.420 | 3.700 |
| Tooth depth h | 6.370 | 6.370 |
| Tip diameter da | 44.840 | 79.400 |
| Root diameter df | 32.100 | 66.660 |
| Shift x needed to avoid undercut (≥) | 0.298 | -0.404 |
| Tooth thickness at reference circle s | 6.023 | 5.499 |
| Chordal tooth thickness | 5.995 | 5.493 |
| Crest width sa | 1.264 | 2.213 |
| Span: teeth k and measurement W | 3 → W 23.876 | 4 → W 32.745 |
| Transverse contact ratio | 1.202 |
- No undercut, interference or low contact ratio under the checks this tool makes.
y = (z1 + z2) ÷ 2 · (cos α ÷ cos αw − 1) · center distance a = ((z1 + z2) ÷ 2 + y) · m
Addendum ha1 = (1 + y − x2) m, ha2 = (1 + y − x1) m · tooth depth h = (2.25 + y − (x1 + x2)) m
d = z m · db = d cos α · da = d + 2 ha · df = da − 2h
Span over k teeth: W = m cos α [π (k − 0.5) + z inv α] + 2 x m sin α
Crest width sa = da · ψa, ψa = ψ + inv α − inv αa, cos αa = db ÷ da
No undercut for x ≥ 1 − z sin²α ÷ 2 (KHK eq. 3.10). Interference is tested twice: (1) a tip circle reaches past the mating base circle’s tangent point;
(2) the mating tip engages below the start of the generated involute, lf = r sin α − (1 − x) m ÷ sin α from the base tangent point (rack generation, the same model as the undercut limit).
From a Given Center Distance to the Sum of Profile Shifts
KHK Table 4.4: if the center distance is fixed by the housing, this gives the shift you need in total. Split it between the two gears yourself.
| Center distance modification y | 0.8333 |
| Working pressure angle αw | 26.0886° |
| Sum of profile shifts x1 + x2 | 0.9600 |
How This Calculator Was Checked
The calculation is a plain function that is tested automatically against the sources before any change is released.
| Check | Source | Result |
|---|---|---|
| Standard spur gears 12/24, m = 3: center distance, reference, base, tip and root diameters, addendum, tooth depth (11 values) | KHK Table 4.1 | All reproduced to the printed 3 decimals |
| Profile shifted 12/24 with x = 0.6 and 0.36: inv αw, αw = 26.0886°, y = 0.83329, a = 56.4999, working pitch diameters, addenda, tooth depth, tip and root diameters (15 values) | KHK Table 4.3 | All reproduced to the printed precision |
| From a = 56.4999 back to y = 0.8333, αw = 26.0886°, x1 + x2 = 0.9600 | KHK Table 4.4 | Reproduced |
| Tooth thickness 17.8918, half angle 8.5427°, chordal thickness 17.8256 (m = 10, z = 12, x = 0.3) | KHK Table 5.1 | Reproduced |
| Span measurement: kth = 3.78787, k = 4, W = 32.8266 (m = 3, z = 24, x = 0.4) | KHK Table 5.10 | Reproduced |
| Tip pressure angle 36.06616°, inv values, tip half angle 0.027893 rad, crest width 1.03762 (m = 2, z = 16, x = 0.3) | KHK Table 3.5 | Reproduced |
| Drawn tooth flanks satisfy the definition of the involute (tangent length equals the unrolled base-circle arc); crest width and symmetry read back from the drawn outline | Geometric definition | Agree to 1e-9 |
| Two drawn outlines at the working center distance, turned through a full tooth pitch, for four gear pairs: no tooth penetrates the other, and the flanks touch | Independent geometric test | Penetration 0; smallest gap below 0.0001 mm |
| The DXF file read back by an independent DXF library (ezdxf): entities, layers, closed polylines, vertex counts, tip and reference radii | ezdxf (independent reader) | Agree |
| Contact ratio of very large standard gears tends to 2 ÷ (π sin α cos α) = 1.981; the contact-ratio flag, undercut limits (KHK Figs 3.6, 3.7) and both interference tests | Analytic limit, KHK text and rack-generation geometry | Pass |
| Module or angle out of range, non-integer teeth, more than 1000 teeth, shift too negative for any mesh, pointed teeth, no tooth depth, tips that do not reach the line of action, center distance too small or needing an implausible shift | — | Refused with a message |
Tool version 1.0 · last verified 2026-11-05. KHK prints no worked example for the contact ratio or for the interference test: the contact ratio is KHK’s definition (equation 3.5) with the path of contact derived from the geometry, and the interference test is the standard condition on the line of action; both are derived here and checked by the limit and by the mesh test above. KHK prints no numerical limit for interference. Thresholds taken from KHK: the undercut limit (eq. 3.10) and the advice to keep the contact ratio at 1 or greater (3.3); the second interference test comes from the rack-generation geometry, not from a printed table.
Assumptions & Limitations
- Tooth form and clearance as KHK Table 4.3: tip and root clearance 0.25 module, tooth depth 2.25 module for a standard gear. Stub teeth and other tooth forms are not covered.
- External spur gears, metric module, a single transverse contact ratio. Internal, helical, bevel and worm gears, racks, and inch diametral pitch are not covered.
- The center distance is the one at which the gears mesh without backlash (KHK Table 4.3). A real pair needs backlash, which is not added here.
- The drawn profile is the involute from the base circle (or from the root circle if that is larger) to the tip circle; below the base circle it is a radial line. The real root fillet depends on the cutting tool and is not modelled.
- Undercut: the check is x ≥ 1 − z · sin²α ÷ 2 (KHK 3.10). KHK states that 17 teeth is the practical minimum for 20° and that a pinion with fewer teeth can be usable if strength and contact ratio allow, so a flag is a warning and not a prohibition.
- The tool does not check tooth strength, surface durability, lubrication or accuracy grade.
Common Questions
What is profile shift?
- Moving the cutting tool away from or toward the gear blank so the tooth is thicker or thinner at the reference circle. A positive shift prevents undercut on a small pinion and lets you adjust the center distance. The coefficient x is the shift divided by the module.
Why do gears with fewer than 17 teeth undercut?
- With a 20° pressure angle, a standard rack-type tool cuts into the root of a pinion below 2 ÷ sin²α = 17.1 teeth. KHK notes 17 is the practical minimum, and that a pinion with fewer teeth can be usable if its strength and contact ratio allow. A positive profile shift of at least 1 − z · sin²α ÷ 2 avoids it.
What is the contact ratio and what value is needed?
- The length of the path of contact divided by the base pitch: on average how many tooth pairs share the load. KHK says it is good practice to keep it at 1 or greater.
Can I use the DXF to cut a gear?
- It is the nominal tooth outline with straight radial lines below the base circle and no root fillet, tolerance, backlash allowance or tip relief. Use it for layout, checking and CAD models, and confirm the profile with your gear manufacturer before cutting.
Sources
- KHK Gear Technical Reference (PDF), Technical Data section: 3.3 meshing, 3.5 undercutting, 3.6 profile shifting, tables 3.5, 4.1, 4.3, 4.4, 5.1 and 5.10. Edition read: the web PDF “gear_guide1”; its edition year was not checked.
KHK is named only to cite its published reference. SYZ Rod Ends is not affiliated with KHK. The reference’s tables are not reproduced beyond the values quoted in the verification table.