Linear Advance K-Factor Calculator

Linear advance, the M900 K-factor in Marlin firmware, manages extruder pressure during acceleration so corners do not bulge and line starts do not leave gaps. To calibrate it you print a tower whose bands step up the K value with height. This calculator converts the height of the cleanest band into the K value it represents, using the same start value, K increment per step, and height per step that your tower-generating script used. The math is an exact linear interpolation along the printed gradient, so the result is the K-factor to set with M900.

0.00
0.00
0.00
0.00

K-factor formula

Steps above base = best band height / height per step
K rise = steps above base * K increment per step
Best K = start K + K rise
M900 value = best K

This is a linear interpolation along the tower gradient. Enter the exact start, increment, and step height your tower script used so the recovered K matches the print.

Linear advance context

  • The calculation is an exact interpolation along the tower's K gradient.
  • Set the result with M900 K in firmware or start gcode.
  • Different filaments can need different K values; re-run the tower per material.
  • Linear advance does not scale the part, only extruder pressure during speed changes.
  • It reduces corner bulge and line-start gaps for crisper detail.

Linear advance: frequently asked questions

What is the linear advance K-factor?

Linear advance, set with the M900 command in Marlin firmware, predicts and adjusts extruder pressure during acceleration so corners and line starts extrude evenly. The K-factor is the strength of that correction. A calibration tower prints bands at increasing K values so you can pick the best one.

How do I read K from a calibration tower?

The tower starts at a base K value at its bottom and increases K by a fixed step over a fixed height per step. Find the height of the cleanest band, then K equals the start value plus the height of that band divided by the height per step, times the K increment per step.

What values go into the test gradient?

The tower's generating script sets the start K, the K increment per step, and the printed height assigned to each step. Enter the same values the script used, then the measured height of the best-looking band, to recover the K it corresponds to.

How do I apply the K-factor?

Set it in firmware or your start gcode with M900 K followed by the value, for example M900 K0.04. Different filaments can need different K values, so re-run the tower when you change material.

Does linear advance change dimensions?

No. Linear advance only changes how extruder pressure is managed during speed changes; it does not scale the part. It reduces bulging at corners and gaps at line starts for crisper detail.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.