Spur gear generator · gear ratio calculator
Design two spur gears that actually mesh
Set the module, tooth counts and pressure angle. Watch the pair turn, read the ratio, center distance, output speed and torque, then download a DXF or SVG for laser cutting, CNC or 3D printing. Everything runs in your browser.
The formulas this generator uses
Standard full-depth involute teeth, no profile shift. m = module (mm), z = number of teeth, α = pressure angle. For diametral pitch P, m = 25.4 / P.
| Quantity | Formula | Example m = 2, z = 20 |
|---|---|---|
| Reference (pitch) diameter | d = z·m | 40 mm |
| Addendum / dedendum | 1.00·m / 1.25·m | 2 / 2.5 mm |
| Tip (outside) diameter | da = d + 2m | 44 mm |
| Root diameter | df = d − 2.5m | 35 mm |
| Base circle diameter | db = d·cos α | 37.59 mm (α = 20°) |
| Circular pitch | p = π·m | 6.283 mm |
| Center distance | a = m(z₁ + z₂)/2 | 60 mm with a 40-tooth mate |
| Gear ratio | i = z₂ / z₁ | 2 : 1 |
| Output speed / torque | n₂ = n₁ / i, T₂ ≈ T₁ · i · η | 1500 → 750 rpm |
Undercut. With a 20° pressure angle the smallest tooth count free of undercut is 17 (KHK). The general rule is z ≥ 2 / sin²α, which gives about 32 teeth at 14.5°. The tool warns you below that limit.
Contact ratio is shown for the pair; keep it above about 1.2 so one tooth pair takes over before the previous one lets go.
FAQ
How do I calculate the gear ratio?
Driven teeth ÷ driving teeth. 20 driving 40 is 2:1 — half the speed, roughly twice the torque minus friction.
What center distance do I drill the shafts at?
m × (z₁ + z₂) / 2. The generator shows it in mm and inches.
Which file should I download?
DXF for laser cutters, CNC routers and CAD; SVG for Inkscape, Illustrator and most hobby laser apps. Both are 1:1 in millimetres with the two gears laid out at their center distance.
Why add backlash?
Cut and printed parts are never exact. 0.1–0.2 mm of backlash thins each tooth slightly so the pair turns freely instead of binding.
Do you upload my design?
No. The geometry is computed in your browser. Only an anonymous count of downloads is recorded.
Need the whole mechanism animated?
We turn CAD into exploded-view animations and interactive 3D pages — gearboxes, pumps, production lines. See a two-stage gearbox demo · Ask for a quote
Sources: KHK Gears, Gear Technical Reference — involute gear profile (checked 21 October 2026). Not affiliated with KHK.