Free · runs in your browser · no signup

Gear Generator (STL)

Pick the number of teeth and the module (tooth size), add a mating gear to set the ratio, and choose the shaft hole. The preview turns the pair at the real ratio, the table shows every diameter and the centre distance, and you download a watertight STL or 3MF ready to slice.

Loading the gear generator...

How to make a 3D printable gear

  1. 1

    Set the teeth and size

    Teeth count plus module in mm (or diametral pitch in inches). Both gears in a pair must use the same module and pressure angle.

  2. 2

    Add the mating gear

    Its teeth set the ratio: 20 and 40 teeth give 2:1. Mount the shafts at the centre distance shown.

  3. 3

    Fit the shaft

    Round, D-flat, keyway or hex hole, plus an optional hub. Printed holes come out small, so keep the 0.2 mm allowance.

  4. 4

    Download and print

    STL for each gear or one 3MF with both. Print each gear flat on the bed with 4 or more walls.

Need more than a gear?

Turn a photo or text into a printable 3D model with AI, with an STL download. The AI generators use credits; this gear tool does not.

More free tools: 3D print cost calculator · STL viewer

Gear formulas (module system)

These are the standard involute gear formulas the generator uses, with a worked example for 20 teeth at module 2 and a 20° pressure angle. The tooth flanks are true involutes from the base circle, with a rounded root fillet.

Pitch diameter dd = z × m (20 × 2 = 40 mm)
Outside diameter dada = d + 2m (44 mm)
Root diameter dfdf = d − 2.5m (35 mm, root clearance 0.25m)
Base circle dbdb = d × cos(pressure angle) (37.588 mm at 20°); the involute flank starts here
Circular pitch pp = π × m (6.283 mm tooth to tooth along the pitch circle)
Centre distance aa = m × (z1 + z2) / 2 (20 + 40 teeth: 60 mm)
Gear ratioz2 / z1 (40 / 20 = 2 : 1; the big gear turns at half the speed with twice the torque)
Diametral pitchm = 25.4 / DP (DP 12 = module 2.117 mm)

Tips for 3D printing gears

Common starting points for an FDM printer with a 0.4 mm nozzle; your printer may need small changes.

Module vs nozzleModule 1 or more prints cleanly with a 0.4 mm nozzle; module 1.5 to 2 is sturdier. Below about 0.8, use a 0.2 mm nozzle or a resin printer.
OrientationPrint each gear flat on the bed so the teeth are built from the side. Teeth printed standing up snap along the layer lines.
Layer height0.12 to 0.2 mm. Thinner layers give smoother flanks and quieter running.
Walls and infill4 to 6 walls so the teeth are solid plastic, then 40 to 60% infill for the body.
MaterialPLA is stiff and accurate for light loads. PETG is tougher and less brittle. Nylon wears best for gears that run a lot.
FitCheck the first print on its shafts. If it binds, add 0.05 to 0.1 mm of backlash; if a hole is tight, raise the allowance.
Elephant footA flared first layer makes the teeth rub. Turn on elephant-foot compensation or add a small chamfer by sanding.

Gear generator FAQ

Both describe tooth size. Module is the pitch diameter in millimetres divided by the number of teeth (module 2 with 20 teeth gives a 40 mm pitch circle). Diametral pitch is teeth per inch of pitch diameter, so a bigger DP means smaller teeth. Convert with module = 25.4 / DP. Two gears only mesh if they share the same module (or DP) and pressure angle.
20° is the modern standard and the right choice for almost every printed gear. 14.5° is an older standard that runs a little quieter but needs more teeth (about 32) to avoid undercut. 25° gives thicker, stronger roots and lets small gears (down to about 11 teeth) avoid undercut, at the cost of more load on the bearings.
Start with 0.15 to 0.2 mm total for PLA or PETG on a 0.4 mm nozzle; that is the default here. Well-tuned printers can go down to 0.1 mm; rough or over-extruding printers may need 0.3 mm. The tool thins each tooth by half the backlash, so the pair fits at the exact centre distance shown.
Lay the gear flat on the bed, use 4 to 6 walls so the teeth are solid, 40 to 60% infill, and a layer height of 0.12 to 0.2 mm. Use PETG or nylon for gears under load. A module of 1.5 or more and at least 17 teeth (at 20°) gives thicker teeth that do not snap.
A gear with fewer than about 17 teeth at 20° is undercut: the cutting rack would remove part of the tooth root, so the teeth get a thin neck. This generator models the cut, so the gear still meshes, but it is weaker. Use more teeth, or a 25° pressure angle, to remove the warning.
Helical teeth engage gradually, so they run smoother and quieter than spur gears, but they push sideways along the shaft. Herringbone gears are two mirrored helical halves, so the side forces cancel; they also print well because each half overhangs only a little. The mating gear is made with the opposite hand automatically.
At the centre distance shown under the preview: module × (teeth A + teeth B) / 2. For 20 and 40 teeth at module 2 that is 60 mm. The backlash is already built into the teeth, so do not add extra distance; if the pair binds, raise the backlash setting instead.
Yes. It runs entirely in your browser: nothing is uploaded, there is no signup and no watermark, and you can download as many STL and 3MF files as you like. The AI 3D generators linked below use credits; this tool does not.