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, teeth and drive → travel, thrust and backlash
The rack and the pinion must share it. A rack IS the basic rack profile of the module and diametral pitch page made real: pitch π·m, addendum 1·m, dedendum 1.25·m, flanks straight at the pressure angle. Module 2 and 3 cover most gantries; module 4 to 8 is machine-tool and crane territory.
Everything on this page scales with this number. Twice the teeth is twice the travel per turn, half the thrust and half the resolution — there is no free choice in it. Below 17 the tooth is undercut unless it is profile shifted; the profile shift page is where that is decided.
Leave this at zero to enter the tooth count directly. Put a number in it and the tooth count above locks and shows what you need: z = travel ÷ (π·m). Useful when the controller, not the gear, is fixed — a round 100 mm per turn needs z = 15.9 at module 2, so you take 16 and live with 100.53.
The rack flank is a straight line at exactly this angle to the normal — that is what a rack is. It sets the radial force that tries to lift the pinion off the rack, and it sets the backlash you get from a given centre-height error, through tan α.
For a stepper, the full steps times the microstepping: a 1.8° motor at 1/4 stepping is 800. For a servo, the encoder counts per revolution after any quadrature multiplication. This is the number that turns a gear ratio into a resolution.
A rack pinion is almost always on a planetary reducer, because the pinion wants to be small for thrust and the motor wants to spin fast for power. The ratio multiplies torque and divides resolution by the same factor, so it is the cheapest place to buy either.
Continuous torque at the motor shaft, before the gearbox. The page multiplies it by the ratio and by the efficiency and divides by the pinion PITCH radius — not the tip radius, and not the shaft radius.
The whole drive, not the mesh. RoyMech puts a spur mesh — which is what a rack and pinion is — at 98 to 99 per cent; Nidec quotes up to 97 per cent for a complete rack and pinion drive. The gap is the reducer, the bearings, the seals and any preloading. 90 to 95 is a realistic working figure.
The one adjustment a rack drive has. Nominal height puts the pinion pitch circle tangent to the rack reference line and gives zero backlash; lifting the pinion by this much opens the mesh. There is no centre distance here and no second gear — the mounting face height IS the setting.
Not a circuit: a scale drawing. The top half is a 12-tooth pinion sitting on its rack, with one full revolution of travel dimensioned underneath at the same scale as the gear — which is the quickest way to see that a rack drive moves π times the pitch diameter per turn, a little over three diameters, and why a rack pinion is always small. The numbers to its right are your own drive's. The lower left is the tooth comparison: one rack tooth beside one pinion tooth at the same module and on the same reference line. The rack tooth has straight flanks at the pressure angle, because a rack IS the basic rack profile — the involute's limiting case as the pitch radius goes to infinity — and the pinion tooth beside it is the real involute the rack generates. The root fillet is not drawn on either: it is a trochoid rather than an arc, and this is a drawing of the flank. The bar at the lower right is live: it is the backlash your centre-height offset produces, on a scale of nought to 0.3 modules, with the usual working figure of 0.06·m for comparison.
0.0157mmExample

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

Advertisement

Everything on this page comes out of π·m

Travel per turn = π·m·z  ·  steps/mm = N·i / (π·m·z)  ·  F = T·i·η / (m·z/2)  ·  j = 2·Δh·tan α
π·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

PinionTravel per pinion turn (mm)Travel per motor turn (mm)Steps per mmResolution (µm)Thrust (N)Rack pitch (mm)
m = 1.5, z = 2094.2489.424884.88311.787524.7124
m = 2, z = 20125.66412.566463.66215.715646.2832
m = 2.5, z = 20157.08015.708050.93019.634517.8540
m = 3, z = 20188.49618.849642.44123.563769.4248
m = 4, z = 20251.32725.132731.83131.4228212.5664
m = 5, z = 20314.15931.415925.46539.2722615.7080
m = 6, z = 20376.99137.699121.22147.1218818.8496
m = 8, z = 20502.65550.265515.91562.8314125.1327
One column decides the others. Doubling the module doubles the travel per turn, doubles the resolution number (coarser) and HALVES the thrust, because the thrust is the pinion torque divided by the pitch radius and the pitch radius grew. There is no module that is good at both, which is why a rack drive is specified by picking the module for the thrust and then buying resolution back from the reducer ratio and the microstepping — both of which are far cheaper than a bigger motor. The last column is the rack’s own tooth pitch, which is what you order the rack by and what decides whether two segments will butt up correctly. This is a first-pass calculation on an idealised part — uniform section, static load, no stress raisers beyond those stated, and room-temperature material properties. Real parts have fillets, keyways, surface finish and duty cycles that a closed-form answer cannot see.

Rack pitch error by manufacturing process, and what it becomes over a long axis

How the teeth were mademm per metreover 1 mover 4 mover 10 mover 20 mover 20 m if segments cancel
Hardened teeth, not ground0.2000.2000.8002.0004.0000.894
Milled teeth, soft or induction hardened0.1250.1250.5001.2502.5000.559
Hardened and ground teeth0.0500.0500.2000.5001.0000.224
Hardened and ground, best published (Nidec)0.0120.0120.0480.1200.2400.054
The first three rows are ATLANTA Drive Systems’ published bands; the last is Nidec’s figure for a precision hardened and ground rack. The middle columns assume the errors of successive segments ADD, which is the honest worst case when nobody has sorted them. The last column assumes they are independent and grow as the square root of length, which is what you get when they have been measured and ordered — and the gap between the two columns is the entire commercial argument for buying mapped rack. ATLANTA’s own worked example on a ten-metre axis of five two-metre racks moved the cumulative error from a +0.020/−0.004 mm spread to +0.003/−0.009 by changing nothing but the order the segments were bolted down in. None of this is backlash and none of it is repeatability: a pitch error is systematic, it is the same every pass, and it is the one error a closed loop on the MOTOR cannot see. These dimensions come from a published standard’s table, not from a formula. The standard itself is cited below and the printed values are attributed to the catalogue they were taken from; a different publisher may round differently in the last digit.

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.010.00520.00730.00931.3
0.020.01030.01460.01872.5
0.050.02590.03640.04666.3
0.100.05170.07280.093312.5
0.200.10340.14560.186525.0
0.500.25860.36400.466362.6
This relation is EXACT for a rack, which is unusual and worth knowing. For a pair of gears, opening the centre distance changes the operating pressure angle and j = 2·Δa·tan α is a linearisation that is seven per cent low by a millimetre of opening — the contact ratio and backlash page carries the exact involute form. For a rack there is no involute in it at all: the rack flank is a straight line at the pressure angle, so the rack tooth thickness at height h above the reference line is π·m/2 − 2h·tan α, and the backlash is the difference. Straight line, exact answer, at any offset. The practical consequence is that a rack drive’s backlash is set by ONE dimension on the drawing — the height of the pinion shaft centre above the rack mounting face — and that a tenth of a millimetre of error there is 0.073 mm of backlash at 20°, which on a 40 mm pitch circle is twelve and a half arc minutes. This is a first-pass calculation on an idealised part — uniform section, static load, no stress raisers beyond those stated, and room-temperature material properties. Real parts have fillets, keyways, surface finish and duty cycles that a closed-form answer cannot see.

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.

Advertisement

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.