Sparrow Tools

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.

QuantityFormulaExample m = 2, z = 20
Reference (pitch) diameterd = z·m40 mm
Addendum / dedendum1.00·m / 1.25·m2 / 2.5 mm
Tip (outside) diameterda = d + 2m44 mm
Root diameterdf = d − 2.5m35 mm
Base circle diameterdb = d·cos α37.59 mm (α = 20°)
Circular pitchp = π·m6.283 mm
Center distancea = m(z₁ + z₂)/260 mm with a 40-tooth mate
Gear ratioi = z₂ / z₁2 : 1
Output speed / torquen₂ = 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.