Pressure advance calculator: tower height or test line to the value to save

Pressure advance from a tower is start + factor × measured height. From a line or pattern test it is start + (line number − 1) × step. Pick the test you printed and type the height or the line number. The calculator gives the value and the line to put in your firmware config or slicer.

Test you printed

Picking the test settings fills in the numbers below. Bambu Studio's PA Tower, PA Line and PA Pattern for third-party printers use the same defaults as OrcaSlicer.

Test values

The numbers the test was generated with. Typing a different number switches the test settings to Other.

START= in Klipper, Start PA in OrcaSlicer and Bambu Studio, Starting Value for K in Marlin's generator.

Klipper FACTOR= (per mm of height). PA step in OrcaSlicer (per mm on the tower, per line or pattern otherwise). K-factor Stepping in Marlin.

mm

Only if the TUNING_TOWER command had BAND=. 0 means no bands.

mm

Klipper's square_tower.stl is 50 mm tall.

Your pick
mm

From the bed to the height you picked, read with calipers. If the Klipper command had SKIP=, subtract it first.

Save it to

Pressure advance to save

–

Worked out as

–

Command or setting

–

To keep it

–

Range the test covered

–

The formula

Every pressure advance test steps the value up from a start value by a fixed amount. The calculator counts the steps up to the height or line you picked.

Klipper TUNING_TOWER with FACTOR, and with BAND added:

pressure advance = START + FACTOR × height
pressure advance = START + FACTOR × (floor(height / BAND) + 0.5) × BAND

OrcaSlicer and Bambu Studio PA Tower:

pressure advance = start + step × whole millimeters of height

Line and pattern tests (OrcaSlicer and Bambu Studio PA Line and PA Pattern, Marlin’s K-factor pattern):

pressure advance = start + (line number − 1) × step
  • Height is in millimeters, measured from the bed.
  • START, FACTOR and BAND are the numbers in your TUNING_TOWER command.
  • Start, end and step are the numbers the slicer or generator asked for.
  • Line number counts the line or pattern labeled with the start value as 1.
  • PA Tower, PA Line and PA Pattern are the slicers’ names for their pressure advance (PA) tests.

How do you calculate pressure advance from a tower test?

Add the start value to the factor times the height you measured from the bed. On a Klipper tuning tower that is START + FACTOR × height, so a long-bowden tower at FACTOR=.020 read at 12.90 mm gives 0 + 12.90 × 0.020 = 0.258. OrcaSlicer’s PA Tower changes once per millimeter, so drop the decimals.

Worked example: Klipper tuning tower

These are the calculator’s defaults, and the example in Klipper’s own docs.

  1. The tower was printed after TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.020, Klipper’s command for long bowden extruders.
  2. Calipers read 12.90 mm from the bed to the height picked.
  3. Pressure advance: 0 + 12.90 × 0.020 = 0.258.
  4. Run SET_PRESSURE_ADVANCE ADVANCE=0.258 to use it now. To keep it, set pressure_advance: 0.258 in the [extruder] section of printer.cfg and run RESTART, which also clears the test state.

The same 12.90 mm on the direct drive tower (FACTOR=.005) gives 0.0645.

Klipper pressure advance tuning tower settings

Klipper’s docs give START=0 FACTOR=.005 for direct drive and START=0 FACTOR=.020 for long bowden extruders. Klipper sets a new value on every layer, so the measured height goes straight into the formula. Its test object, square_tower.stl, is 50 mm tall. That puts the direct drive tower’s range at 0 to 0.25 and the bowden tower’s at 0 to 1.

Two optional parameters change the arithmetic:

  • BAND: Klipper changes the value only every BAND millimeters and uses the figure for the middle of each band. At 12.90 mm with FACTOR=.005 BAND=5, the height falls in the 10 to 15 mm band: 0 + 0.005 × 12.5 = 0.0625.
  • SKIP: Klipper holds START up to the SKIP height and counts up from that point. Subtract SKIP from the measured height first. With SKIP=2, 12.90 mm on the bowden tower gives 0 + 10.90 × 0.020 = 0.218.

Pressure advance tower in OrcaSlicer

OrcaSlicer’s PA Tower and Bambu Studio’s PA Tower for third-party printers set a new value once per whole millimeter. The first millimeter above the bed prints the start value. A reading of 8 mm or 8.4 mm falls in the 8 to 9 mm band: 0 + 8 × 0.002 = 0.016. OrcaSlicer’s wiki writes this as start + step × measured height.

