Rack and Pinion Mechanism: How It Works, Diagram, Formula, Calculator and Real-World Uses

← Back to Engineering Library

A rack and pinion converts rotation into straight-line motion, or the reverse. The circular pinion meshes with teeth along the rack, so turning the pinion moves the rack by its pitch circumference per revolution. Steering mechanisms and machine axes use this relationship to connect rotary input with linear travel.

Rack and Pinion Interactive Calculator

Vary pinion pitch diameter and revolutions to see pitch radius, travel per turn, total rack travel, and pinion angle update.

Pinion · rotary gearRack · straight gearPitch geometry
Pitch diameter20 mmTurns shown1.00 / 1.00 turnsRack travel shown62.83 mm

Selected position. Animation automatically moves back and forth through the revolutions selected below. Pause or scrub to inspect a position. The result tiles show your full selected move; the readouts above show the current illustrated position. Playback is slowed for viewing, not a motor-speed simulation. The rack continues beyond the viewing window.

Pitch Radius
--
Travel / Rev
--
Total Travel
--
Pinion Angle
--

Equation Used

L = pi * d_p * n; L_rev = pi * d_p; r_p = d_p / 2

The rack advances by the distance rolled out by the pinion pitch circle. For one full turn, travel equals the pitch circumference, pi times pitch diameter; for multiple turns, multiply by the number of revolutions.

  • Pitch circle rolls on the rack pitch line with no slip.
  • Rack and pinion tooth geometry is correctly matched.
  • Backlash, tooth deflection, and bearing losses are ignored.
Watch the Rack and Pinion in motion
Video: Rack pinion mechanism 5 by Nguyen Duc Thang (thang010146) on YouTube. Used here to complement the diagram below.
Pinion · rotary gearRack · straight gearPitch geometry
The same mechanism and position as the calculator above. Matched 20-tooth involute pinion and 20° straight rack profiles are used for illustration; tooth-root transitions, shaft and supports are simplified. The view fits the gear automatically. This is a motion illustration, not a manufacturing drawing. Rack/pinion geometry reference: KHK.

How the pinion moves the rack

Imagine the pinion’s pitch circle rolling along the rack’s pitch line. One revolution advances the rack by that circle’s circumference. A 20 mm pitch diameter therefore gives 62.83 mm of ideal travel per turn. The pitch circle is a reference for motion; it is not the outside diameter across the tooth tips.

The teeth transmit force while the rack guides and pinion bearings constrain the motion. The pinion shaft stays fixed in this animation, and the rack slides through its supports. Real travel also depends on backlash, tooth and shaft deflection, and the alignment of the guides.

Components and mounting

  • Pinion: the rotary gear. Pitch diameter determines distance per turn.
  • Rack: the straight gear. Its tooth system must be compatible with the pinion.
  • Guides: carry the moving assembly and keep the rack aligned with the gear.
  • Shaft and bearings: support the pinion and react the gear-contact forces.
  • Frame and joints: establish the mounting distance and alignment. Segmented racks also require correctly aligned tooth spacing across their joints.

Use the specified mounting dimensions and backlash for the selected gear pair. KHK’s rack technical information relates mounting distance to rack pitch-line height and pinion pitch radius. A universal clearance or bore tolerance cannot be chosen from pitch diameter alone.

Applications of rack and pinion motion

In rack-and-pinion steering, a rotating input moves a rack connected to steering linkages. In a machine axis, a motor and often a gearbox turn a pinion to move either the rack or the pinion carriage along a guide. The same rotary-to-linear principle can serve a positioning stage or demonstration model.

Long travel can be assembled from rack segments, but the frame, guide system, joint accuracy and drive must still suit the full axis. A vertical load needs an appropriate holding and protection system: ordinary rack-and-pinion meshing does not provide self-locking.

The calculator explores travel geometry. It does not select a steering system, lift, cutting feed, motor or brake.

Travel from pitch diameter and turns

For pitch diameter d and n pinion revolutions, total rack travel is L = πdn. Travel per revolution is πd, pitch radius is d/2 and pinion rotation is 360n degrees. Keep diameter and travel in the same length units.

If the pinion rotates at N revolutions per minute, ideal rack speed is v = πdN. With d in millimetres, this result is in millimetres per minute; divide by 1000 for metres per minute. Speed is an additional calculation from the same geometry, not an input to this animation.

These relationships assume compatible teeth and ideal motion at the pitch line. They do not calculate tooth strength, bearing loads, acceleration, friction, maximum speed or positioning accuracy.

Worked example: travel on a machine axis

Choose a 40 mm pitch-diameter pinion and three revolutions. This is an illustrative geometry example, not a specification for a particular machine or gear product.

  1. Pitch radius = 40/2 = 20 mm.
  2. Travel per turn = π × 40 = 125.66 mm.
  3. Total travel for three turns = π × 40 × 3 = 376.99 mm.
  4. Pinion rotation = 360 × 3 = 1080 degrees.

For an additional speed comparison, 150 pinion rpm would give π × 40 × 150 = 18,849.56 mm/min, or 18.85 m/min. At 50 rpm it would give 6.28 m/min; at 450 rpm, 56.55 m/min. These values follow from circumference and speed alone and do not establish suitable cutting feeds, lubrication limits or allowable gear speeds.

Rack and pinion, screw and belt drives

Feature Rack and pinion Ball screw Timing belt
Travel relationship Pinion pitch circumference per turn Screw lead per turn Pulley pitch circumference per turn
Transmission Meshing rack and pinion teeth Rolling contact between screw, balls and nut Flexible toothed belt around pulleys
Long-axis considerations Rack segments, joints and guide alignment Screw support, rotation and critical-speed limits Belt span, tension and stiffness
Positioning considerations Backlash, tooth quality and structural deflection Lead accuracy, preload and thermal effects Belt stretch, tooth engagement and tension

Compare specific products at the required load, travel and duty. Maximum speed, maintenance interval, accuracy and cost cannot be assigned to an entire drive type with one number.

Rack and pinion questions

Which diameter belongs in the calculator?

Enter pinion pitch diameter, not outside diameter. The pitch circle defines the ideal travel relationship with the rack’s pitch line.

Does the calculator include backlash?

No. Its travel is the ideal pitch-line displacement. A real axis can have lost motion on reversal, elastic deflection and positioning errors that are not represented here.

Can I use the same formula for a helical rack?

Travel still follows pitch circumference and turns when the operating pitch diameter is known. Selecting compatible helical teeth and their mounting arrangement requires the gear manufacturer’s dimensions and specifications.

Is steering the same basic mechanism?

Yes: pinion rotation translates a rack. A complete steering system also includes its linkages, bearings, housing and any assist mechanism, so steering ratio and behaviour are not determined by pinion tooth count alone.

Does a repeating position error identify a faulty pinion?

Not by itself. Tooth-spacing error, pinion runout, rack joints, drive transmission and measurement effects can produce different repeating patterns. Compare the measured period with tooth pitch, pinion travel per turn and joint spacing before investigating the assembly.

Can the rack hold a vertical load with power off?

Do not rely on ordinary rack-and-pinion meshing to hold a vertical load. It can be backdriven. The complete machine needs an appropriate load-holding and protection arrangement for its application; this travel calculator does not design one.

References & Further Reading

  • Wikipedia contributors. Rack and pinion. Wikipedia

Building or designing a mechanism like this?

Explore the precision-engineered motion control hardware used by mechanical engineers, makers, and product designers.

← Back to Mechanisms Index
Share This Article
Tags: