3D Printer Steps/mm & Rotation Distance Calculator
Enter the motor, microstep, gearing, and drive geometry to get theoretical steps/mm. Add a measured extrusion test to convert the current firmware value into corrected Marlin and Klipper settings.
Corrected steps per mm80
- Travel per output revolution
- 40
- Theoretical steps per mm
- 80
- Extrusion measurement error
- 0%
- Klipper rotation_distance
- 40
- Marlin M92 setting
- M92 E80.000; save with M500 where supported
- Klipper configuration
- microsteps: 16; full_steps_per_rotation: 200; rotation_distance: 40.00000
Firmware snippet
| Firmware | Line | Use |
|---|---|---|
| Marlin | M92 E80.000 | Send M500 afterward where supported. |
| Klipper | microsteps: 16 | Use the configured driver microstep value. |
| Klipper | full_steps_per_rotation: 200 | Use 200 for 1.8 degree motors or 400 for 0.9 degree motors. |
| Klipper | rotation_distance: 40.00000 | Use with the gear_ratio line when gearing is present. |
Use the firmware snippets as starting text and verify the actual axis letter before sending or saving a command.
The measurement correction is intended primarily for slow extruder calibration; derive X, Y, and Z from the physical belt, pulley, or screw geometry.
How to use this calculator
- Choose the drive mechanism that turns motor rotation into axis or filament movement.
- Enter the motor step angle, configured microsteps, and any tooth-count gearing.
- Fill in the belt, lead-screw, or drive-wheel dimensions for the selected mechanism.
- Enter the current steps/mm and the commanded and measured extrusion distances for the correction.
- Copy the Marlin or Klipper setting after checking the axis letter and gear ratio.
How the calculator works
The physical steps/mm value starts with the motor and ends with the distance moved by one output revolution. Let theta be the motor step angle in degrees, so full motor steps per revolution are N = 360 / theta. Let mu be the configured microsteps per full step, D the motor gear tooth count, and O the output gear tooth count. The gear reduction is G = O / D.
The travel per output revolution depends on the mechanism. For a belt axis it is R = belt pitch * pulley teeth. For a lead screw it is R = screw pitch * starts, which is the screw lead. For an extruder hob or drive wheel it is R = pi * effective diameter. The theoretical setting is then:
S = N * mu * G / R
That value is the geometry-based steps per millimeter. It is usually the right way to set X, Y, and Z axes because belt pitch, pulley teeth, screw pitch, and screw starts are fixed machine geometry. Printed cube dimensions should usually lead you to check shrinkage, belt tension, backlash, frame squareness, or slicer settings before changing axis steps/mm.
Extruder measurement correction
For an extruder, a slow measured feed test can correct the existing firmware value. If the current value is S0, the commanded length is Lc, and the measured filament movement is Lm, the corrected value is:
Sc = S0 * Lc / Lm
The error row shows 100 * (Lm - Lc) / Lc. A negative value means the extruder moved less filament than commanded. Heat the hotend, extrude slowly, and avoid grinding or slipping; otherwise the measurement describes a mechanical fault rather than a firmware scale factor.
Marlin and Klipper output
Marlin stores steps per unit with M92, commonly followed by M500 on printers that save settings to EEPROM. Klipper uses rotation_distance instead of steps/mm. This calculator converts the corrected value with rotation_distance = N * mu * G / Sc and includes a tooth-count gear_ratio line when gearing is present. Keep those two Klipper lines together; applying the same gear ratio both in the number and again elsewhere will make the extruder or axis move the wrong distance.
What this leaves out
The result does not compensate for loose pulleys, skipped steps, backlash, belt stretch, thermal material shrinkage, frame geometry, or a drive hob that slips on filament. It also cannot know the axis letter on your printer, so check whether the generated E should be changed to X, Y, or Z before sending firmware commands.
Worked example
A common GT2 belt axis with a 1.8 degree motor, 16 microsteps, no gearing, 2 mm belt pitch, and a 20 tooth pulley moves 40 mm per output revolution. The motor has 200 full steps per revolution, so the theoretical value is 200 * 16 / 40 = 80 steps/mm.
If the current firmware value is 80 steps/mm, a 100 mm extrusion command should move 100 mm of filament. If it only moves 95 mm, the corrected value is 80 * 100 / 95 = 84.211 steps/mm. The measurement error is -5%, the Marlin setting is M92 E84.211, and the Klipper rotation distance is 200 * 16 / 84.211 = 38 mm.
Common questions
How do I calculate steps per mm for a GT2 belt and 20 tooth pulley?
GT2 belt pitch is 2 mm, so a 20 tooth pulley moves 40 mm per pulley revolution. A 1.8 degree motor has 200 full steps per revolution, and at 16 microsteps the calculation is 200 * 16 / 40 = 80 steps/mm.
What is the difference between lead-screw pitch and lead?
Pitch is the distance between adjacent threads. Lead is the travel in one full screw revolution, so lead equals pitch multiplied by the number of starts. A common T8x8 screw has 2 mm pitch and four starts, giving an 8 mm lead.
How do I convert Marlin steps/mm to Klipper rotation_distance?
Use the motor full steps, configured microsteps, and gear reduction divided by the corrected steps/mm. For a direct 1.8 degree motor at 16 microsteps and 80 steps/mm, Klipper rotation_distance is 200 * 16 / 80 = 40 mm.
Should I calibrate X, Y, or Z steps with a printed cube?
Usually no. Klipper specifically recommends calculating X, Y, and Z rotation distance from the mechanical hardware. Printed parts are affected by extrusion width, material shrinkage, belt tension, backlash, and frame alignment, so changing axis steps can hide the real problem.
How do I enter a BMG extruder's 50:17 gear ratio?
Enter 17 for motor gear teeth and 50 for output gear teeth. The calculator uses the reduction 50 / 17 and includes the same exact tooth counts in the Klipper configuration.
Where do I save a new M92 value in Marlin?
Send the M92 command with the corrected axis value, then send M500 if the printer has EEPROM saving enabled. Some firmware builds disable EEPROM storage, so the value may need to be put in firmware configuration instead.