What steps per mm means
A stepper motor turns in small fixed steps, and the controller divides each one into microsteps. Steps per mm tells the firmware how many microsteps move the axis by 1 mm. It depends only on the motor step angle, the microstepping, the gearing and how far the mechanism moves per revolution: belt pitch × pulley teeth for a belt axis, or the lead for a leadscrew.
Klipper expresses the same thing as rotation_distance, the distance moved per full motor revolution. This page gives both, and shows how to correct either after measuring a real move.
steps per mm = (360 ÷ step angle) × microsteps × gear ratio ÷ mm per revolutionWorked examples
Worked example
The classic X/Y axis: GT2 belt, 20-tooth pulley, 1.8° motor, 16 microsteps
| Full steps per revolution | 360 ÷ 1.8 = 200 |
| Microsteps per revolution | 200 × 16 = 3,200 |
| Belt travel per revolution | 2 mm pitch × 20 teeth = 40 mm |
| Steps per mm | 3,200 ÷ 40 = 80 |
| Klipper rotation_distance | 40 mm (same 40 mm, no gearing) |
This is the familiar value of 80 steps/mm. Change to 32 microsteps and it becomes 160; change to a 16-tooth pulley and it becomes 100.
Worked example
A T8 leadscrew Z axis: 8 mm lead, 1.8° motor, 16 microsteps
| Microsteps per revolution | 200 × 16 = 3,200 |
| Travel per revolution | 8 mm (lead = thread pitch 2 mm × 4 starts) |
| Steps per mm | 3,200 ÷ 8 = 400 |
A 0.9° motor has twice the full steps per revolution, so the same screw gives 800 steps/mm at 16 microsteps.
Worked example
Calibrating after measuring: asked for 100 mm, got 97 mm
| Current steps/mm (Marlin) | 80 |
| Corrected steps/mm | 80 × 100 ÷ 97 = 82.474 |
| Current rotation_distance (Klipper) | 40 mm |
| Corrected rotation_distance | 40 × 97 ÷ 100 = 38.8 mm |
More steps per mm means less movement per step, so a short move needs a bigger steps value but a smaller rotation_distance. The two corrections always move in opposite directions.
Worked example
A geared extruder (hypothetical numbers)
| Extruder gear travel per gear revolution | 24 mm (example figure, not a specific product) |
| Gear ratio | 3:1 reduction |
| Microsteps per motor revolution | 3,200 |
| Steps per mm | 3,200 × 3 ÷ 24 = 400 |
| Klipper rotation_distance | 24 ÷ 3 = 8 mm |
Always use your extruder's documented values or measure them. The example only shows how the ratio enters the formula.
Marlin steps per mm vs Klipper rotation_distance
They describe the same thing from opposite sides. Marlin stores how many microsteps make 1 mm. Klipper stores how many mm one full motor revolution moves, and takes the step angle and microsteps from separate settings, so changing microsteps in Klipper does not change the physical distance. That is also why the Klipper value is the more portable of the two.
steps per mm = (360 ÷ step angle) × microsteps × gear ratio ÷ mm per revolution
rotation_distance = mm per revolution ÷ gear ratio
| Axis type | mm per motor revolution | Comment |
|---|---|---|
| Belt axis | belt pitch × pulley teeth | GT2 belts have a 2 mm pitch. A 20T pulley is 40 mm, a 16T pulley is 32 mm. |
| Leadscrew | lead (pitch × thread starts) | A T8 screw with 4 starts and 2 mm pitch has an 8 mm lead. Read the lead, not just the pitch. |
| Geared extruder | gear travel ÷ gear ratio | Enter the ratio in the gear ratio box. |
How to calibrate any axis
- Mark the axis or filament, move a commanded distance (for example 100 mm on a belt axis, or extrude 100 mm of filament with the hotend hot), and measure the real distance.
- Enter the commanded distance and what you measured in the calibration boxes above.
- For Marlin, send the new steps value with
M92(for exampleM92 X82.474) and save it withM500. For Klipper, editrotation_distancein printer.cfg and restart. - Repeat the move. It should now match within measurement error. If it keeps drifting, the problem is mechanical (slipping pulley, loose belt), not a number.
- For the extruder, finish with a flow-rate check, see how to calibrate e-steps and the e-steps calculator.
Common mistakes
- Changing microsteps without changing steps/mm. In Marlin, the steps value assumes a specific microstepping. If you swap a driver or change its jumpers, recompute it.
- Using the screw pitch instead of the lead. A multi-start leadscrew moves several pitches per turn. Using the pitch gives Z moves that are far too short.
- Forgetting the gear ratio on extruders. A 3:1 gear train needs three times the motor steps per mm of gear travel.
- Calibrating a loose belt. Slack or a slipping pulley gives a different measurement every time. Fix tension first, then calibrate.
- Adjusting in the wrong direction. Marlin: new = old × requested ÷ measured. Klipper rotation_distance: new = old × measured ÷ requested.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Axis moves a fixed percent too far or short | Wrong pulley teeth, lead or microsteps in the firmware | Recompute above and compare with the config |
| Error grows with distance | Real scale error, not backlash | Use the calibration boxes with a long move (100 mm or more) |
| Error is random | Loose pulley or belt, skipped steps | Tighten grub screws and check belt tension, see how to fix layer shifting |
| Prints are the wrong size but moves measure fine | Shrinkage or slicer scale, not steps | Use the shrinkage compensation calculator |
FAQ
How do I calculate steps per mm for a belt axis?
Multiply the full steps per revolution (360 ÷ step angle, 200 for a 1.8° motor) by the microsteps, and divide by the belt pitch times the pulley teeth. A 1.8° motor at 16 microsteps on a 2 mm GT2 belt with a 20-tooth pulley gives 3,200 ÷ 40 = 80 steps/mm.
What is rotation_distance in Klipper?
It is the distance the axis moves in one full motor revolution, in mm. For a belt axis it is belt pitch × pulley teeth (40 mm for GT2 with 20 teeth). For a geared extruder it is the gear travel per revolution divided by the gear ratio.
How do I convert steps per mm to rotation_distance?
rotation_distance = full steps per revolution × microsteps ÷ steps per mm. For 80 steps/mm at 200 full steps and 16 microsteps that is 3,200 ÷ 80 = 40 mm.
Which direction does rotation_distance go when the axis moves too far?
If the axis moves too far, increase rotation_distance. The corrected value is old × measured ÷ requested, so measuring 97 mm for a 100 mm move changes 40 to 38.8 (a smaller value, because the axis moved too little).
What is the difference between pitch and lead on a leadscrew?
Pitch is the distance between neighbouring thread crests. Lead is how far the nut travels per turn: pitch times the number of starts. Use the lead. A T8 screw with 4 starts and 2 mm pitch has an 8 mm lead.
Do I need to recalibrate if I change microsteps?
In Marlin, yes: the steps/mm value scales with microsteps (80 at 16 becomes 160 at 32). In Klipper, no: rotation_distance does not change because microsteps are a separate setting.
Related tools
E-steps & flow calibration calculator
Calibrate extruder e-steps and flow rate, with the exact M92 G-code to send.
3D print tolerance & hole size calculator
Hole and peg sizes for press, snug, sliding and loose fits, M2–M10 bolts.
Volumetric flow & max speed calculator
Turn layer height, line width and speed into mm³/s, or find the max speed your hotend can handle.
Shrinkage compensation calculator
Measure a test print and get the exact scale % plus the value to type into Orca, Bambu, PrusaSlicer or Cura.
Retraction distance & speed calculator
Starting retraction distance, speed and Z-hop for direct drive or Bowden, by material and nozzle.
Pressure advance calculator
Turn the best corner height on a tuning tower into your pressure advance (K) value for Klipper or any firmware.