OrcaSlicer’s dialog fills in defaults for a DDE (direct drive extruder) or a Bowden setup. It cuts the tower to (end − start) / step + 1 mm, so its top millimeter prints the end value. Both default ranges give a 51 mm tower.

Tower test Settings Range covered Height read Value
Klipper, direct drive START=0 FACTOR=.005 0 to 0.25 over 50 mm 10 mm 0.05
Klipper, direct drive START=0 FACTOR=.005 0 to 0.25 over 50 mm 25 mm 0.125
Klipper, long bowden START=0 FACTOR=.020 0 to 1 over 50 mm 12.9 mm 0.258
Klipper, long bowden START=0 FACTOR=.020 0 to 1 over 50 mm 20 mm 0.4
OrcaSlicer PA Tower, DDE 0 to 0.1, step 0.002 51 mm tower 8 mm 0.016
OrcaSlicer PA Tower, DDE 0 to 0.1, step 0.002 51 mm tower 23.6 mm 0.046
OrcaSlicer PA Tower, Bowden 0 to 1, step 0.02 51 mm tower 8 mm 0.16
OrcaSlicer PA Tower, Bowden 0 to 1, step 0.02 51 mm tower 23.6 mm 0.46

How to measure the height

  1. Measure with calipers from the bottom of the tower, where it sat on the bed, to the height you picked.
  2. For Klipper, type the reading as it is, because the value changed on every layer.
  3. For OrcaSlicer, type the reading too. The calculator drops the decimals and shows the unrounded figure in its note.

How do you calculate pressure advance from a line or pattern test?

Start from the test’s start value and add one step for each line after the first: start + (line number − 1) × step. The line labeled with the start value is line 1. On OrcaSlicer’s default PA Line test, which starts at 0 in steps of 0.002, line 9 is 0 + 8 × 0.002 = 0.016.

Worked example: OrcaSlicer PA Line

  1. Test settings: OrcaSlicer’s PA Line for a direct drive extruder, start 0, end 0.1, step 0.002. That prints 51 lines.
  2. The line picked is the 9th, counting the line labeled 0 as line 1.
  3. Pressure advance: 0 + (9 − 1) × 0.002 = 0.016.
  4. In OrcaSlicer’s filament settings, tick Enable pressure advance and type 0.016 under Pressure advance. Save the filament preset.

Labels sit on every other line

OrcaSlicer and Bambu Studio print the value beside every other line or pattern, starting with the first. Marlin’s generator labels “every second test line” the same way. So labels sit beside 1, 3, 5 and so on.

An unlabeled line is one step above the label before it. On the default PA Line, line 10 has no label. Line 9’s label reads 0.016, so line 10 is 0.018.

Line or pattern test Settings Printed No. 5 No. 10 Last
OrcaSlicer PA Line, DDE 0 to 0.1, step 0.002 51 0.008 0.018 0.1
OrcaSlicer PA Line, Bowden 0 to 1, step 0.02 51 0.08 0.18 1
OrcaSlicer PA Pattern, DDE 0 to 0.08, step 0.005 17 0.02 0.045 0.08
OrcaSlicer PA Pattern, Bowden 0 to 1, step 0.05 21 0.2 0.45 1
Bambu Studio manual Flow Dynamics, Bambu Lab printer 0 to 0.05, step 0.005 11 0.02 0.045 0.05
Marlin K-factor pattern 0 to 2, step 0.2 11 0.8 1.8 2

Bambu Studio’s dialog for third-party printers fills in the same defaults as OrcaSlicer.

Both slicers print (end − start) / step + 1 lines or patterns, rounded up. A shallow bed gets fewer PA Line lines: OrcaSlicer spaces them 3.5 mm apart and fits at most (bed depth − 10) / 3.5. A 180 mm deep bed holds 48 lines, not 51.

Where to save the value

The value goes in the firmware’s config or the slicer’s filament settings, and the calculator prints the line for the one you pick. The table uses 0.258.

Firmware or slicer Set it now Keep it
Klipper SET_PRESSURE_ADVANCE ADVANCE=0.258 pressure_advance: 0.258 under [extruder] in printer.cfg, then RESTART
Marlin M900 K0.258 M500 saves it to EEPROM, or add M900 K0.258 to the end of the slicer’s start G-code
RepRapFirmware M572 D0 S0.258 The same line in config.g. D0 is the first extruder.
OrcaSlicer Filament settings → Filament → Flow ratio and Pressure Advance: tick Enable pressure advance, type 0.258 Save the filament preset
Bambu Studio, third-party printer Filament settings → Filament → Basic information: tick Enable pressure advance, type 0.258 Save the filament preset
Bambu Studio, Bambu Lab printer Calibration → Flow Dynamics: type 0.258 as Factor K on the Record Factor step Bambu Studio saves it to the printer

