Extruder calibration calculator: Klipper rotation_distance and Marlin e-steps

Published October 15, 20264 sources

What it calculates

Mark the filament, extrude a known length slowly, measure how far the mark actually moved, then scale. Klipper: new rotation_distance = old × actual ÷ requested [1]. Marlin: new steps/mm = old × requested ÷ actual, set with M92 E and saved with M500 [2, 3]. The two corrections move in opposite directions because steps/mm is inversely proportional to rotation distance.

Inputs
Firmware
mm
mm

Extruder intake to the mark on the filament.

mm

The E distance you sent, e.g. G1 E50 F60.

mm

Result

New rotation_distance32.830mm
Actually extruded49.00mm
Extrusion error-2.0%

rotation_distance = 33.5 × 49 ÷ 50

Save under [extruder] in printer.cfg, then RESTART.

What is being calibrated

The extruder’s stepper motor turns a drive gear that pushes filament. Firmware needs to know how much filament moves per motor step to turn a requested extrusion length into steps. Marlin stores this as steps per mm for the E axis. Klipper stores the inverse idea, rotation_distance: the distance the filament travels for one full rotation of the stepper motor [1].

If the value is off, every extrusion is off by the same percentage. That shows up as under-extrusion or over-extrusion on every print, with every filament.

The measure-and-trim test

Klipper’s documentation gives the procedure; the Marlin version is the same test with different arithmetic [1]:

  1. Load filament and heat the hotend to a normal printing temperature for it.
  2. Put a mark on the filament about 70 mm above the extruder intake and measure that distance precisely with calipers. This is the mark distance before.
  3. Extrude 50 mm slowly: G91 then G1 E50 F60. That is the requested length. Klipper’s docs stress the slow rate, because fast extrusion builds pressure in the hotend and skews the result, and they advise against the “extrude” button of a user interface for the same reason [1].
  4. Measure from the intake to the mark again. This is the mark distance after.
  5. Actual extruded = before − after.

If actual and requested differ by more than about 2 mm, Klipper’s guide recommends repeating the test after applying the correction [1]. Older Marlin-oriented guides often use a 120 mm mark and 100 mm extrusion; the arithmetic is identical, so enter whatever lengths you used.

The formulas

Klipper. rotation_distance = previous rotation_distance × actual ÷ requested, rounded to three decimals [1]. Put the new value under [extruder] in printer.cfg and restart.

Marlin. steps/mm = previous steps/mm × requested ÷ actual. Read the current value with M503 or M92 without parameters, set the new one with M92 E<value>, and save it to EEPROM with M500 [2, 4, 3].

Why opposite directions? Klipper relates the two settings as rotation_distance = full steps per rotation × microsteps ÷ steps_per_mm [1]. If the extruder pushed too little filament, you need more steps per mm (Marlin) or, equivalently, a smaller distance per rotation (Klipper).

Worked example

With rotation_distance 33.5, a mark at 70 mm before and 21 mm after a 50 mm request, the actual extrusion is 49 mm, an error of −2%. New rotation_distance = 33.5 × 49 ÷ 50 = 32.830.

Converting between the two settings

When moving a printer from Marlin to Klipper, the Klipper docs give the conversion: rotation_distance = full_steps_per_rotation × microsteps ÷ steps_per_mm [1]. Most steppers have 200 full steps per rotation (1.8° motors); 0.9° motors have 400. Use the microstep setting you will configure in Klipper. For example, 200 × 16 ÷ 80 steps/mm = 40 mm.

When not to use this

  • To fix one filament. If only one spool over- or under-extrudes, the extruder is fine; adjust that filament’s flow ratio instead.
  • On a hot, fast request. A quick extrusion through a hot nozzle measures nozzle back-pressure as much as the extruder.
  • With the nozzle removed or cold. Klipper’s procedure is done with filament loaded and the hotend at printing temperature [1], so the measurement includes the real filament path.

Questions

Does every printer need this calibration?

It applies when you can change the extruder setting yourself: rotation_distance in Klipper's printer.cfg or M92 E in Marlin [1, 2]. If your printer's firmware does not expose the extruder steps, the per-filament adjustment available to you is the flow ratio.

Can I use the same method for the X, Y or Z axes?

No. Klipper's documentation warns that measure-and-trim is not accurate enough for X, Y or Z, and recommends deriving those values from the belt, pulley and lead screw hardware instead [1].

Sources

  1. Rotation distance. Klipper documentation. Firmware documentation. Measure-and-trim procedure, formulas, conversion from steps_per_mm. Accessed October 12, 2026.
  2. M92 - Set Axis Steps-per-unit. Marlin documentation. Firmware documentation. Setting E steps per unit; reading current values. Accessed October 12, 2026.
  3. M500 - Save Settings. Marlin documentation. Firmware documentation. Saves settings to EEPROM. Accessed October 12, 2026.
  4. M503 - Report Settings. Marlin documentation. Firmware documentation. Prints current settings, including M92. Accessed October 12, 2026.