3D print gear calculator: diameters and center distance from module

Pitch diameter is module × teeth, outside diameter is module × (teeth + 2), and two gears sit module × (teeth 1 + teeth 2) ÷ 2 apart. Enter the module and both tooth counts to get every diameter to model, with 0.2 to 0.4 mm of backlash built in so the printed pair turns freely.

Tooth size

Two gears mesh only when they share the module and the pressure angle.

mm

Standard values: 0.5, 0.6, 0.8, 1, 1.25, 1.5, 2, 2.5, 3, 4, 5.

Teeth

Gear 1 is usually the smaller gear (the pinion).

Backlash allowance

Total play between the teeth, measured along the pitch circle. Sovol's starting point for desktop FDM printers is 0.2 to 0.4 mm. Enter 0 for the textbook dimensions.

mm

Center distance to model

–

Gear ratio

–

Pitch diameter (gear 1 · gear 2)

–

Tip (outside) diameter

–

Root diameter

–

Base circle diameter

–

Circular pitch

–

Tooth thickness on the pitch circle

–

Calipers across the tips

–

Textbook backlash for this module

–

The formula

d  = m × z               pitch diameter
da = m × (z + 2)         tip (outside) diameter
df = m × (z − 2.5)       root diameter
db = d × cos α           base circle diameter
p  = π × m               circular pitch
s  = π × m ÷ 2           tooth thickness on the pitch circle
a  = m × (z1 + z2) ÷ 2   center distance
i  = z2 ÷ z1             gear ratio
  • m is the module in millimeters, the pitch diameter (the circle two meshing gears roll on) divided by the tooth count. z is the tooth count, z1 and z2 for the two gears.
  • α is the pressure angle, usually 20°. KHK Gears lists 14.5° and 17.5° for specific applications.
  • The tip sits 1 m above the pitch circle and the root 1.25 m below it, so a tooth is 2.25 m deep and leaves 0.25 m of clearance under the mating tip. These are the proportions of the ISO 53 basic rack (types A, B and C), and KHK’s formulas for standard spur gears use the same figures.

The formulas hold for standard spur gears with no profile shift (teeth generated with the cutter offset from its standard position).

How do you calculate gear size from module and tooth count?

Multiply the module by the tooth count to get the pitch diameter, add two modules for the tip (outside) diameter and subtract 2.5 modules for the root diameter. A 20-tooth gear at module 2 has a 40 mm pitch diameter, a 44 mm outside diameter and a 35 mm root diameter, with 4.5 mm deep teeth.

Worked example: module 2, 20 and 40 teeth

These are the calculator’s defaults, and the same pair KHK uses in its backlash examples.

Gear 1 (20 teeth) Gear 2 (40 teeth)
Pitch diameter, 2 × z 40 mm 80 mm
Tip diameter, 2 × (z + 2) 44 mm 84 mm
Root diameter, 2 × (z − 2.5) 35 mm 75 mm
Base circle, d × cos 20° 37.588 mm 75.175 mm
Circular pitch, π × 2 6.283 mm 6.283 mm
Tooth thickness, π × 2 ÷ 2 3.142 mm 3.142 mm

The gear ratio is 40 ÷ 20 = 2 : 1, so gear 1 turns twice for each turn of gear 2. The table shows tooth thickness before backlash.

Which module to use for a printed gear

The module sets the tooth size, so pick it before the tooth count. For a 0.4 mm nozzle, Sovol’s gear guide gives module 1.5 to 2 as the common baseline and module 1 as the practical lower range. Below module 1, it says, teeth get narrower than the extrusion paths.

KHK’s table of standard modules (from the Japanese standard JIS B 1701-2) has 0.5, 0.6, 0.8, 1, 1.25, 1.5, 2, 2.5, 3, 4 and 5 in its first-choice series.

Module Circular pitch Tooth thickness on the pitch circle Tooth depth
1 3.142 mm 1.571 mm 2.25 mm
1.5 4.712 mm 2.356 mm 3.375 mm
2 6.283 mm 3.142 mm 4.5 mm
2.5 7.854 mm 3.927 mm 5.625 mm
3 9.425 mm 4.712 mm 6.75 mm

At a fixed size, a larger module means fewer, bigger teeth: a 40 mm pitch diameter holds 40 teeth at module 1 and 20 at module 2.

Scaling a gear model in the slicer changes its module too. A module 2 gear printed at 150% becomes module 3 and no longer meshes with an unscaled module 2 gear. Scale both gears together; the scale calculator gives the percentage.

Finding the module of a gear you already have

Count the teeth, measure the outside diameter with calipers and divide: m = da ÷ (z + 2). Round to the nearest standard module. A 30-tooth gear that measures 63.9 mm gives 63.9 ÷ 32 = 1.997, so it is module 2. For an inch gear, the diametral pitch is (z + 2) ÷ da, with da in inches.

With an odd tooth count no two tips face each other, so the calipers read da × cos(90° ÷ z), a little under the tip diameter. A 15-tooth module 2 gear has a 34 mm tip diameter but reads 33.81 mm. The “Calipers across the tips” line in the calculator gives the reading to expect for both gears.

