Gear generator, with STL, SVG and DXF export
Spur and helical gear pairs for 3D printing and laser cutting. Check the pair against engineering rules, download the files. It runs in your browser and nothing is uploaded.
Loading the geometry engine...
Nothing is uploaded. The gears are built and the files are made on your machine.
-
Numbers and rule checks
Every number below updates with the settings. Each check names the rule it comes from in the EduFacturing rules core, or says that it is a geometry check of this page.
| Quantity | Gear 1 | Gear 2 |
|---|---|---|
| Pitch diameter | - | - |
| Tip diameter | - | - |
| Root diameter | - | - |
| Base diameter | - | - |
| Tooth tip thickness | - | - |
| Bore | - | - |
| Volume | - | - |
| Triangles | - | - |
| STL size | - | - |
| Module in the plane of rotation | - | |
| Center distance | - | |
| Gear ratio i = z2 / z1 | - | |
| Contact ratio, transverse | - | |
| Overlap ratio, helical | - | |
| Contact ratio, total | - | |
| Build time | - | |
How it works
Three steps, no account.
Choose the gears
Pick spur or helical, the module and the number of teeth of gear 1, and add a second gear that meshes with it. The preview shows the pair at the right center distance and the checks update as you type.
Set size and fit
Set the face width, the bore and an optional keyway for each gear, and the backlash. The table shows pitch, tip, root and base diameters, center distance, ratio and contact ratio.
Download the files
Get a binary STL of each gear, or both in a ZIP, for printing, and an SVG or DXF of the 2D profile in millimetres for laser cutting or CAD. Nothing is uploaded: it all runs in your browser.
Settings
What goes in, what comes out and what you can set.
| Setting | Range and default | What it does |
|---|---|---|
| Type | Spur or helical, default spur | Spur teeth are straight. Helical teeth are twisted along the face by the helix angle (28 intermediate layers between the two faces), gear 1 right handed and gear 2 left handed. |
| Module | ISO 54 series 0.5, 0.8, 1, 1.25, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 16, 20, or another value from 0.3 to 20; default 2 | Size of the tooth in mm: pitch diameter = module x teeth. Both gears share it. For helical gears it is the normal module. |
| Teeth | 6 to 120, defaults 20 and 40 | Number of teeth of each gear. The second gear is optional. Below 17 teeth the page warns about undercut. |
| Pressure angle | 14.5 to 25 degrees, default 20 | Angle of the tooth flank at the pitch circle. 20 degrees is the ISO 53 base profile. |
| Face width | 1 to 100 mm, default 16 | Thickness of the gear along the shaft. The default is 8 times the module, the low end of the usual 8 to 16 range. |
| Helix angle | 5 to 45 degrees, default 20 | Twist of the teeth for helical gears. The usual range is 15 to 45 degrees. |
| Backlash | 0 to 1 mm, default 0.2 | Play between the teeth along the pitch circle, made by thinning every tooth by half of it. 0.15 to 0.25 mm suits FDM. |
| Bore and keyway | 0 to 100 mm, default 6 | Center hole of each gear, kept 0.8 mm clear of the tooth roots. The keyway follows DIN 6885 for the bore size and is cut from 6 mm up. |
| Rule checks | Live, next to the numbers | Module in the ISO series; at least 17 teeth; contact ratio at least 1.2; ratio per stage 1 to 10; face width 8 to 16 modules; backlash 0.15 to 0.25 mm; helix angle 15 to 45 degrees. Each check names its rule, and the geometry checks say they are not rules. |
| STL | Binary, millimetres | 84 byte header, then 50 bytes per triangle. A closed solid, standing on Z = 0 and centered on X and Y, with outward normals. |
| SVG and DXF | Millimetres | The 2D profile in the plane of rotation. The two gears sit side by side with a 5 mm gap. DXF is ASCII R12 with units set to millimetres, one layer per gear. |
| Upload | None | The page sends no design and no file anywhere. |
Module and diametral pitch
Metric gears use the module, inch gears the diametral pitch. They are two ways to say the same thing.
m is the module in mm, d the pitch diameter, z the number of teeth and P the diametral pitch in teeth per inch. A gear of module 2 and 30 teeth has a pitch diameter of 60 mm, which is 2.362 inches, so its diametral pitch is 30 / 2.362 = 12.7.
| Module, mm | Diametral pitch, 1/in |
|---|---|
| 1 | 25.40 |
| 1.25 | 20.32 |
| 1.5 | 16.93 |
| 2 | 12.70 |
| 2.5 | 10.16 |
| 3 | 8.47 |
| 4 | 6.35 |
These are the standard full depth tooth: the tip is one module above the pitch circle, the root 1.25 modules below it. For a helical gear the same formulas apply in the plane of rotation, with the transverse module m / cos(beta) in place of m for the pitch diameter and the center distance, and the normal module m for the tooth height.
How to print the gears
Numbers come from the EduFacturing rules core where it has them. The rest is practice, and is marked as such.
Backlash
For an FDM printed pair use 0.15 to 0.25 mm. Below that, teeth fuse or bind. The general range for gears is 0.04 to 0.25 mm.
Shaft fit
Printed holes come out smaller than drawn. For a part that slides, the rules core gives about 0.20 to 0.35 mm of clearance, 0.10 to 0.20 mm for a tight fit, inside 0.1 to 0.5 mm. Test it on your printer.
Teeth and walls
Keep every wall at least 0.8 mm for FDM. The page applies this to the tooth tip and to the material around the bore, and warns when a small module makes the tips thinner. A larger module is the fix.
Orientation, practice
Print flat with the axis vertical. The tooth profile then lies in the layers and stays accurate, and the load on a tooth acts along the layers, not across them. The rules core has no rule for this.
Material, practice
Brittle filament wears and chips teeth. A tougher material such as PETG or nylon usually lasts longer in a running gear. The rules core has no rule for gear materials, so test a pair.
Print a test pair first
A short pair of the same module and backlash shows in minutes whether the clearance and the fit suit your printer, before you commit to a large gear.
Measured example
Six gear pairs built in the browser, with every file downloaded and checked
| Pair | Triangles | STL size | ZIP | SVG | DXF | Build time |
|---|---|---|---|---|---|---|
| Spur, m 1, 20 and 40 teeth | 2,720 / 5,280 | 132.9 KB / 257.9 KB | 74.4 KB | 31.6 KB | 90.1 KB | 65 ms |
| Spur, m 2, 20 and 40 teeth | 2,720 / 5,280 | 132.9 KB / 257.9 KB | 74.7 KB | 32.7 KB | 91.3 KB | 77 ms |
| Spur, m 2, 12 and 40 teeth (warns) | 1,696 / 5,280 | 82.9 KB / 257.9 KB | 65.5 KB | 28.2 KB | 79.3 KB | 59 ms |
| Helical 20 deg, m 2, 20 and 40 teeth | 38,560 / 72,160 | 1.84 MB / 3.44 MB | 2.17 MB | 31.6 KB | 87.7 KB | 569 ms |
| Spur, m 2, 24 and 48 teeth, bore 8 and 10 with keyway | 3,228 / 5,916 | 157.7 KB / 288.9 KB | 88.0 KB | 37.7 KB | 104.6 KB | 104 ms |
| Spur, m 1.5, 30 and 30 teeth | 4,000 / 4,000 | 195.4 KB / 195.4 KB | 77.8 KB | 32.5 KB | 91.0 KB | 85 ms |
The numbers behind them
| Pair | Tip dia., mm | Root dia., mm | Center distance, mm | Contact ratio | Free play, mm | Overlap, mm3 |
|---|---|---|---|---|---|---|
| spur, m 1, z 20 and 40 | 22.000 / 42.000 | 17.500 / 37.500 | 30.000 | 1.635 | 0.202 | 0.0000 |
| spur, m 2, z 20 and 40 | 44.000 / 84.000 | 35.000 / 75.000 | 60.000 | 1.635 | 0.204 | 0.0000 |
| spur, m 2, z 12 and 40 | 28.000 / 84.000 | 19.000 / 75.000 | 52.000 | 1.405 | n/a | 0.0000 |
| helical 20 deg, m 2, z 20 and 40 | 46.567 / 89.134 | 37.567 / 80.134 | 63.851 | 2.375 | 0.203 | 0.0000 |
| spur, m 2, z 24 and 48 | 52.000 / 100.000 | 43.000 / 91.000 | 72.000 | 1.675 | 0.202 | 0.0000 |
| spur, m 1.5, z 30 and 30 | 48.000 / 48.000 | 41.250 / 41.250 | 45.000 | 1.654 | 0.152 | 0.0000 |
Measured on 2026-10-07 in headless Chromium 149.0.7827.55 on an Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz workstation. Build time is the page's own work for both gears (profile, extrusion, cuts and the STL bytes), median of 3 runs per row; loading the geometry engine and drawing the preview are not included. Every STL was read back byte by byte: size 84 + 50 x triangles, every edge shared by exactly two triangles with consistent winding, tip diameter and root diameter taken from the vertices, and the volume equal to the profile area from the downloaded SVG and DXF times the face width. Free play is the angle gear 2 can turn between the two flanks of gear 1, measured on the 2D profiles from the SVG and expressed along the pitch circle: it matches the backlash you set within about 0.01 mm. Overlap is the largest volume shared by the two bodies over 24 turning phases spread over one tooth pitch (90 for the 12 and 40 tooth pair), computed on the downloaded STL files with a separate geometry library; 0 means the bodies never touch at any phase. The page still warns for the 12 and 40 tooth pair: the models do not overlap, but the tip of the large gear reaches below the base circle of the small one, where the profile is a straight flank instead of an involute, so free play is not given for it. Your times will differ.
Frequently asked questions
How do I make a gear for 3D printing?
Pick the module (the size of the teeth) and the number of teeth for each gear in the generator at the top of this page, set the face width and the bore, and look at the checks under the preview. Then download the STL files, or both in one ZIP, and slice them like any other part. The gears are built flat on Z = 0, so they print flat on the bed with the axis vertical. Keep the backlash inside the FDM range 0.15 to 0.25 mm (rule dfam.feature.pip_mesh_backlash_mm) so printed teeth do not fuse, and print a test pair before a long print. The default pair (module 2, 20 and 40 teeth) came out as 2,720 and 5,280 triangles, 132.9 KB and 257.9 KB of STL and a 74.7 KB ZIP.
What is gear module?
The module m is the pitch diameter divided by the number of teeth, in millimetres: m = d / z. It sets the size of the tooth, and two gears mesh only if they have the same module (and the same pressure angle). The preferred values of the ISO 54 series are 0.5, 0.8, 1, 1.25, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10, 12, 16, 20 mm (rule mech.gear.module_standard_series). Inch based gears use the diametral pitch instead, P = 25.4 / m, so module 2 is about 12.7 teeth per inch.
What is the minimum number of teeth for a gear?
For the standard 20 degree pressure angle a gear needs at least 17 teeth to avoid undercut (rule mech.gear.min_teeth_20deg), which is the 2 / sin^2 of the angle rounded to a whole tooth (17.1). Down to 14 teeth the undercut is slight (rule mechanical.spur_gear.gear_min_tooth_count_with_slight_undercut). Below that the root of the tooth is cut away in a real gear, and the tooth gets weak. The generator warns when a gear is under the limit and when the tip of one gear would dig into the root of the other. It does not offer profile shift, the usual cure for a small pinion, so use more teeth.
How do I calculate the center distance of two gears?
For two spur gears of the same module, a = m x (z1 + z2) / 2. The default pair, module 2 with 20 and 40 teeth, sits at 2 x 60 / 2 = 60 mm. For helical gears with the normal module m and the helix angle beta, a = m x (z1 + z2) / (2 x cos beta). The page shows the exact value, and the 3D preview places the gears at it. The backlash is made by thinning the teeth, not by moving the gears apart, so print the pair and mount the shafts at exactly this distance.
How do I calculate the gear ratio?
The ratio is the teeth of the driven gear over the teeth of the driver, i = z2 / z1, with gear 1 as the driver. 40 and 20 teeth give 2 : 1, so the output turns at half the speed and with twice the torque, less friction. One stage should stay between 1 and 10 (rule mech.gear.ratio_per_stage); for more, chain two stages. For gear trains and planetary gearboxes use the Gear Designer.
How much backlash should a 3D printed gear have?
For an FDM printed pair the rules core gives 0.15 to 0.25 mm (rule dfam.feature.pip_mesh_backlash_mm), and 0.04 to 0.25 mm (rule mech.gear.backlash_range, stated for modules 1 to 5) for gears in general. The default here is 0.2 mm. The page measures backlash along the pitch circle and takes half of it off the tooth thickness of each gear. Printers differ, so print a test pair and change the value if the pair binds or rattles. The rules core has no backlash figure for resin or powder printers, so none is given for them.
Can I use the DXF or SVG for laser cutting?
Yes. Both files hold the 2D profile of the gears in millimetres, with 1 unit = 1 mm. The two gears sit side by side with a 5 mm gap so you can cut them apart, the DXF has one layer per gear, and the bore with its keyway is a hole in the profile. The outline is the nominal one: a laser removes a strip of material, so measure the kerf on your machine and allow for it in the backlash. The files hold the profile in the plane of rotation, so for a helical gear they are not a flat cutting pattern. The bore is drawn as a 40 sided polygon, the same as in the STL.
Is the gear generator free?
Yes. There is no account, no daily limit and no watermark on the files.
Is my design uploaded to a server?
No. The gears are built inside your browser tab by code that runs on your own machine, using a geometry engine compiled to WebAssembly. The page loads its scripts and that engine from edufacturing.com when you open it, and it sends no design, no settings and no file anywhere.
Can I get a STEP file of the gear?
You can convert the STL with the STL to STEP converter, which is free and runs in your browser. The STEP file it makes from triangles is faceted: the shape is kept, but every tooth flank stays a mesh of small flat faces. The converter does not recognise the involute curve, so do not expect an editable tooth profile in your CAD program. For a part you will edit in CAD, build the gear in a parametric CAD tool that draws the involute, and use the STL here for printing and the DXF for the profile.
What is the difference between spur and helical gears?
Spur gears have straight teeth parallel to the shaft. Helical gears have teeth twisted along the face, so the teeth enter the mesh gradually, which is quieter and adds an overlap to the contact ratio, but pushes the shaft sideways. The rules core gives a helix angle of 15 to 45 degrees (rule mech.gear.helical_helix_angle). The two gears of a helical pair need opposite hands: the generator makes gear 1 right handed and gear 2 left handed, and the file names say so. The module you enter for a helical gear is the normal module.
Other tools
Part of the EduFacturing tool set.