AdderCAD Open Studio

Free tools

Spur gear generator

Set the module (or diametral pitch), number of teeth and bore, and the generator builds a spur gear with true involute teeth, or a meshing pair with its centre distance. Download it as STL for your slicer or STEP for CAD. It all runs in your browser, so nothing is uploaded.

Last updated 24 November 2026.

How to make a gear with the generator

The sizes table under the form updates as you type, before anything is built. Press Generate to build the gear itself. The first time, your browser downloads the CAD engine (about 23 MB before compression). After that:

  1. Choose how to size the teeth: module for metric gears, diametral pitch for inch gears. Two gears only mesh if they have the same module (or pitch) and the same pressure angle.
  2. Set the number of teeth. The pitch diameter is module × teeth, so 20 teeth at module 1 gives a 20 mm pitch diameter.
  3. Set the face width, which is the gear's thickness and its print height, and the bore for your shaft. Pick a D-flat for a motor shaft with a flat, or a DIN 6885 keyway.
  4. Add a hub if you want a boss on one face, for example to hold a set screw.
  5. Tick Add a second gear for a pair. The generator places the two gears at the centre distance with their teeth meshed, and shows the ratio and contact ratio.
  6. Choose STL or STEP and download. As STEP, a pair stays meshed at the centre distance, ready to drop into a CAD assembly. As STL, the two gears sit side by side so your slicer prints them as separate parts.

Each time it builds, the generator checks that every gear is a closed, valid solid. For a pair, it measures the gap between the closest teeth and checks it against the backlash you set.

Gear sizes: the formulas the generator uses

For a standard spur gear with module m and z teeth:

Size Formula 20 teeth, module 1
Pitch diameter m × z 20 mm
Outside (tip) diameter m × (z + 2) 22 mm
Root diameter m × (z − 2.5) 17.5 mm
Base circle diameter m × z × cos(pressure angle) 18.79 mm at 20°
Addendum (pitch circle to tip) 1 × m 1 mm
Dedendum (pitch circle to root) 1.25 × m 1.25 mm
Circular pitch (tooth to tooth along the pitch circle) π × m 3.142 mm

Two meshing gears sit at a centre distance of m × (z1 + z2) ÷ 2. A 20-tooth and a 40-tooth gear at module 1 are 30 mm apart, and the ratio is 40 ÷ 20 = 2, so the small gear turns twice for each turn of the big one.

The extra 0.25 m of dedendum is the clearance between one gear's tips and the other gear's roots, so the tips never hit the bottom of the tooth spaces.

Which standard: ISO 53 and AGMA 201

The tooth proportions come from the basic rack, the straight-sided tooth form that a gear's teeth are cut to fit. The generator uses:

  • Metric gears (module): ISO 53 profile A. Addendum 1.00 m, dedendum 1.25 m, root fillet radius 0.38 m, 20° pressure angle.
  • Inch gears (diametral pitch): AGMA 201 full depth. Addendum 1/P, dedendum 1.25/P, root fillet radius 0.30/P, in inches.

Diametral pitch P is the number of teeth per inch of pitch diameter, so module = 25.4 ÷ P. A 24-tooth gear at 24 diametral pitch has a pitch diameter of exactly 1 inch (25.4 mm). With the pitch converted, the sizes match ISO 53 except for the root fillet.

The pressure angle is the angle at which teeth push on each other. 20° is the standard for both systems today. 14.5° appears on older inch gears, and 25° gives stronger teeth at the cost of more push on the bearings. Gears with different pressure angles don't mesh properly, even at the same module. ISO 53 defines only 20°, so at 14.5° and 25° the generator keeps the same proportions. At 25° the rack's tip is too narrow for a 0.38 m fillet, so the fillet shrinks to about 0.30 m.

Involute teeth, and how the generator makes them

Gear teeth are shaped as involutes so that two gears turn at a steady speed ratio. An involute is the curve traced by the end of a taut string unwound from a circle, called the base circle. Two involute teeth always push along the same straight line, so the ratio stays exact even if the centre distance is slightly off, which helps with printed gears that don't come out perfectly to size.

The generator computes the involute from its formula, then fits a smooth curve through those points to within 0.00001 mm. Below the involute, the root of each tooth has the fillet a real cutter leaves. The generator works out that curve as the path of the rounded tip of the ISO 53 or AGMA rack, rolled around the gear the way a hob cuts it.

