Retraction Calculator: Distance, Speed and Retraction Tower
On a direct drive extruder, slicer profiles retract about 0.7 to 1.2 mm at 30 to 60 mm/s: Bambu Lab uses 0.8 mm at 30 mm/s and the Prusa MK4S 0.7 mm at 35 mm/s. Bowden printers need more, 3.2 to 6.5 mm: 3.2 mm on the Prusa MINI, 5 mm on an Ender-3 V2 in OrcaSlicer and 6.5 mm on the UltiMaker S5 in Cura. Pick your printer to see its slicer’s default, then print a retraction tower and enter the height of the cleanest section to get the value for your own filament.
Profile values are the printer defaults in each slicer’s own profile files for a 0.4 mm nozzle, read on 18 Nov 2026. A filament profile can override them.
Retraction distance and speed in slicer profiles
Retraction pulls the filament back before a travel move so the nozzle does not ooze, then pushes it forward again (unretract, prime or deretraction) before printing restarts. The distance mostly depends on the extruder: a direct drive sits right on the hotend, while a Bowden tube adds slack between the gears and the nozzle, so it needs several times more. These are the printer defaults the slicer makers ship:
| Printer (slicer) | Extruder | Length | Speed | Unretract speed | Z-hop |
|---|---|---|---|---|---|
| Bambu Lab X1 / P1 / A1 series (Bambu Studio) [9] | Direct drive | 0.8 mm | 30 mm/s | 30 mm/s | 0.4 mm |
| Prusa MK4S (PrusaSlicer) [10] | Direct drive | 0.7 mm | 35 mm/s | 25 mm/s | 0.2 mm |
| Prusa CORE One (PrusaSlicer) [10] | Direct drive | 0.7 mm | 45 mm/s | 25 mm/s | 0.2 mm |
| Prusa XL (PrusaSlicer) [10] | Direct drive | 0.8 mm | 35 mm/s | 25 mm/s | 0.3 mm |
| Prusa i3 MK3S / MK3S+ (PrusaSlicer) [10] | Direct drive | 0.8 mm | 35 mm/s | same | 0.4 mm |
| Prusa MINI / MINI+ (PrusaSlicer) [10] | Bowden | 3.2 mm | 70 mm/s | 40 mm/s | 0.2 mm |
| Creality K1C (OrcaSlicer) [11] | Direct drive | 0.8 mm | 40 mm/s | 40 mm/s | 0.4 mm |
| Creality Ender-3 V3 SE (OrcaSlicer) [11] | Direct drive | 1.2 mm | 40 mm/s | 30 mm/s | 0.4 mm |
| Creality Ender-3 S1 (OrcaSlicer) [11] | Direct drive | 1 mm | 60 mm/s | 40 mm/s | 0.4 mm |
| Creality Ender-3 S1 (Cura) [13] | Direct drive | 0.8 mm | 40 mm/s | same | — |
| Creality Ender-3 (OrcaSlicer) [11] | Bowden | 4 mm | 60 mm/s | 40 mm/s | 0.4 mm |
| Creality Ender-3 V2 (OrcaSlicer) [11] | Bowden | 5 mm | 60 mm/s | 40 mm/s | 0.4 mm |
| UltiMaker S5 (Cura) [14] | Bowden | 6.5 mm | 45 mm/s | 15 mm/s | — |
| Generic default (Cura fdmprinter) [12] | Not printer-specific | 6.5 mm | 25 mm/s | same | — |
Cura’s generic fdmprinter default (6.5 mm at 25 mm/s) applies to any printer without its own value, so treat it as a fallback. "Same" means the slicer uses the retraction speed for unretracting too (PrusaSlicer’s deretract speed 0, Cura’s prime speed = retraction speed). The MINI’s Input Shaper profile uses 2.5 mm instead of 3.2 mm [10]. Bambu profiles also retract 2 mm on a filament change [9]. Klipper’s own firmware retraction defaults are 0 mm at 20 mm/s, unretract 10 mm/s, until you set them [6].
How the OrcaSlicer retraction tower maps height to length
OrcaSlicer’s Calibration → Retraction test prints a tower whose retraction length rises as it grows. Its defaults are a start of 0 mm, an end of 2 mm and a 0.1 mm step, which suit most direct drive extruders; for Bowden extruders its wiki suggests 1 to 6 mm in 0.2 mm steps [1].
- Length at height z = start + floor(z − 0.4) × step, straight from OrcaSlicer’s G-code generator [2]. So the bottom 1.4 mm uses the start length, and every 1 mm above that adds one step.
- Tower height = 1.4 + (end − start) ÷ step mm: OrcaSlicer cuts the model there [3]. The defaults give a 21.4 mm tower with 21 lengths.
- OrcaSlicer prints it at 0.2 mm layers (0.1 mm on a 0.2 mm nozzle), with 2 walls, no infill and no top layers, and it turns off firmware retraction for the test [3].
- Pick the shortest length that gives the cleanest section [1]. Measure its height from the bed, or check the
; Calib_Retraction_tower: Z_HEIGHTcomment in the G-code preview, which states the length for each layer [1][2]. Right at a section edge, read the comment, because which length a boundary layer gets depends on rounding.
Klipper TUNING_TOWER and firmware retraction
On Klipper you can tune with firmware retraction instead: add a [firmware_retraction] section, set the slicer to use firmware retraction (G10/G11), and run TUNING_TOWER COMMAND=SET_RETRACTION PARAMETER=RETRACT_LENGTH … while printing any stringing test [4][6]. Klipper works out the value at each height as [4][5]:
- STEP_DELTA + STEP_HEIGHT: value = START + STEP_DELTA × floor(z ÷ STEP_HEIGHT).
- FACTOR: value = START + FACTOR × z, or in bands with BAND: START + FACTOR × (floor(z ÷ BAND) + 0.5) × BAND.
- SKIP: below SKIP the value stays at START, and z becomes max(z − SKIP, 0).
The calculator’s Klipper cases were checked against Klipper’s own calc_value code on 400 random inputs (18 Nov 2026), and the OrcaSlicer formula against its G-code generator on 406 layer heights: all matched. Values set with SET_RETRACTION are runtime changes, so copy the winner into [firmware_retraction] [6]. On Marlin with firmware retraction, M207 sets length, feedrate and Z lift, and its F value is in mm/min, so 35 mm/s is F2100 [7]; M208 sets the recover feedrate and any extra length [8].
Worked examples
- OrcaSlicer, direct drive defaults (0–2 mm, 0.1 step): the cleanest section is 8.7 mm high. floor(8.7 − 0.4) = 8 steps, so 0 + 8 × 0.1 = 0.8 mm (the section from 8.4 to 9.4 mm).
- OrcaSlicer, Bowden (1–6 mm, 0.2 step): the tower is 1.4 + 5 ÷ 0.2 = 26.4 mm tall. Clean from 12.0 mm: floor(11.6) = 11 steps, 1 + 11 × 0.2 = 3.2 mm.
- Klipper:
TUNING_TOWER COMMAND=SET_RETRACTION PARAMETER=RETRACT_LENGTH START=0.2 STEP_DELTA=0.2 STEP_HEIGHT=5 SKIP=1, strings stop at 18 mm: floor((18 − 1) ÷ 5) = 3, so 0.2 + 3 × 0.2 = 0.8 mm (the fourth band). - Marlin firmware retraction for 0.8 mm at 35 mm/s with 25 mm/s recovery and a 0.2 mm lift:
M207 S0.8 F2100 Z0.2andM208 S0 F1500.
If it still strings
- Dry the filament. Moist filament causes a lot of stringing, and OrcaSlicer’s wiki says to dry it if the top of the tower still strings [1][15]. See the filament drying calculator.
- Lower the nozzle temperature by 5–10 °C and check again [15].
- Check the hotend: a leaking or badly seated nozzle, or old residue on it, strings whatever the retraction [1][15].
- Travel settings: Prusa recommends leaving wipe while retracting on; avoid crossing perimeters lowers stringing, only retracting when crossing perimeters hides any oozing inside the walls, and a lower Z-hop also helps [15].
- Flexible filament (TPU) usually needs longer retraction because it stretches when pulled back, and can take a lot of tuning [15].
- For the last few wisps, Prusa suggests a heat gun at about 200 °C for one or two seconds [15].
Sources
- OrcaSlicer wiki: Retraction test. Defaults 0 / 2 / 0.1 mm for direct drive, 1 / 6 / 0.2 mm suggested for Bowden, shortest clean length, Calib_Retraction_tower comment, 0.2–0.4 mm if clean from the start, dry filament if the top strings.
- OrcaSlicer source: GCode.cpp. length = start + floor(max(0, z − 0.4)) × step and the Calib_Retraction_tower comment.
- OrcaSlicer source: Plater.cpp (calib_retraction). Tower cut at 1.0 + 0.4 + (end − start) ÷ step, layer height, 2 walls, 0% infill, firmware retraction off.
- Klipper docs: G-Codes (TUNING_TOWER, SET_RETRACTION). The three TUNING_TOWER formulas, SKIP, and SET_RETRACTION parameters.
- Klipper source: tuning_tower.py. calc_value() and the FACTOR vs STEP_DELTA/STEP_HEIGHT rules.
- Klipper Config Reference: [firmware_retraction]. G10/G11, defaults retract_length 0, retract_speed 20, unretract_speed 10 mm/s.
- Marlin docs: M207 Firmware Retraction Settings. S length, F feedrate in mm/min, Z lift.
- Marlin docs: M208 Firmware Recover. Recover feedrate and additional length.
- Bambu Studio profile: fdm_bbl_3dp_001_common.json. retraction_length 0.8, retraction_speed 30, deretraction_speed 30, z_hop 0.4, retract_length_toolchange 2 (the X1 Carbon, P1S, P1P, A1 and A1 mini 0.4 nozzle profiles use the same values).
- PrusaSlicer profiles: PrusaResearch 2.5.16.ini. MK4S, CORE One, XL, MK3S and MINI retract_length, retract_speed, deretract_speed and retract_lift.
- OrcaSlicer Creality profiles: fdm_creality_common.json (5 mm, 60 / 40 mm/s, z-hop 0.4) and the Ender-3, Ender-3 V2, Ender-3 V3 SE, Ender-3 S1 and K1C 0.4 nozzle files in the same folder.
- UltiMaker Cura: fdmprinter.def.json. retraction_amount 6.5 mm, retraction_speed 25 mm/s, warnings above 10 mm and 70 mm/s.
- UltiMaker Cura: creality_ender3s1.def.json. 0.8 mm at 40 mm/s.
- UltiMaker Cura: ultimaker_s5.def.json. 6.5 mm at 45 mm/s, prime speed 15 mm/s.
- Prusa Knowledge Base: Stringing and oozing. Causes, retraction settings, max 2 mm on MK2.5/MK3, MINI 3.2 mm, temperature, moisture, heat gun.
All sources fetched and checked 18 Nov 2026.
Related: temperature tower (lower temperature, less stringing) · pressure advance / linear advance · flow rate · e-steps & rotation distance (calibrate the extruder first) · filament drying (wet filament strings) · volumetric speed / max flow · PLA vs PETG vs ABS
FAQ
What retraction distance should I use for a direct drive extruder?
Start from your slicer’s profile: most direct drive printers use 0.7 to 1.2 mm (Bambu Lab 0.8 mm, Prusa MK4S 0.7 mm, Ender-3 V3 SE 1.2 mm in OrcaSlicer). OrcaSlicer’s retraction test covers 0 to 2 mm in 0.1 mm steps by default for direct drive.
What retraction settings for a Bowden printer like the Ender-3?
OrcaSlicer’s profiles use 4 mm for the Ender-3 and 5 mm for the Ender-3 V2, both at 60 mm/s; PrusaSlicer uses 3.2 mm at 70 mm/s on the Prusa MINI and Cura’s generic default is 6.5 mm at 25 mm/s. OrcaSlicer suggests testing Bowden extruders from 1 to 6 mm in 0.2 mm steps.
What retraction speed should I use?
Profiles mostly use 30 to 60 mm/s: Bambu Lab 30, Prusa MK4S 35, CORE One 45, Creality in OrcaSlicer 40 to 60. Prusa says a higher speed helps stringing but too high can make the extruder skip steps, and Cura warns above 70 mm/s.
How do I read the OrcaSlicer retraction tower?
Length = start + floor(height − 0.4) × step. With the defaults (0 to 2 mm, 0.1 mm step), a clean section at 8.7 mm means 0.8 mm. You can also find the Calib_Retraction_tower comment for that layer in the G-code preview.
What are Bambu Lab’s default retraction settings?
0.8 mm at 30 mm/s, with 30 mm/s deretraction and a 0.4 mm z-hop, for the X1, P1 and A1 series with a 0.4 mm nozzle in Bambu Studio. It also retracts 2 mm on a filament change.
How do I tune retraction in Klipper?
Add [firmware_retraction], set the slicer to firmware retraction (G10/G11), then run TUNING_TOWER COMMAND=SET_RETRACTION PARAMETER=RETRACT_LENGTH with START, STEP_DELTA, STEP_HEIGHT and SKIP. The value is START + STEP_DELTA × floor((z − SKIP) ÷ STEP_HEIGHT). Put the winner in [firmware_retraction].
Why does it still string with long retraction?
Usually moisture or too high a temperature. Dry the filament, lower the nozzle temperature by 5–10 °C, and check the nozzle is clean and not leaking. More retraction will not fix those.