3D Printer Steps per mm & Rotation Distance Calculator

Steps per mm = motor full steps × microsteps ÷ the distance one motor turn moves the axis. Pick the drive (belt, lead screw or geared extruder) to get the Marlin M92 value and the Klipper rotation_distance, or correct a value from a measured move. Published October 30, 2026.

Motor and driver

Belt and pulley

Count the teeth on the motor pulley (16, 20 and 36 are common). Idlers do not change the result.

Result

Firmware Settings

Marlin (console or start G-code)

-

Klipper (printer.cfg)

-

    How Steps per mm and Rotation Distance Work

    A stepper motor turns a fixed angle per step. Steps per mm tells the firmware how many (micro)steps move the axis or filament 1 mm. Marlin stores that number directly (M92). Klipper stores the other side of the same sum: rotation_distance, the distance moved by one full turn of the motor (or of the gearbox output when gear_ratio is set).

    The Formulas

    Motor
    full steps per rev = 360 ÷ step angle
    steps/mm = full steps × microsteps × gear ratio ÷ rotation_distance
    A 1.8° motor has 200 full steps per turn, a 0.9° motor 400. In Klipper the microsteps and step angle are separate settings (microsteps, full_steps_per_rotation), so rotation_distance stays the same when you change microsteps.
    Belt axis
    rotation_distance = belt pitch × pulley teeth
    One pulley turn pulls the number of teeth times the tooth spacing past the carriage. GT2 with a 20-tooth pulley is 2 × 20 = 40 mm per turn.
    Lead screw
    lead = pitch × starts;  rotation_distance = lead
    A "T8" screw is usually TR8x8: 2 mm pitch with 4 starts, so 8 mm per turn. A single-start TR8x2 moves 2 mm per turn. Threads per inch convert as pitch = 25.4 ÷ TPI.
    Geared extruder
    rotation_distance = π × drive gear Ø
    steps/mm = full steps × microsteps × ratio ÷ (π × Ø)
    Klipper takes the drive-gear value plus gear_ratio: 50:17. The same result without a gear_ratio line is rotation_distance ÷ ratio. Ratio is written driven teeth first (50:17 for a BMG).
    Calibration
    new steps/mm = old × requested ÷ actual
    new rotation_distance = old × actual ÷ requested
    If you asked for 100 mm and got 96 mm, steps/mm goes up by 100/96 and rotation_distance goes down by 96/100.
    Resolution and Z layer heights
    full-step distance = rotation_distance ÷ full steps
    microstep distance = 1 ÷ steps/mm
    Motors hold position most evenly on full steps. Layer heights that are whole multiples of the Z full-step distance keep every layer the same thickness (often called "magic numbers").

    Worked Example

    An Ender-3-class printer, 1.8° motors at 16 microsteps
    • X and Y: GT2 belt, 20-tooth pulleys. rotation_distance = 2 × 20 = 40 mm. Steps/mm = 200 × 16 ÷ 40 = 80.00. Each microstep is 0.0125 mm.
    • Z: T8 (TR8x8) screw, 8 mm lead. Steps/mm = 3200 ÷ 8 = 400.00. A full step is 8 ÷ 200 = 0.04 mm, so 0.12, 0.16, 0.20, 0.24 and 0.28 mm layers are whole full steps, while 0.10 and 0.15 mm are not.
    • Extruder upgraded to a BMG clone: ratio 50:17, effective drive Ø 7.219 mm, so rotation_distance = π × 7.219 = 22.679 mm. Steps/mm = 3200 × (50 ÷ 17) ÷ 22.679 = 415.0.
    • E-steps test on the stock extruder: current 93 steps/mm, mark at 120 mm, extrude 100 mm, 24 mm left, so 96 mm went in. New steps/mm = 93 × 100 ÷ 96 = 96.88 (M92 E96.88, M500). In Klipper: 34.406 × 96 ÷ 100 = 33.030.

    0.9° or 1.8° Motors, and Microstep Interpolation, in Plain Words

    • 0.9° motors have 400 steps per turn instead of 200. Steps/mm doubles, the full step is half as long, and positioning is a little more precise. They tend to lose torque sooner at high speed, so they suit X/Y on fast printers with good drivers and supply voltage. In Klipper add full_steps_per_rotation: 400; in Marlin just use the doubled steps/mm.
    • Microsteps split each full step into smaller current steps. They make motion smoother and quieter, but they do not make the printer more accurate in proportion: under load a motor lands only roughly on a microstep. The extra holding force for a single microstep is small (about holding torque × sin(90° ÷ microsteps), roughly 10% at 16 microsteps).
    • Interpolation (TMC drivers): the driver takes your 16 microsteps and fills in up to 256 internally for smoothness. It does not change steps/mm. Klipper's interpolate option is on by default; its docs note that turning it off gives slightly better positional accuracy at the cost of some noise.
    • Where microsteps live: in Klipper, microsteps: in each stepper section. In Marlin, in the firmware (X_MICROSTEPS etc. for TMC drivers) or by jumpers under the driver. Change microsteps and the Marlin steps/mm must change with them.

    Practical Tips

    • Calculate first, then calibrate only what is wrong. Belt and screw axes are almost always exact from the formula. If a printed cube is off, the cause is usually belt tension, over-extrusion or shrinkage, not steps/mm. The shrinkage scale tool and hole compensation tool deal with those.
    • Always run the e-steps test on extruders. Drive gear diameters vary by a few percent between batches and brands. Extrude slowly (100 mm/min) with the hotend hot so the nozzle does not cause slip.
    • Save it. Marlin forgets M92 at power-off unless you send M500 (EEPROM must be enabled). Klipper needs RESTART after editing printer.cfg.
    • Next steps after e-steps: tune retraction and linear / pressure advance, which both depend on the extruder moving the right amount.
    • Lead screw sizes follow the same thread rules as fasteners; see the thread size chart.

    More 3D Printing Tools

    Frequently Asked Questions

    80 steps per mm with a 1.8° motor at 16 microsteps: 200 × 16 ÷ (2 mm × 20 teeth) = 80. With a 0.9° motor it is 160, and with a 16-tooth pulley it is 100. The Klipper rotation_distance is 40 in each case with 20 teeth.

    rotation_distance = full steps per rotation × microsteps ÷ steps per mm. For example 200 × 16 ÷ 93 = 34.406 for a stock Ender 3 extruder. Use the microsteps your Marlin firmware actually ran with, and leave out gear_ratio when you convert this way.

    Heat the hotend, mark the filament 120 mm above the extruder, extrude 100 mm slowly (M83 then G1 E100 F100) and measure what is left to the mark. If 24 mm is left, 96 mm went in, so new steps/mm = old × 100 ÷ 96. Save with M500 in Marlin. In Klipper, new rotation_distance = old × 96 ÷ 100.

    With an 8 mm lead and a 1.8° motor a full step is 0.04 mm, so 0.04, 0.08, 0.12, 0.16, 0.20, 0.24 and 0.28 mm layers are whole full steps. With a 2 mm lead the full step is 0.01 mm, so almost any common layer height works.

    Not much. Microsteps make motion smoother and quieter, but a loaded motor only lands roughly on each microstep. Most printers use 16 microsteps, often interpolated to 256 by TMC drivers. Higher settings also raise the step rate the controller must produce at speed.

    The formulas are exact; the extruder presets are typical values from maker and community configs, and real drive gears vary. Check new values with a short measured move before printing, and keep a note of your old settings.