Aziz Bench

Steps per mm calculator

Steps per mm and Klipper’s rotation_distance for belts, leadscrews and ball screws, the extruder’s e-steps calibration, and the step rate your board has to produce. With the lines ready for Marlin and Klipper.

Steps per mm
80steps/mm
2 mm × 20 teeth = 40 mm per turn · 200 full steps × 1/16
rotation_distance
40 mm
One microstep
12.5 µm
Step rate at 200 mm/s
16 kHz
One turn of the motor
40 mm per turn20 teeth80 steps/mm
What you are setting up
Motor and driver

200 for a 1.8° motor, 400 for a 0.9° motor: the angle is on the label or in the datasheet.

As set on the driver, with jumpers or in the firmware. Most boards run at 1/16.

Leave 1 and 1 when the pulley or the screw sits on the motor shaft. A 16-tooth pulley on the motor driving an 80-tooth one is 80 and 16.

Belt and pulley
mm

The pulley on the motor, or on the last gear. The number is often printed on its side.

Axis and speed
Axis
mm/s

The fastest move you plan on this axis. It sets the step rate the board must produce.

The step rate Marlin assumes for each driver when MAXIMUM_STEPPER_RATE isn’t set.

Results

Travel per turn40 mm: 2 mm pitch × 20 teeth
Microsteps per turn3,200 = 200 full steps × 16
Steps per mm80 = 3,200 ÷ 40 mm
Resolution12.5 µm per microstep, 200 µm per full step
Step rate16,000 steps/s (16 kHz) at 200 mm/s
Driver limit5 MHz for the TMC2xxx drivers: 0.32 % used, top speed 62,500 mm/s as far as the driver goes

Firmware settings

Marlin
M92 X80
M500

M500 saves the value in EEPROM. In Configuration.h it goes in DEFAULT_AXIS_STEPS_PER_UNIT.

Klipper · printer.cfg
[stepper_x]
microsteps: 16
rotation_distance: 40

Edit the section in printer.cfg, then send RESTART.

Good to know

Microsteps add resolution, not accuracy. Each one holds only sin(90° ÷ microsteps) of the full-step torque (9.8 % at 1/16), and motors are typically specified to ±5 % of a full step, 10 µm here.

Don’t trim X, Y or Z by measuring printed parts: the Klipper docs advise against it. With belts and screws the calculated value is exact, so a part of the wrong size has another cause.

The processor can run out before the driver does. Marlin sends steps in bursts at high rates for this reason, and Klipper publishes step-rate benchmarks for each processor.

Plain text, for your notes or a forum post.

How the steps per mm are worked out

A stepper motor turns a fixed angle per step: 1.8° on most motors, so 200 full steps per turn, or 0.9° and 400 steps. The driver splits each full step into microsteps, usually 16. Steps per mm are the microsteps in one turn divided by how far one turn moves the axis.

steps/mm = full steps per turn × microsteps × gear ratio ÷ travel per turn
belt:      travel per turn = belt pitch × pulley teeth
leadscrew: travel per turn = thread pitch × starts (the lead)

Example: a GT2 belt (2 mm pitch) on a 20-tooth pulley moves 40 mm per turn. With a 1.8° motor at 1/16 that is 200 × 16 ÷ 40 = 80 steps/mm, and each microstep moves the axis 12.5 µm.

Common setups

DriveTravel per turn1.8° · 1/160.9° · 1/16Full step (1.8°)
GT2 belt, 16 teeth32 mm1002000.16 mm
GT2 belt, 20 teeth40 mm801600.2 mm
GT2 belt, 36 teeth72 mm44.44488.8890.36 mm
T8 (Tr8x8)8 mm4008000.04 mm
Tr8x22 mm1,6003,2000.01 mm
M8 threaded rod1.25 mm2,5605,1200.0063 mm
SFU1605 ball screw5 mm6401,2800.025 mm
SFU1610 ball screw10 mm3206400.05 mm

At 1/16 microstepping, without gearing. At 1/32 the steps per mm double, at 1/8 they halve.

Pitch, lead and starts on a leadscrew

The pitch is the distance between two threads; the lead is how far the nut moves in one turn. On a single-start screw, such as a threaded rod or a Tr8x2, they are the same. A T8 leadscrew (Tr8x8) has a 2 mm pitch and four starts, so its lead is 8 mm: look at its end and you will see four separate threads. Ball screws are named by diameter and lead: an SFU1605 is 16 mm across with a 5 mm lead.

Klipper’s rotation_distance

Klipper doesn’t use steps per mm. It asks for rotation_distance, the distance the axis moves in one full turn of the motor (or of the last gear, when gear_ratio is set), together with microsteps and full_steps_per_rotation. For a belt it is pitch × teeth, for a screw its lead. To convert an old value: rotation_distance = full steps × microsteps ÷ steps/mm.

