Linear Advance & Pressure Advance Calculator

Klipper pressure advance from a tuning tower is START + measured height × FACTOR (FACTOR 0.005 for direct drive, 0.020 for Bowden). From a line pattern, K = start + (best line − 1) × step. This tool does both and writes the Marlin M900 K and Klipper commands. Published October 30, 2026.

Your setup

Measure from the bed to where the corners look sharpest, with calipers.

Result

Firmware and Slicer Settings

Klipper printer.cfg

-

Klipper console / macro

-

Marlin (Linear Advance 1.5)

-

Per-filament slicer fields

    Optional: Line Pattern G-code

    A single-layer test: each line prints 20 mm slow, 40 mm fast, 20 mm slow, with K / PA raised for every line. It uses the firmware chosen above. Made in your browser; nothing is uploaded.

    Check before printing: the start block (temperatures, G28, bed levelling), that X0 Y0 is the front-left of your bed, and the bed size. Watch the first lines and be ready to stop the print.

    How Linear Advance and Pressure Advance Work

    Molten plastic in the nozzle acts like a spring: the extruder has to build pressure before plastic flows, and that pressure keeps pushing plastic out when the head slows down. The result is thin starts, bulging corners and blobs at the end of lines. Linear advance (Marlin) and pressure advance (Klipper) push extra filament while the head speeds up and pull back while it slows down, in proportion to the change in extrusion speed.

    • Marlin Linear Advance: the factor is K, set with M900 K0.05. Your firmware must be built with LIN_ADVANCE; if M900 answers "unknown command" it is not. Save with M500 or put M900 in the filament start G-code.
    • Klipper Pressure Advance: pressure_advance: in the [extruder] section, or SET_PRESSURE_ADVANCE ADVANCE=0.04 at any time (lost at RESTART). The optional pressure_advance_smooth_time (default 0.040 s) rarely needs changing.
    • Units: both are in seconds of extrusion-rate change (mm of filament per mm/s). That is why the numbers look alike, but see the conversion caution below.

    The Formulas

    Tuning tower (Klipper docs method)
    TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
    pressure_advance = START + measured height × FACTOR
    FACTOR .005 for direct drive and .020 for Bowden. Klipper's guide prints its square_tower.stl at high speed (about 100 mm/s), no infill and coarse layers, after SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500 to make the effect easy to see. With SKIP, the height used is measured height − SKIP.
    Line pattern
    K = start + (best line − 1) × step
    Each line runs slow, fast, slow. Too little K: the fast part is thin and the end bulges. Too much: the fast start bulges and gaps appear after it. Pick the most even line. If the pattern prints its own K numbers (Marlin's K-factor pattern, Orca's PA pattern), just read the number.
    Typical starting ranges (rules of thumb)
    Direct drive: PA about 0.02–0.08; Marlin LA 1.5 K about 0–0.2.
    Bowden: PA about 0.3–1.0; K up to about 2.
    PETG often needs a little more than PLA; TPU varies widely and some leave it off. A value far outside these ranges usually means a test problem.
    Conversion caution
    As a rough guide, Marlin LA 1.5 K and Klipper PA are close for the same printer and filament, so a known K is a fair starting PA (and the other way round). Re-test anyway. Old Marlin LA 1.0 K values (often 30 to 200) are a different unit and cannot be converted by any simple factor; re-test after upgrading.

    Worked Example

    Klipper, direct drive, PLA
    • Console: SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500, then TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005, then print the square tower.
    • The corners are sharpest at 8.0 mm. pressure_advance = 0 + 8.0 × 0.005 = 0.040.
    • printer.cfg: pressure_advance: 0.0400 under [extruder], then RESTART (which also clears the test velocity limits).
    Marlin, Bowden, PETG, line pattern
    • Pattern from K 0 in steps of 0.05, 21 lines. Line 13 is the most even: K = 0 + (13 − 1) × 0.05 = 0.60.
    • M900 K0.6 then M500, or put M900 K0.6 in the PETG filament start G-code so PLA can keep its own value.

    Practical Tips

    • Calibrate e-steps and flow first. Use the steps per mm calculator; a wrong extruder value shifts the advance result.
    • Tune advance before retraction. Good advance reduces ooze, so you can often shorten the retraction afterwards. See the retraction calculator. Input shaping is separate; see the input shaper explainer.
    • Set it per filament. Different materials, colours and brands give different values. Slicer filament profiles are the easiest place to store them.
    • Watch old drivers. On Marlin with TMC2208/2209 drivers in StealthChop, linear advance can cause skipped extruder steps or noise; SpreadCycle on the extruder is the usual cure.
    • Printing accurate parts? Next, look at hole compensation and the shrinkage scale factor.

    More 3D Printing Tools

    Frequently Asked Questions

    Multiply the measured height of the best corners by the FACTOR you used and add START. With START=0 and FACTOR=.005 on a direct drive, a best height of 8 mm gives 0.040. Bowden printers use FACTOR=.020, so 20 mm gives 0.40.

    For Marlin Linear Advance 1.5, direct drive printers are typically about 0 to 0.2 and Bowden printers up to about 2. Klipper pressure advance is typically about 0.02 to 0.08 on direct drive and 0.3 to 1.0 on Bowden. These are rough ranges; test each filament.

    As a rough guide, a Marlin Linear Advance 1.5 K is a fair starting point for Klipper pressure advance because both use similar units, but re-test. Old Linear Advance 1.0 K values (often 30 to 200) are a different unit and cannot be converted.

    In OrcaSlicer and Bambu Studio, open the filament settings, tick Enable pressure advance and type the value; the slicer sends the right command for the printer. In PrusaSlicer add M900 K to Filament Settings, Custom G-code, Start G-code (Klipper users can put SET_PRESSURE_ADVANCE there instead). Cura has no built-in field, so use the machine start G-code.

    Linear Advance is a compile-time option in Marlin (LIN_ADVANCE). Many stock firmwares leave it out to save memory or because of driver issues. Send M900 alone: if the printer reports an unknown command, you need firmware built with Linear Advance enabled, or Klipper.

    Typical ranges are rules of thumb. The tower and pattern sums are exact, but the result is only as good as the reading of the print. The generated G-code is a simple test: check its start block, origin and bed size against your printer before use.