E-steps and rotation_distance: a measure-and-trim extruder check for Marlin and Klipper

Published October 15, 202611 sources

Short answer

Mark the filament, extrude a known length slowly, measure how far it actually moved, and scale the setting [1]. In Klipper, new rotation_distance = old × actual ÷ requested [1]. Marlin's E steps per mm are the inverse quantity, so the same measurement gives new steps = old × requested ÷ actual; set it with M92 E and save it with M500 [4, 6]. Klipper converts between the two with rotation_distance = full steps × microsteps ÷ steps per mm [1].

Two names for one relationship

Both firmwares need to know how far the filament moves when the extruder motor turns. Marlin stores it as steps per unit: DEFAULT_AXIS_STEPS_PER_UNIT in Configuration.h, overridden at run time with M92 [7]. The value depends on gearing and extruder design, among other things. Marlin’s own M92 example sets steps for a new extruder: M92 E688.4 [4].

Klipper uses rotation_distance, the length of filament moved by one full revolution of the stepper. The two are inversely related, and Klipper gives the conversion [1]:

rotation_distance = full_steps_per_rotation × microsteps ÷ steps_per_mm

Most steppers are 1.8° types with 200 full steps per rotation, and most drivers use 16 microsteps. A Marlin value of 93 steps/mm therefore converts to 200 × 16 ÷ 93 = 34.409 mm. For a new extruder without a known value, Klipper suggests a starting guess of hobbed-gear diameter × 3.14, and a gear_ratio entry for geared extruders. Its example: BMG gearing is sold as 3:1 but is actually 50:17 [1]. The rotation distance calculator converts in both directions.

Motion axes are different. Klipper derives their values from the parts rather than from a measurement: belt pitch × pulley teeth for belt axes, so a 2 mm belt on a 20-tooth pulley gives 40, and pitch × number of thread starts for lead screws, so a common T8 screw gives 8. It adds that X, Y and Z values should come out as whole numbers, and a result within 0.01 of one should be rounded [1]. Only the extruder is trimmed by measurement.

Because the quantities are inverse, an extruder that moves too little filament needs a smaller rotation_distance in Klipper but a larger steps-per-mm value in Marlin. The formulas below handle the direction automatically.

Klipper: measure and trim

Klipper’s documented procedure [1]:

  1. Load filament and heat the hotend to a normal printing temperature.
  2. Mark the filament about 70 mm from the extruder inlet and measure the exact distance with calipers. This is the initial mark distance.
  3. Send G91 and then G1 E50 F60. Wait for the move to finish, about 50 seconds.
  4. Measure from the extruder body to the mark again. Actual extrusion = initial distance − new distance.
  5. Compute new rotation_distance = previous × actual ÷ 50, rounded to three decimals.
  6. If actual and requested differ by more than about 2 mm, run the test again with the new value.

Worked example: with a previous value of 33.500, an initial mark at 70.00 mm and a final reading of 21.20 mm, the extruder moved 48.80 mm, so the new value is 33.500 × 48.80 ÷ 50 = 32.696.

Put the result in the [extruder] section. SET_EXTRUDER_ROTATION_DISTANCE EXTRUDER=extruder DISTANCE=<value> changes it at run time for testing [2]. Klipper notes that the grip of the drive gear varies between printers and can even vary between spools, which is why a value copied from another machine is only a starting point [1].

Marlin: M503, M92 and M500

  1. Read the current value with M503, or M92 with no parameters [4]. M503 reports the settings active in memory, which may differ from what is stored in EEPROM [5].
  2. Heat the hotend, mark the filament and extrude 50 mm slowly in relative mode, as in the Klipper procedure above. Marlin’s Linear Advance documentation likewise asks for steps/mm calibrated precisely and at low speed [8].
  3. Compute new steps = old × requested ÷ actual. With 93.0 steps/mm and 48.80 mm measured for a 50 mm request: 93.0 × 50 ÷ 48.80 = 95.29.
  4. Apply it with M92 E95.29.
  5. Save with M500. This needs EEPROM_SETTINGS in the firmware; without it, M92 changes are lost at power-off [7]. M500 saves every configurable setting at once, and M502 resets steps per unit to the firmware defaults [6, 4].