The Klipper docs note that almost all printers have a whole-number rotation_distance on X, Y and Z, such as 32, 40 or 8. A value with decimals there usually points to a wrong pitch or tooth count, unless the parts are MXL or imperial.

Calibrating the extruder

  1. Heat the hot end to printing temperature, so the filament melts freely.
  2. Mark the filament 120 mm above the point where it enters the extruder.
  3. Extrude slowly. Marlin: M83, then G1 E100 F100. Klipper: G91, then G1 E50 F60, and enter 50 mm as the requested length.
  4. Measure from the entry to the mark again: 120 minus that distance is the length actually extruded.
  5. Enter the values above and save the new figure: M92 E… and M500 on Marlin, rotation_distance on Klipper.
  6. Repeat the test if the result was more than about 2 mm off.

Microsteps: resolution is not accuracy

More microsteps make the movement smoother and quieter, not more precise. Each microstep holds only a fraction of the torque, sin(90° ÷ microsteps): about 20 % at 1/8 and 5 % at 1/32, as Monolithic Power Systems explains, so a little friction is enough to stop the shaft between two microsteps. Typical NEMA 17 motors are specified to ±5 % of a full step. Drivers such as the TMC2209 interpolate to 256 microsteps internally, so 1/16 at the step input is enough for smooth motion.

Layer heights on the Z axis

With a T8 leadscrew and a 1.8° motor, a full step moves Z by 0.04 mm. Layer heights that are a whole number of full steps (0.12, 0.16, 0.2, 0.24 mm…) put the nozzle where the motor holds best. Prusa’s calculator explains that if the motors are switched off on a microstep, the axis can snap to the nearest full step.

Step rate and top speed

Every millimetre per second costs steps per second: 200 mm/s at 80 steps/mm is 16,000 steps per second. When nothing else is set, Marlin assumes 5 MHz for TMC2xxx drivers, 500 kHz for the A4988, 250 kHz for the DRV8825, 150 kHz for the TB6600 and 15 kHz for the TB6560. The processor and the firmware are often a tighter limit than the driver: Marlin sends steps in bursts at high rates, and Klipper publishes step-rate benchmarks for each processor. Lower microstepping is the simplest way to cut the step rate.

Stepper driver Vref calculator →

Sources: Klipper documentation (Rotation distance), Marlin documentation (M92, motion settings) and planner source code, Prusa’s RepRap calculator, Monolithic Power Systems on microstepping, the TMC2209 product page, the Bondtech BMG page, the Sorotec ball screw datasheet and a 17HS4401 motor datasheet.

Frequently asked questions

What are the steps per mm for a GT2 belt with a 20-tooth pulley?

80 with a 1.8° motor at 1/16 microstepping, 160 with a 0.9° motor. In Klipper that is rotation_distance: 40 with microsteps: 16. A 16-tooth pulley gives 100 steps/mm, rotation_distance 32.

What are the steps per mm for a T8 leadscrew?

A T8 (Tr8x8) has an 8 mm lead, so a 1.8° motor at 1/16 gives 400 steps/mm and rotation_distance is 8. A single-start Tr8x2 gives 1600 steps/mm, rotation_distance 2.

How do I calibrate the e-steps?

Mark the filament 120 mm above the extruder, extrude 100 mm slowly with the hot end at temperature and measure what is left to the mark. New value = current × 100 ÷ millimetres actually extruded: for example 93 × 100 ÷ 95 = 97.89. Save it with M92 E97.89 and M500.

Should I adjust the X and Y steps per mm after measuring a printed cube?

No. On belts and screws the calculated value is exact, and the Klipper docs advise against trimming X, Y or Z by measuring prints. If a part comes out the wrong size, look at extrusion, belt tension and slicer settings instead.

Does more microstepping make my printer more accurate?

It makes the movement smoother, not more precise. A microstep holds only sin(90° ÷ microsteps) of the full-step torque, about 5 % at 1/32, and motors are typically specified to ±5 % of a full step. It also multiplies the step rate the board has to produce.

How do I convert steps/mm into Klipper’s rotation_distance?

rotation_distance = full steps per turn × microsteps ÷ steps/mm. With a 1.8° motor (200 steps) at 1/16: 3200 ÷ 80 = 40. For an extruder at 415 steps/mm without gear_ratio: 3200 ÷ 415 = 7.711. If you set gear_ratio, the value changes: for a Bondtech BMG with gear_ratio: 50:17 it is 22.679, as in the Klipper docs.

Which layer heights suit a T8 leadscrew?

With a 1.8° motor a full step moves Z by 0.04 mm, so 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28 and 0.32 mm are whole numbers of full steps. With a 0.9° motor the full step is 0.02 mm.