LEARN · 2026-10-07

How to calculate stepper motor steps/mm: belts, leadscrews, microstepping and Marlin / Klipper setup

The steps/mm formula with worked values — GT2 20-tooth pulley = 40 mm/rev = 80 steps/mm, T8 leadscrew = 400 steps/mm — plus lead versus pitch, the torque cost of microstepping, resolution versus accuracy, Marlin M92, Klipper rotation_distance and GRBL $100 settings, and extruder E-steps calibration.

The steps/mm formula

steps/mm is the number of pulses sent to the driver to move an axis 1 mm — the firmware's conversion between coordinates and motor steps. Three numbers define it: full steps per motor revolution, the driver's microstepping, and how far the axis moves per motor revolution.

steps/mm = (360° / step angle) × microsteps / travel per revolution L (mm)

A 1.8° motor has 200 full steps per revolution, a 0.9° motor 400; at 16 microsteps that is 3200 or 6400 pulses per revolution. L is pulley teeth × belt pitch for belts, and the lead for screws.

Belt drives: GT2 20 teeth = 40 mm per revolution

L = pulley teeth × belt pitch  GT2 20T: L = 20 × 2 = 40 mm → 200 × 16 / 40 = 80 steps/mm

One pulley revolution moves the belt by teeth × pitch, independent of the pulley's outside diameter: GT2 (2 mm pitch) 20 teeth = 40 mm/rev, 16 teeth = 32 mm/rev. Most 3D-printer XY axes use GT2 20T at 80 steps/mm (16 microsteps); Prusa printers use 16T at 100 steps/mm.

With a reduction: steps/mm = (full steps × microsteps × ratio) / L

TIPIf the motor first drives a 20T → 60T belt reduction (i = 3) and then a GT2 20T drive pulley, steps/mm becomes 80 × 3 = 240. The GT2 centre distance calculator sizes the closed belt and shaft spacing.

Leadscrews and ball screws: use the lead, not the pitch

Lead = pitch × starts  T8 (Tr8 × 8, 2 mm pitch, 4 starts): 200 × 16 / 8 = 400 steps/mm

One screw revolution advances the nut by the lead, not the pitch. The common T8 screw has a 2 mm pitch and four starts, so an 8 mm lead; the near-identical Tr8 × 2 is single-start with a 2 mm lead — a factor of 4 in steps/mm. Values for 1.8° and 0.9° motors at 16 microsteps:

DriveTravel / rev L (mm)1.8° × 160.9° × 16µm per microstep (1.8°)
GT2 16T3210020010
GT2 20T408016012.5
GT2 36T7244.4488.8922.5
T8, 8 mm lead (Tr8 × 8)84008002.5
Tr8 × 4480016001.25
Tr8 × 22160032000.63
SFU1204 ball screw480016001.25
SFU1605 ball screw564012801.56
  • A long lead (T8 × 8) is fast, but the Z axis may drop under gravity when the motors are off; a short lead (Tr8 × 2) self-locks and resolves finer, but is slow.
  • Z "magic layer heights": with an 8 mm lead one full step is 8 / 200 = 0.04 mm, so layer heights that are multiples of 0.04 (0.12, 0.16, 0.2, 0.28 mm) avoid banding from microstep position error.
  • Ball screws have low backlash and high efficiency for CNC: SFU1204 has a 4 mm lead, SFU1605 a 5 mm lead.

Microstepping: resolution is not accuracy

Resolution is the smallest commanded move (1 / steps/mm); accuracy is how close the axis really gets. They differ. GT2 20T at 16 microsteps resolves 12.5 µm, but each full step (200 µm) has about ±5% angular error, i.e. ±10 µm, before belt stretch, pulley run-out and frame flex — real accuracy is usually tens of µm.

Incremental torque per microstep ≈ holding torque × sin(90° / microsteps)

MicrostepsIncremental torque per microstep (of holding torque)
1100%
270.7%
438.3%
819.5%
169.8%
324.9%
2560.6%

At 16 microsteps only about 10% of holding torque pushes each microstep; if friction or load exceeds it, the motor waits several microsteps and then jumps. Higher microstepping mainly buys smoothness and silence — beyond 1/16–1/32 real positioning accuracy barely improves, while the controller's step rate climbs.

TIPTMC2208 / TMC2209 drivers accept 16 microsteps and interpolate to 256 internally — quiet motion without overloading the controller, the usual 3D-printer setup.

Marlin, Klipper and GRBL examples

Marlin

Configuration.h: #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 93 }

G-code: M92 X80 Y80 Z400 E93 → M500 (save to EEPROM) M503 (report)

These are the stock Creality Ender-3 values: GT2 20T on XY, an 8 mm-lead T8 on Z and an MK8 extruder.

Klipper

[stepper_x] microsteps: 16 rotation_distance: 40 full_steps_per_rotation: 200

rotation_distance = full_steps_per_rotation × microsteps / steps_per_mm (extruder at 93 steps/mm → 200 × 16 / 93 ≈ 34.41)

Klipper doesn't take steps/mm but rotation_distance, the travel per motor revolution: 40 for GT2 20T, 8 for an 8 mm-lead T8. For a 0.9° motor set full_steps_per_rotation: 400. With a gear or belt reduction use gear_ratio (e.g. gear_ratio: 3:1) and give rotation_distance for one turn of the final stage.

GRBL

$100=80 $101=80 $102=400 (X, Y, Z steps/mm)

Calibrating extruder E-steps

  1. Heat the nozzle to printing temperature and mark the filament 120 mm above the extruder inlet.
  2. Send M83 (relative extrusion) and G1 E100 F100 to extrude 100 mm slowly.
  3. Measure what remains from the mark to the inlet; actual extrusion = 120 − remaining.
  4. New E-steps = old E-steps × 100 / actual; set it with M92 E… and save with M500.

e.g. 93 × 100 / 97 ≈ 95.9 steps/mm  Klipper: new rotation_distance = old × actual / 100

Belt-driven XY axes are almost always at their theoretical value — don't "calibrate" them with a ruler; size errors usually come from belt tension, backlash or slicer width compensation. Extruders must be measured, because the effective diameter where the gear bites into the filament varies.

FAQ

What are the steps/mm for a GT2 20-tooth pulley?

200 × 16 / 40 = 80 steps/mm with a 1.8° motor at 16 microsteps; 160 steps/mm with a 0.9° motor.

What are the steps/mm for a T8 leadscrew?

The common T8 with an 8 mm lead gives 400 steps/mm (1.8°, 16 microsteps). A single-start Tr8 × 2 (2 mm lead) gives 1600 steps/mm.

Is more microstepping more accurate?

Not proportionally. Microstepping mainly smooths motion and reduces noise; at 16 microsteps each microstep has only about 10% of holding torque, and friction swallows the extra resolution.

How do I calculate Klipper's rotation_distance?

It is the travel per motor revolution — 40 mm for GT2 20T, 8 mm for T8. From old steps/mm: rotation_distance = 200 × microsteps / steps/mm.

What changes with a 0.9° motor?

Full steps per revolution go from 200 to 400, so Marlin steps/mm doubles (80 → 160). In Klipper just set full_steps_per_rotation: 400; rotation_distance stays the same.