In OrcaSlicer and Bambu Studio, the Pressure advance field shows only in Advanced mode. Bambu Studio hides it altogether on Bambu Lab printers.

Marlin’s M900 needs firmware built with LIN_ADVANCE. OrcaSlicer’s wiki notes that not every printer ships with it enabled.

When the result is out of range

  • Below zero. Klipper rejects a negative pressure advance. Marlin’s M900 accepts K from 0 to 10. OrcaSlicer writes no pressure advance command for a negative value. A negative result means the start value or the step was typed wrong.
  • Above the tower or past the last line. The test never printed that value. Check the height or the line count, and check that start, end and step match the test you printed.
  • Above 2. OrcaSlicer and Bambu Studio accept at most 2 in the filament settings, and Bambu Studio’s Factor K must be above 0 and below 2.
  • Exactly 0. Klipper’s default of 0 turns pressure advance off, and M900 K0 turns off Linear Advance in Marlin.

Built by 3D Calculators Team· Published · Figures last checked

Sources

  1. Klipper documentation, Pressure advance (accessed 2026-11-03)
  2. Klipper documentation, G-Codes (TUNING_TOWER and SET_PRESSURE_ADVANCE) (accessed 2026-11-03)
  3. Klipper documentation, Configuration reference ([extruder] pressure_advance) (accessed 2026-11-03)
  4. Klipper source, tuning_tower.py (calc_value) (accessed 2026-11-03)
  5. Klipper source, extruder.py (pressure advance minimum of 0) (accessed 2026-11-03)
  6. Klipper test object, square_tower.stl (50 mm tall) (accessed 2026-11-03)
  7. OrcaSlicer wiki, Pressure advance calibration (accessed 2026-11-03)
  8. OrcaSlicer 2.4.2 source, GCode.cpp (PA Tower value per layer, PA Line count) (accessed 2026-11-03)
  9. OrcaSlicer 2.4.2 source, Plater.cpp (PA Tower height) (accessed 2026-11-03)
  10. OrcaSlicer source, calib.cpp and calib.hpp (PA Line and PA Pattern values, labels and spacing) (accessed 2026-11-03)
  11. OrcaSlicer source, calib_dlg.cpp (PA calibration defaults) (accessed 2026-11-03)
  12. OrcaSlicer source, Tab.cpp (filament settings layout) (accessed 2026-11-03)
  13. OrcaSlicer source, PrintConfig.cpp (pressure_advance, maximum 2) (accessed 2026-11-03)
  14. OrcaSlicer source, GCodeWriter.cpp (pressure advance command per firmware) (accessed 2026-11-03)
  15. Bambu Studio source, Calib.cpp (PA Line and PA Pattern values and labels) (accessed 2026-11-03)
  16. Bambu Studio source, GCode.cpp (PA Tower value per layer) (accessed 2026-11-03)
  17. Bambu Studio source, calib_dlg.cpp (third-party printer PA defaults) (accessed 2026-11-03)
  18. Bambu Studio source, CalibrationWizardPresetPage.cpp (manual Flow Dynamics range) (accessed 2026-11-03)
  19. Bambu Studio source, CalibrationWizardSavePage.cpp (Record Factor step, Factor K) (accessed 2026-11-03)
  20. Bambu Studio source, CalibrationWizard.cpp (Flow Dynamics result saved to the printer) (accessed 2026-11-03)
  21. Bambu Studio source, CalibUtils.cpp (Factor K limits) (accessed 2026-11-03)
  22. Bambu Studio source, Tab.cpp (filament settings layout) (accessed 2026-11-03)
  23. Marlin documentation, Linear Advance (accessed 2026-11-03)
  24. Marlin K-factor calibration pattern generator (accessed 2026-11-03)
  25. Marlin documentation, M900: Linear Advance Factor (accessed 2026-11-03)
  26. Marlin documentation, M500: Save Settings (accessed 2026-11-03)
  27. Marlin source, M900.cpp (K range 0 to 10) (accessed 2026-11-03)
  28. Duet3D documentation, G-code dictionary: M572 (accessed 2026-11-03)