Rack and Pinion Calculator
Rack and Pinion Calculator
Travel per revolution, steps per millimetre, thrust and backlash for a rack and pinion drive — with the backlash set where it really is set, by the pinion’s height above the rack, and the rack’s own pitch error put beside the resolution so the two are not confused.
Rack and pinion
Module 2, a 20-tooth pinion, a 10:1 planetary reducer, a 1.8° stepper at quarter stepping (800 steps per turn) and 1.2 N·m of motor torque
Everything on this page comes out of π·m
- π·m
- the rack’s circular pitch, and the whole of the rack’s geometry. A rack is the basic rack profile: straight flanks at the pressure angle, tooth thickness π·m/2 at the reference line, addendum 1·m, dedendum 1.25·m. It is the involute’s limiting case as the pitch radius goes to infinity, which is why it can be cut with a straight-sided tool and why the STANDARD is written as a rack
- z
- pinion teeth. The pitch circle rolls on the rack reference line without slipping, so one turn moves the rack by the pitch circumference π·m·z — which is also exactly z circular pitches, as it has to be
- N, i
- steps or encoder counts per motor revolution, and the reducer ratio between motor and pinion. Together they are the only two cheap variables here: the module and the tooth count are set by thrust
- η
- drive efficiency. The mesh itself is 98 to 99 per cent (RoyMech’s figure for any spur mesh, and a rack and pinion is one); a complete drive is quoted at up to 97 per cent (Nidec). Anything you lose below that is the reducer, the bearings and the preload, not the teeth
- Δh
- how far the pinion centre sits ABOVE the nominal height. There is no centre distance in a rack drive and no second gear to move — the mounting height is the backlash adjustment, and it is the only one
- tan α
- 0.3640 at 20°, 0.2586 at 14.5°, 0.4663 at 25°. It converts a height error into a backlash and a thrust into a separating force, and it is the reason a 25° rack needs a stiffer pinion mounting than a 20° one for the same thrust
Worked example
Module 2, a 20-tooth pinion, a 10:1 planetary reducer, a 1.8° stepper at quarter stepping (800 steps per turn) and 1.2 N·m of motor torque
TRAVEL PER PINION REVOLUTION first, because everything follows from it. The pitch circle rolls on the rack without slipping, so one turn moves the rack by the pitch circumference: π·m·z = π × 2 × 20 = 125.6637 mm. Check it the other way: the rack pitch is π·m = 6.2832 mm and the pinion has 20 teeth, so one turn is 20 rack pitches, which is the same number
The reducer divides it. Travel per MOTOR revolution = 125.6637 / 10 = 12.5664 mm
And the stepper divides it again. Resolution = 12.5664 / 800 = 0.0157 mm, which is 15.71 microns. Inverted, that is 63.6620 steps per millimetre — the number you type into the controller, and the reason most people are here
THRUST. The pinion pitch radius is m·z/2 = 20 mm = 0.020 m. The pinion sees 1.2 × 10 = 12 N·m. So the ideal thrust is 12 / 0.020 = 600 N, and at 94 per cent efficiency 564 N. Note which radius that is: the PITCH radius, not the tip radius and not the shaft
AND THE FORCE THAT IS NOT THRUST. The tooth pushes along its own normal, so there is a separating component F·tan 20° = 205 N trying to lift the pinion off the rack. That force has to be carried by the pinion bearings and by the mounting, and if the mounting deflects under it the backlash opens under load — which is the commonest reason a rack drive that measured well on the bench positions badly in service
BACKLASH. Lift the pinion 0.05 mm above nominal and j = 2 × 0.05 × tan 20° = 0.0364 mm. Exactly, not approximately: the rack flank is a straight line, so there is no involute correction. To get 0.01 mm you would set the height to 0.0137 mm above nominal, which is a tolerance no ordinary machined bracket holds — hence split pinions and electronic preload
AND WHAT NONE OF THIS BUYS. The resolution above is 15.71 microns. A hardened and ground rack has a pitch error of 0.05 mm per metre, so over a four-metre axis the rack alone contributes 0.20 mm — 13 times the step size. Resolution is not accuracy. It buys smoothness and repeatability; accuracy comes from the rack's own pitch, from mapping the segments, or from a linear scale that measures the axis rather than the motor
Module against everything else, at 20 teeth, a 10:1 reducer, 800 steps and 1.2 N·m
| Pinion | Travel per pinion turn (mm) | Travel per motor turn (mm) | Steps per mm | Resolution (µm) | Thrust (N) | Rack pitch (mm) |
|---|---|---|---|---|---|---|
| m = 1.5, z = 20 | 94.248 | 9.4248 | 84.883 | 11.78 | 752 | 4.7124 |
| m = 2, z = 20 | 125.664 | 12.5664 | 63.662 | 15.71 | 564 | 6.2832 |
| m = 2.5, z = 20 | 157.080 | 15.7080 | 50.930 | 19.63 | 451 | 7.8540 |
| m = 3, z = 20 | 188.496 | 18.8496 | 42.441 | 23.56 | 376 | 9.4248 |
| m = 4, z = 20 | 251.327 | 25.1327 | 31.831 | 31.42 | 282 | 12.5664 |
| m = 5, z = 20 | 314.159 | 31.4159 | 25.465 | 39.27 | 226 | 15.7080 |
| m = 6, z = 20 | 376.991 | 37.6991 | 21.221 | 47.12 | 188 | 18.8496 |
| m = 8, z = 20 | 502.655 | 50.2655 | 15.915 | 62.83 | 141 | 25.1327 |
Rack pitch error by manufacturing process, and what it becomes over a long axis
| How the teeth were made | mm per metre | over 1 m | over 4 m | over 10 m | over 20 m | over 20 m if segments cancel |
|---|---|---|---|---|---|---|
| Hardened teeth, not ground | 0.200 | 0.200 | 0.800 | 2.000 | 4.000 | 0.894 |
| Milled teeth, soft or induction hardened | 0.125 | 0.125 | 0.500 | 1.250 | 2.500 | 0.559 |
| Hardened and ground teeth | 0.050 | 0.050 | 0.200 | 0.500 | 1.000 | 0.224 |
| Hardened and ground, best published (Nidec) | 0.012 | 0.012 | 0.048 | 0.120 | 0.240 | 0.054 |
Backlash against pinion centre height, j = 2·Δh·tan α
| Pinion lifted by (mm) | at 14.5° | at 20° | at 25° | The 20° figure as an angle at a 40 mm pitch circle (arc minutes) |
|---|---|---|---|---|
| 0.01 | 0.0052 | 0.0073 | 0.0093 | 1.3 |
| 0.02 | 0.0103 | 0.0146 | 0.0187 | 2.5 |
| 0.05 | 0.0259 | 0.0364 | 0.0466 | 6.3 |
| 0.10 | 0.0517 | 0.0728 | 0.0933 | 12.5 |
| 0.20 | 0.1034 | 0.1456 | 0.1865 | 25.0 |
| 0.50 | 0.2586 | 0.3640 | 0.4663 | 62.6 |
The rack is the basic profile, the backlash is one dimension, and resolution is not accuracy
A rack is not a very large gear. It is the basic rack profile. Let the pitch radius of an involute gear go to infinity and the involute flank becomes a straight line; the tooth becomes a trapezoid with flanks at the pressure angle. That is not an approximation that gets good for big gears — it is the exact limit, and it runs the other way round from how people usually think about it. The rack is the DEFINING object. ISO 53 and DIN 867 specify the standard basic rack tooth profile, and every involute gear in the system is defined as the shape that straight-sided rack generates when it rolls. This is why a rack can be cut with a simple straight-flanked tool, why a hob is a rack wrapped round a helix, and why the module is a property of a rack before it is a property of a gear.
Backlash lives in one dimension, and it is not a centre distance. A gear pair has two pitch circles and a centre distance between them; open the centre distance and the backlash opens with it, through an involute relation that has to be solved rather than evaluated. A rack drive has one pitch circle and a straight line. The pinion’s pitch circle is tangent to the rack’s reference line at zero backlash, and lifting the pinion centre by Δh gives exactly j = 2·Δh·tan α — exactly, because the rack flank is straight and the rack tooth thickness at height h above the reference line is π·m/2 − 2h·tan α with no involute in it. So the entire backlash of the drive is set by the height of one bored hole above one machined face, and a tenth of a millimetre of error there is 0.073 mm of lost motion at 20°. That is a tolerance worth putting on the drawing in bold.
A rack drive does not hold, and that is a safety matter. Self-locking needs a very low lead angle and a high friction coefficient — it is a worm gear property, not a spur one. A rack and pinion back-drives freely: push the rack and the pinion turns, at very nearly the same efficiency as the forward direction. On a horizontal axis that is only a control problem. On a VERTICAL axis it means the load falls the instant the motor loses current, and a stepper’s holding torque is not a brake — it goes to zero with the drive enable, on a fault, on a following error, and at every emergency stop. A vertical rack axis needs a fail-safe brake: spring-applied, electrically released, sized on the load torque at the pinion with a margin, and mounted where a broken coupling cannot bypass it. Put it on the motor shaft and a sheared motor-to-gearbox coupling drops the load anyway.
Resolution is not accuracy, and on a long axis it is not even close. The steps-per-millimetre figure this page computes is exact arithmetic on the gear ratio, and it tells you the smallest commanded move. It says nothing about where the axis actually is. Over a four-metre travel a hardened and ground rack contributes 0.2 mm of cumulative pitch error, a milled rack half a millimetre, and an unground hardened rack 0.8 mm — hundreds of times a typical step. That error is systematic rather than random: it is the same on every pass, it does not average out, and a closed loop on the MOTOR cannot see it at all because the motor is turning exactly as commanded. It is also why long axes are supplied as numbered segments with a measured pitch map and an assembly order, and why the difference between a sorted and an unsorted assembly can be a factor of two.
What this page does not do. It does not size the pinion’s teeth against the thrust — that is a bending stress question and it belongs on the gear tooth bending stress page, with the rack treated as a gear of infinite tooth count so the form factor is the pinion’s. It does not compute the pinion’s own geometry beyond the pitch, tip and base diameters; the spur gear geometry page does that properly, including the span and over-pins measurements you need to inspect one. It does not compute the contact ratio, which for a rack pair is higher than for two gears of the same module and is worth knowing — the contact ratio page has it. And it assumes the rack is straight, flat and rigidly mounted, which for a twenty-metre gantry rail is an assumption and not a fact.
Frequently asked questions
What is the travel per revolution of a rack and pinion?
π·m·z, where m is the module and z is the pinion’s tooth count. The pinion’s pitch circle rolls on the rack’s reference line without slipping, so one revolution moves the rack by the pitch circumference. Module 2 with a 20-tooth pinion gives 125.664 mm per turn. The same number is z rack pitches, since the rack pitch is π·m — which is a useful check, and it is also how you verify a rack you have in your hand: measure across ten teeth and divide by ten.
How do I work out steps per mm for a rack and pinion?
Steps per mm = (steps per motor revolution × gearbox ratio) ÷ (π·m·z). A 1.8° stepper at quarter stepping is 800 steps per turn; through a 10:1 reducer onto a module 2, 20-tooth pinion that is 800 × 10 ÷ 125.664 = 63.662 steps per mm. Enter the full-precision figure rather than a rounded one: rounding 63.662 to 64 is a 0.53 per cent scale error, which is five millimetres in a metre and is systematic on every move.
How do I set the backlash on a rack and pinion?
By the height of the pinion centre above the rack mounting face, and by nothing else. At the nominal height the pinion’s pitch circle is tangent to the rack’s reference line and the backlash is zero; each millimetre of lift adds 2·tan α of backlash, which is 0.728 mm at 20°. Working backwards, a typical 0.06·m backlash on a module 2 rack is 0.12 mm, which needs the centre height 0.165 mm above nominal. Setting that reliably is the hard part, which is why precision drives use a split or twin pinion preloaded against the rack instead of trying to hold a height tolerance.
Is a rack and pinion self-locking?
No. It back-drives at close to its forward efficiency, and there is no tooth geometry that changes that — self-locking needs the very low lead angle of a worm. A vertical rack axis therefore needs a mechanical brake that is applied by a spring and released electrically, so that losing power applies it. A stepper’s holding torque is not a brake: it is zero whenever the drive is disabled, which includes every fault and every emergency stop. Size the brake on the load torque at the pinion with a margin, and mount it so that a failed coupling cannot get between it and the load.
What efficiency should I use for a rack and pinion?
Depends which thing you mean. The MESH is 98 to 99 per cent — a rack and pinion is a spur mesh and RoyMech gives that band for every spur pair. A complete DRIVE is quoted at up to 97 per cent by Nidec, and 90 to 95 per cent is a realistic working number once a planetary reducer, its bearings, a seal and any anti-backlash preload are included. Use the drive figure for sizing a motor. If the drive is twin-pinion preloaded, take more off again: the two pinions spend real torque fighting each other, by design.
Why do long rack axes come in numbered segments?
Because pitch error accumulates. A hardened unground rack is specified at about 0.20 mm per metre, a milled one at 0.10 to 0.15 and a ground one at under 0.05, and over a twenty-metre gantry those become 4, 2.5 and 1 mm respectively if the errors all add. They do not have to all add: if each segment is measured and the assembly order is chosen so that positive and negative errors alternate, the total grows roughly as the square root of the length instead. That is what a mapped rack is, and the makers’ published cases show the maximum cumulative error halving from nothing but the choice of order. Segment joints also have to hold the pitch ACROSS the joint, which is why the ends are machined to a half-pitch and set with a gauge tooth rather than butted by eye.
Rack and pinion or ball screw?
Rack wins on length and on speed; the screw wins on resolution, stiffness and holding. A ball screw’s travel is limited by whipping — the critical speed falls with the square of the unsupported length — so past two or three metres it stops being an option, while a rack is simply another segment. Against that, a screw’s lead is a few millimetres per turn against a rack’s hundred-odd, so at the same motor it has twenty to fifty times the resolution and the reflected inertia to match; and a screw with a low enough lead will hold a vertical load, which no rack will. Gantries, plasma tables, long transfer axes and travelling columns are rack; Z axes, presses and short precision slides are screw.
Related calculators
References
- ISO 53:1998, Cylindrical gears for general and heavy engineering — Standard basic rack tooth profile. Cited by number. It is the document that makes a rack the reference object rather than merely another gear: the basic rack IS the profile, and every involute gear in the system is defined as what that straight-sided rack generates. What is taken from it here is four coefficients, not a table — addendum 1 m, clearance 0.25 m, hence dedendum 1.25 m and whole depth 2.25 m, with a 20° flank angle. DIN 867 is the same profile.
- ATLANTA Drive Systems, Gear Rack Mapping (read 29 September 2026). The source for the three rack pitch-error bands used here, printed as manufacturing processes rather than as quality grades: hardened teeth 0.20 mm per metre, milled teeth 0.10 to 0.15 mm per metre, ground teeth under 0.05 mm per metre. Also the source for the reason long axes are built from NUMBERED segments — their own worked case reduced the cumulative error on a ten-metre axis from a +0.020/−0.004 mm spread to +0.003/−0.009 mm by choosing the assembly order.
- Nidec Drive Technology, Applying Rack and Pinion in Linear Drive Systems (read 29 September 2026). The source for the drive-level efficiency figure quoted here, “up to 97% for rack and pinion drives”, set against 85 to 90 per cent for a linear motor, and for the pitch accuracy of a hardened and ground rack, under 0.012 mm per metre. Note that this is a DRIVE figure including the reducer, not a mesh figure.
- RoyMech, Gear Efficiency (read 29 September 2026). The source for the mesh figure the drive figure has to be read against: a spur mesh at 98 to 99 per cent, the same as helical and bevel, against 20 to 98 per cent for a worm. A rack and pinion IS a spur mesh, so anything below 98 per cent in a rack drive is the gearbox, the bearings, the seals and the preloading, not the teeth.
- ISO 21771:2007, Gears — Cylindrical involute gears and gear pairs — Concepts and geometry. Cited by number and not reproduced. It is the document that fixes the symbols used on the profile shift page — x for the profile shift coefficient, αwt for the working transverse pressure angle, aw for the working centre distance — and that separates the sum of the shifts from the centre distance change, which is the whole subject of that page.