That also gives you undercut on small gears. When a gear has fewer than about 17 teeth at 20° (2 ÷ sin² 20° = 17.1), the cutter's tip cuts into the bottom of each tooth flank. Factory gears have the same undercut. The teeth still mesh, but their roots are thinner and the contact ratio falls, so use more teeth if you can. At 14.5° the limit is about 32 teeth, and at 25° about 11.

The tool's checks compare the generated gear with the standard: in the test suite, a 20-tooth and a 40-tooth gear at module 1 are exported as STEP and read back, and their teeth fill exactly half the circle at 20 mm and 40 mm (the pitch diameters), their tips reach 22 mm and 42 mm, and their axes are 30.000 mm apart.

Backlash and other tips for 3D printed gears

Backlash is the play between meshing teeth. Printed parts come out slightly oversize at their edges, so gears made to the exact size bind. The generator thins each gear's teeth by half the backlash you set, measured along the pitch circle, and keeps the standard centre distance. 0.1 to 0.2 mm suits most desktop FDM printers; start at 0.15 mm and adjust after a test print. For a pair, the closest teeth are half the backlash × cos(pressure angle) apart, which the generator measures and shows after each build.

  • Print gears flat, face down on the bed. Each tooth is then made of whole layers along its length, and the involute flank comes from the printer's XY motion, which is more accurate than its layer steps.
  • Module 1 or bigger suits a 0.4 mm nozzle. A module 1 tooth is 2.25 mm deep. Below module 0.5, teeth get finer than most FDM printers can form, though resin printers can manage them.
  • Size the bore for a printed hole. Holes print a little small, so add 0.1 to 0.2 mm to your shaft diameter, or drill or ream the hole after printing.
  • Contact ratio is the average number of tooth pairs touching at once. Keep it above about 1.2 for smooth running; the generator shows it for a pair. More teeth raise it.
  • Material. PETG and nylon wear better than PLA for gears that run for long periods. PLA is fine for prototypes and light loads.

What the generator doesn't make

It makes straight-toothed spur gears that mesh on parallel shafts. It doesn't make helical, bevel, worm or internal (ring) gears, racks, or profile-shifted gears. For a pair it uses the standard centre distance; if you need a different centre distance, you need profile shift, which isn't in this tool yet.

Need a gear with spokes, a custom hub or a pulley on the same part? AdderCAD designs it from a description.

Questions

How do you calculate the pitch diameter of a gear?

Multiply the module by the number of teeth: a 20-tooth gear at module 1 has a 20 mm pitch diameter. For inch gears, divide the number of teeth by the diametral pitch: 24 teeth at 24 diametral pitch gives 1 inch. The outside diameter is two modules bigger, 22 mm for the 20-tooth gear.

How do you calculate the centre distance between two gears?

Add the two tooth counts, multiply by the module and halve it. A 20-tooth and a 40-tooth gear at module 1 sit (20 + 40) × 1 ÷ 2 = 30 mm apart. Both gears must have the same module and pressure angle to mesh.

What is the difference between module and diametral pitch?

Both give the size of the teeth. Module is the pitch diameter in millimetres divided by the number of teeth, used for metric gears. Diametral pitch is the number of teeth per inch of pitch diameter, used for inch gears. Module = 25.4 ÷ diametral pitch, so 24 diametral pitch is module 1.058.

How much backlash should 3D printed gears have?

Between 0.1 and 0.2 mm in total, measured along the pitch circle, suits most desktop FDM printers. Print a pair at 0.15 mm, check that they turn freely without rattling, then adjust. The generator takes half of the backlash off each gear's teeth and keeps the standard centre distance.

What is the minimum number of teeth on a gear?

To avoid undercut, a standard gear needs at least 2 ÷ sin² of its pressure angle in teeth: 17 at 20°, 32 at 14.5° and 11 at 25°. Fewer teeth still work, but the cutter thins the root of each tooth and the gears run less smoothly. The generator goes down to 8 teeth and says when a gear is undercut.

Is anything uploaded when I use the generator?

No. The gear is built by the CAD engine running in your browser, and the STL and STEP files are made on your device. Your sizes and files are never sent anywhere. Like the rest of the site, the page uses cookieless analytics, which records whether you made one gear or a pair and which file format you downloaded, but not the sizes.

Need a part that doesn't exist yet?

Describe it in a sentence. AdderCAD Studio writes CAD code that builds it as a solid model, turns its sizes into sliders, and exports STEP, STL or 3MF.

Opens AdderCAD Studio with your description ready to send. Edit it first if you like.