How do you calculate the center distance between two gears?

Add the two tooth counts, multiply by the module and halve the result: a = m × (z1 + z2) ÷ 2. Module 2 gears with 20 and 40 teeth sit 60 mm apart. For 0.2 mm of backlash from the shafts rather than thinner teeth, add 0.275 mm at a 20° pressure angle.

The center distance is the sum of the two pitch radii: (40 + 80) ÷ 2 = 60 mm for the default pair. The formula holds only for two standard external spur gears with the same module and pressure angle.

KHK’s mounting guidance covers an error in either direction. A center distance that is too large adds backlash, the teeth mesh less deeply and the contact ratio (the average number of tooth pairs in contact) drops. One that is too small removes backlash, and the gears may not turn at all.

How much backlash printed gears need

Start a printed pair at 0.2 to 0.4 mm of total backlash (the play between meshing teeth), 0.1 to 0.2 mm per gear. That is Sovol’s starting point for desktop FDM (filament) printers. Sovol says gears modeled with zero backlash bind, because extruded walls bulge slightly outward and press the flanks together. KHK adds that plastic gears expand more with heat and swell as they absorb moisture, so they need more backlash than metal gears.

The machine-design rule of thumb in Jones and Ryffel’s Gear Design Simplified puts the average backlash at 0.04 ÷ diametral pitch in inches, with 0.03 and 0.05 as the minimum and maximum. In module terms that is 0.04 × m in millimeters, or 0.06 to 0.10 mm at module 2. Sovol’s printing range is 2.5 to 5 times the 0.08 mm textbook average. The calculator shows the textbook range for your module next to your allowance.

The calculator defaults to 0.2 mm along the pitch circle. Normal to the tooth faces, the same gap is 6% smaller at 20° (cos 20° = 0.94).

Thinning the teeth

KHK names two ways to create backlash: enlarge the center distance or reduce the tooth thickness. It calls thinning the more popular, and Sovol also recommends building the backlash into the tooth profile rather than moving the shafts. Autodesk’s Inventor documentation gives the usual split: half the allowance off each gear, or all of it off the driven gear when the pinion (the smaller gear) has few teeth.

With 0.2 mm on the default pair, each gear’s tooth thickness on the pitch circle drops from 3.142 mm to 3.042 mm and the center distance stays at 60 mm. If your gear generator has a backlash field, check whether it applies the value per gear or per pair and along the pitch circle or normal to the teeth.

With an offset-face command on a gear modeled without backlash, move each flank by a quarter of the total backlash along the pitch circle (0.05 mm for 0.2 mm). Measured normal to the face, as the command takes it, that is 0.05 × cos 20° = 0.047 mm.

Moving the shafts apart

Use this route when the gears come from elsewhere (a downloaded model or bought gears) and only the shaft positions are yours to change. Spreading the shafts by Δa adds 2 × Δa × tan α of backlash along the pitch circle (KHK). Solved for the spread:

Δa = jt ÷ (2 × tan α)
   = 1.374 × jt   at 20°
   = 1.933 × jt   at 14.5°
Backlash wanted Extra center distance at 20° At 14.5°
0.1 mm 0.137 mm 0.193 mm
0.2 mm 0.275 mm 0.387 mm
0.3 mm 0.412 mm 0.580 mm
0.4 mm 0.549 mm 0.773 mm

KHK’s own worked figure is 0.2747 mm for 0.2 mm at 20°.

Minimum teeth for 20° and 14.5° gears

A standard gear needs at least 17 teeth at a 20° pressure angle, or 32 at 14.5°. With fewer, it is undercut: a rack-type cutter removes part of the tooth root, and a gear generator that simulates cutting draws the same thinned root. KHK’s formula for the minimum is z = 2 ÷ sin²α, which gives 17.1 at 20° (KHK states 17 teeth) and 31.9 at 14.5°.

KHK adds that gears with 16 or fewer teeth can still work if strength and contact ratio are acceptable. A positive profile shift prevents the undercut. The calculator flags any count under the minimum for the pressure angle you pick.

Inch gears and diametral pitch

Diametral pitch (DP, or P in formulas) is the number of teeth per inch of pitch diameter. KHK converts it with m = 25.4 ÷ P, and the pitch diameter in inches is z ÷ P.

Diametral pitch Module
12 2.117
16 1.588
20 1.27
24 1.058
32 0.794

Pick “Diametral pitch” in the calculator to get every dimension in millimeters and inches. The root diameter uses the same 1.25 m dedendum (depth below the pitch circle) as a metric gear.

If the printed pair binds or rattles

  1. Measure each printed gear across the tips and compare it with the “Calipers across the tips” figure. A gear that prints large has oversized outer walls. The slicer’s XY compensation shrinks them, and the hole compensation calculator works out the value.
  2. Measure the real distance between the shafts, not the holes in the model, and compare it with the center distance. For the fit of the gear bore on its shaft, use the tolerance calculator.
  3. Change one thing at a time. Sovol’s procedure: print a base with two pins at a fixed center distance and test pairs that differ only in tooth clearance. Add clearance in small steps if they bind, and take it away if they rattle.

Published · Figures last checked