Klipper Rotation Distance Calculator
Calculate the optimal rotation_distance parameter for your Klipper 3D printer.
Rotation Distance in Klipper
Rotation distance is a fundamental parameter in Klipper firmware that defines how far an axis moves for one complete revolution of its stepper motor. Unlike the traditional “steps per millimeter” used in other firmware, rotation_distance is a physical measurement that makes configuration more intuitive and hardware-focused.
Steps/mm vs. Rotation Distance: If you’re coming from Marlin or other firmware, think of rotation_distance as the inverse of steps/mm, but focused on physical measurements rather than electronic signals.
Typical Values for Common Hardware
Belt-Driven Axes (X/Y)
Calculate with: belt_pitch × pulley_teeth
GT2 belts have a 2mm pitch. Most printers (Ender, Prusa, Voron) use 20T pulleys. Delta printers often use 16T.
Leadscrews (Z axis)
Calculate with: thread_pitch × number_of_starts
Most consumer printers use T8×8 leadscrews. Prusa printers often use T8×2 for finer Z resolution.
Extruders
Extruders are best calibrated using the measurement method for maximum accuracy.
Practical Calibration Guide
For X/Y Axes (Belt-Driven)
For belt-driven axes, calculating from hardware specifications is more accurate than measuring prints. The formula is straightforward:
rotation_distance = belt_pitch × pulley_teeth
Note: Do not try to calibrate X/Y axes by measuring printed objects. Small variations in models, filament shrinkage, and other factors will introduce more error than they solve.
For Z Axis (Leadscrew)
Leadscrews follow a similar principle to belts. The rotation distance equals the thread pitch multiplied by the number of starts:
rotation_distance = thread_pitch × number_of_starts
Tip: Most common Z-axis values are whole numbers (8mm, 2mm, 4mm). If your calculation gives something unusual like 7.89mm, double-check your leadscrew specifications.
For Extruders (Measurement Method)
While you can calculate an extruder’s rotation_distance from hardware specs, the measurement method provides better accuracy due to variations in grip, tension, and other factors:
For Bowden Setups: Disconnect the Bowden tube from the hotend when calibrating to eliminate back pressure effects.
For Best Results: Perform the calibration 2-3 times and use the average value.
Special Considerations
Geared Extruders
For geared extruders like Bondtech BMG or E3D Titan, you have two options in Klipper:
-
Option 1: Set
rotation_distance
to the effective value (e.g., ~7.7mm for BMG) without specifying gear ratio -
Option 2: Set
rotation_distance
to the theoretical drive gear circumference (~22mm) and specifygear_ratio
in the config
Example for Bondtech BMG:
# Option 1:
rotation_distance: 7.7
# Option 2:
rotation_distance: 22.0
gear_ratio: 50:17
Both approaches achieve the same result, but using the gear_ratio parameter provides clearer documentation.
Microstepping and Motor Types
The rotation_distance value is independent of microstepping setting and motor type. If you change your:
- Microstepping (e.g., from 16 to 32)
- Motor type (e.g., from 1.8° to 0.9°)
You don’t need to recalculate rotation_distance. Just update the microsteps
or full_steps_per_rotation
parameters in your config.
When switching from 1.8° to 0.9° stepper:
# Before (1.8° motor)
rotation_distance: 40
microsteps: 16
# full_steps_per_rotation: 200 # Default
# After (0.9° motor)
rotation_distance: 40 # Unchanged
microsteps: 16
full_steps_per_rotation: 400 # Changed
Troubleshooting
If your prints have dimensional issues after setting rotation_distance correctly:
- For X/Y accuracy issues: Check belt tension, pulley set screws, and mechanical play before adjusting rotation_distance
- For Z height issues: Verify Z endstop position, first layer settings, and bed leveling
- For extrusion problems: Check filament diameter settings, nozzle size configuration, flow rate calibration, and nozzle temperature
Remember that rotation_distance is a physical property of your hardware. If belts aren’t skipping and mechanics are sound, the calculated values should be correct.
Real-World Examples
Ender 3 Configuration
# X and Y axes (GT2 belt with 20T pulleys)
[stepper_x]
rotation_distance: 40.0
microsteps: 16
[stepper_y]
rotation_distance: 40.0
microsteps: 16
# Z axis (T8x8 leadscrew)
[stepper_z]
rotation_distance: 8.0
microsteps: 16
# Extruder (Stock)
[extruder]
rotation_distance: 34.2 # Calibrated value, may vary
microsteps: 16
Prusa i3 MK3S Configuration
# X and Y axes (GT2 belt with 20T pulleys)
[stepper_x]
rotation_distance: 40.0
microsteps: 16
[stepper_y]
rotation_distance: 40.0
microsteps: 16
# Z axis (T8x2 leadscrew)
[stepper_z]
rotation_distance: 8.0
microsteps: 16
# Bondtech extruder
[extruder]
rotation_distance: 7.7 # BMG-based
microsteps: 16
Voron 2.4 Configuration
# CoreXY motors (GT2 belt with 20T pulleys)
[stepper_x]
rotation_distance: 40.0
microsteps: 16
[stepper_y]
rotation_distance: 40.0
microsteps: 16
# Z axis (uses 4 separate leadscrews)
[stepper_z]
rotation_distance: 8.0
microsteps: 16
[extruder]
rotation_distance: 22.678 # Configured with gear_ratio
gear_ratio: 50:17
microsteps: 16