The step-3 formula follows from the conversion above: since steps per mm is proportional to 1 ÷ rotation_distance, the Klipper correction becomes an inverse correction in Marlin [1]. On firmware that supports separate values per extruder, M92 takes a T index [4].

Where this sits in the calibration order

Extruder steps come first among the extrusion calibrations. Klipper’s pressure advance guide asks you to tune rotation_distance before pressure advance, because extrusion rate affects the result [3]. Marlin’s Linear Advance page makes the same request [8]. After steps are right, per-filament differences belong in the slicer’s flow ratio, and corner behavior belongs in pressure advance.

When it is not needed, or not the fix

Steps per mm describe the hardware: Marlin lists pulley and gear geometry, lead screw pitch, microstepping and extruder style as the inputs [7]. They rarely need to change unless one of those changes, and Marlin’s own M92 E example is about fitting a new extruder [4]. If a printer prints correctly and flow ratio sits in the normal range, re-measuring is optional.

Several symptoms look like an e-steps error but are not:

Symptom More likely cause Source
Flow ratio wants to go outside 0.9–1.1 Wrong filament diameter in the profile, then E steps [9, 11]
Short extrusion only when extruding fast Pressure or melt limit, not steps; the test must run slowly [1]
Measured length differs from spool to spool Drive-gear grip varies with filament [1]

PrusaSlicer’s extrusion multiplier tooltip makes the first row explicit: if you think you need more than about ±10%, check filament diameter and firmware E steps [9]. OrcaSlicer stresses that the filament diameter setting must be accurate because extrusion is calculated from it [11].

A partly blocked nozzle also distorts the reading. Bambu Lab warns that a dirty extruder or partially clogged nozzle significantly skews extrusion calibration [10], so clear the hotend first using the clogged nozzle guide, then measure again. Persistent thin walls after a correct measurement point back to the under-extrusion guide.

Questions

Can the same method calibrate X, Y and Z?

No. Klipper's documentation says measure-and-trim is not accurate enough for X, Y or Z and will likely make them worse; derive those from belt pitch, pulley teeth or lead screw specifications instead [1].

Why use such a slow extrusion speed for the test?

Klipper specifies G1 E50 F60, about 50 seconds for 50 mm, because faster extrusion builds pressure in the extruder that skews the measurement. It also says not to use a front end's extrude button for this [1].

Sources

  1. Rotation distance. Klipper documentation. Firmware documentation. Conversion formula, measure-and-trim procedure, hobbed bolt and gear_ratio. Accessed October 12, 2026.
  2. G-Codes. Klipper documentation. Firmware documentation. SET_EXTRUDER_ROTATION_DISTANCE. Accessed October 12, 2026.
  3. Pressure advance. Klipper documentation. Firmware documentation. Tune rotation_distance before pressure advance. Accessed October 12, 2026.
  4. M92 - Set Axis Steps-per-unit. Marlin Firmware documentation. Firmware documentation. M92 E, report with M92 or M503, save M500, reset M502. Accessed October 12, 2026.
  5. M503 - Report Settings. Marlin Firmware documentation. Firmware documentation. Reports active settings, which may differ from EEPROM. Accessed October 12, 2026.
  6. M500 - Save Settings. Marlin Firmware documentation. Firmware documentation. Saves all configurable settings to EEPROM. Accessed October 12, 2026.
  7. Configuring Marlin (Configuration.h). Marlin Firmware documentation. Firmware documentation. DEFAULT_AXIS_STEPS_PER_UNIT; EEPROM_SETTINGS behavior. Accessed October 12, 2026.
  8. Linear Advance. Marlin Firmware documentation. Firmware documentation. Steps/mm must be calibrated precisely, at low speed, before K calibration. Accessed October 12, 2026.
  9. ConfigDefsFDM.cpp (setting definitions and tooltips). Prusa Research, PrusaSlicer source on GitHub. Source code. Extrusion multiplier tooltip points to filament diameter and E steps. Accessed October 12, 2026.
  10. Flow Rate Calibration. Bambu Lab Wiki. Manufacturer documentation. Dirty extruder or partially clogged nozzle skews extrusion calibration. Accessed October 12, 2026.
  11. Material Basic Information. OrcaSlicer Wiki. Slicer documentation. Filament diameter is used to calculate extrusion and must be accurate. Accessed October 12, 2026.