How to set the Z offset and get a first layer that is just right

By Sina Esfahani, OmniTechs · Published 27 November 2026

The Z offset tells the printer where the nozzle really touches the bed. On a printer with a bed probe, it is the height difference between the point where the probe triggers and the tip of the nozzle. Get it wrong and the whole first layer is too high or too low by the same amount.

Set a rough value with a sheet of paper, fine-tune it while a one-layer test prints, and save it. Lines with gaps between them mean the nozzle is too high; squashed lines with ridges mean it is too low. Prusa printers with a LoadCell and Bambu Lab printers measure the height themselves, so there you only fine-tune.

One rule saves hours. If the first layer is wrong everywhere, fix the offset. If it is right in the middle and wrong in one corner, the offset is fine and the bed needs levelling (Marlin).

Set it in this order:

  1. Wipe all plastic off the nozzle tip and clean the plate; a blob makes every reading wrong.

  2. Find a rough value with paper at the centre of the bed: light drag, no tearing.

  3. Save it: M500 on Marlin, SAVE_CONFIG on Klipper.

  4. Print a single layer that covers most of the bed.

  5. Adjust in 0.02 to 0.05 mm steps until the lines touch with no gaps and no ridges.

  6. Save the final value and write it down for that build plate.

What your first layer says about the Z offset

Print one layer and look at it before you change anything. Bambu Lab's test is a 0.2 mm thick cube scaled to fill the plate.

Reading the test layer

Symptoms and fixes from the Marlin Z offset documentation and the Prusa and Bambu Lab first-layer guides, read on 27 November 2026.
What you seeWhat it meansWhat to do
Round lines with gaps, poor grip, across the whole bedNozzle too highLower it by 0.02 to 0.05 mm and test again
Thin, wide lines, ridges, nozzle scraping, almost no plasticNozzle too lowRaise it by 0.02 to 0.05 mm and test again
Right in the middle, wrong at the edges or in one cornerLevelling, not the offsetLevel the bed or measure a new mesh
Right today, wrong after switching offThe value was never savedSave it and check it (M503 on Marlin)
A babystep is lost after the next homingBabysteps are temporary on that setupApply the total to the stored offset
Fine when cold, wrong once the printer is warmProbe drift with temperatureNot an offset problem; see the probe guide

Aim for flat lines that just touch. Bambu Lab adds that small defects on about a tenth of the first layer usually do not affect the print.

Check your flow before you blame the offset. Over-extrusion looks just like a nozzle that is too low; the method is in the flow rate calibration guide. When in doubt, leave small gaps rather than excess plastic (an answer on the 3D Printing Stack Exchange).

Ricky Impey's video shows first layers at different Z offsets and what to look for while you dial it in.

Perfect Z Offset On Your 3D Printer - How to get it right! (Ricky Impey)

Which way is closer? The sign on each printer

The sign is the easiest part to get wrong. Most probes trigger while the nozzle is still above the bed, so Marlin stores a negative probe offset, and a more negative value brings the nozzle closer.

Which value brings the nozzle closer to the bed

Sign rules and ranges as published by Marlin, Klipper, Prusa and Bambu Lab, read on 27 November 2026.
Printer or settingCloser to the bedTypical values
Marlin probe offset (M851 Z)More negativeMarlin's own example is -1.42
Marlin babystep (M290 Z)Negative step, such as M290 Z-0.02At most 2 mm per command
Klipper live offset (SET_GCODE_OFFSET Z_ADJUST)Negative adjustmentSmall steps, such as -0.02
Prusa Live adjust Z (MK3S, MK3.5, MINI)More negative; knob counter-clockwise-0.2 to -1.5; positive is not possible
PrusaSlicer Z offset (LoadCell printers)Negative valueStored only in that G-code
Bambu Lab A1, G29.1 Z in the start G-codeLower value, such as -0.02 to -0.03-0.02 to 0 mm textured plate, -0.01 to 0.01 mm others
Bambu Lab P2S, First Layer Quality CalibrationDecrease, such as 0 to -0.01Increase by at most 0.05 mm in total

Klipper's stored z_offset in printer.cfg is normally a positive distance, and a larger value brings the nozzle closer. You rarely edit it by hand: Z_OFFSET_APPLY_PROBE subtracts your live adjustment from it, so the sign is handled for you.

If your printer homes Z on an endstop switch and has no probe, nothing applies the probe offset (Marlin). Adjust the endstop, babystep, or shift the print in the slicer. Slicers can move the whole print too: PrusaSlicer has a Z offset field under Printers, General. Cura has no built-in field; the free Z Offset plugin adds one under Build Plate Adhesion, where a positive value moves the print away from the bed.

Get a starting value with paper

Ordinary printer paper is about 0.1 mm thick (Klipper). It should move between nozzle and bed with light drag and without tearing.

  1. Wipe the nozzle tip. Klipper suggests removing plastic with metal tweezers.

  2. Home the printer and move the nozzle over the middle of the bed.

  3. Lower the nozzle in small steps until the paper drags. Marlin uses 0.1 mm, then 0.02 mm; Klipper uses TESTZ Z=-.1 and finer steps.

  4. Store the value and save it.

  5. Print the one-layer test and fine-tune from there.

Hot or cold? The makers disagree

Temperature for the paper test

Positions of the Marlin, Klipper and Prusa documentation, read on 27 November 2026.
SourceAdviceReason given
MarlinHeat nozzle and bed to printing temperature firstBoth grow a little when hot, so the test should match printing conditions
KlipperAlways test with nozzle and bed at room temperatureNozzle expansion is around 0.1 mm, about the paper's thickness; a hot nozzle smears plastic on the paper and can burn you
PrusaJudge the height on a printed pattern, not a number or calipersEach printer's value is unique and changes slightly with use

Both methods work, because the final adjustment happens on a print. Pick one and keep to it, so your readings stay comparable.

Marlin: set, babystep and save

On a probe printer, Marlin's paper method is:

  1. M420 S0 to switch levelling off, M851 Z0 to zero the offset, then G28 to home.

  2. Move to the bed centre and send M211 S0, so the nozzle may go below zero.

  3. Lower with G1 Z-0.1, then G1 Z-0.02, until the paper drags. Read Z with M114.

  4. Set it, for example M851 Z-1.42, then M211 S1 and M500.

On a display, the same edit is under Probe and Level, Probe Z Offset. If your firmware has the Probe Offset Wizard, Probe and Level, Z Probe Wizard runs the whole routine with menus. Teaching Tech's beginner's guide walks through probe offsets, including that wizard.

ABL offset guide including new probe Z offset wizard (Teaching Tech)

Babystepping is the quick way to fine-tune while the first lines go down: Tune, then Probe Z Offset or Babystep Z, or M290 from a host. A babystep on its own is lost at the next homing. With BABYSTEP_ZPROBE_OFFSET enabled, each babystep is added to the stored offset, but you still need M500.

Worked example (Marlin). Your offset is -1.40 and the first layer only looked right after M290 Z-0.05. Without BABYSTEP_ZPROBE_OFFSET, add the two yourself: send M851 Z-1.45, then M500. Check with M503, which lists the active M851 line.

Move in small steps. Babystepping ignores the endstops and M211 S0 disables the soft limits, and a nozzle driven into glass or PEI damages both (Marlin). Two more Marlin traps: on an endstop-homed printer, run G29 again after changing the offset, and Bed Z in Mesh Bed Leveling is a separate value from the probe offset.

Klipper: PROBE_CALIBRATE and making a babystep permanent

Home, move to the middle of the bed and run PROBE_CALIBRATE. Klipper probes automatically, moves the nozzle over the same spot and starts the paper test. Adjust with TESTZ, finish with ACCEPT and write the result with SAVE_CONFIG.

During a print, nudge the height with SET_GCODE_OFFSET Z_ADJUST=-0.02 (closer) or Z_ADJUST=0.02 (further). To keep the nudge, run Z_OFFSET_APPLY_PROBE, or Z_OFFSET_APPLY_ENDSTOP on an endstop machine, then SAVE_CONFIG.

Worked example (Klipper). The saved z_offset is 1.500. During the first layer you lower the nozzle twice with Z_ADJUST=-0.025, a total of -0.05 mm. Z_OFFSET_APPLY_PROBE subtracts that total from z_offset, so it becomes 1.550, and SAVE_CONFIG writes it to printer.cfg.

Klipper warns that changing the hotend position, the probe mount or the motion system invalidates the calibration. So does changing the bed tilt when the probe sits beside the nozzle. A bed mesh measured with the old calibration must then be measured again.

Prusa: Live adjust Z and LoadCell printers

On the MK3S, MK3.5 and MINI, run First Layer Calibration from LCD Menu, Calibration, First layer calibration, and fine-tune with Live adjust Z. During a print, press and hold the knob for a few seconds to open it. Turn counter-clockwise to come closer. The value is kept after power-off.

Smooth, satin and textured sheets differ in thickness, so Prusa stores one value per steel sheet profile, up to eight. Textured sheets are thinner, so the nozzle has to come a bit closer. The printer cannot sense which sheet is fitted: select the right profile under Settings, HW setup, Steel Sheets (MK3S) or Settings, Hardware, Steel Sheets (MK3.5, MINI).

On the CORE One, MK4/S, MK3.9/S and XL, the LoadCell sets the first layer automatically. A long press on the knob during the first layer fine-tunes it, but Prusa states that this tweak is not saved for the next print. For a lasting change, use the Z offset under Printers, General in PrusaSlicer.

Do not lower the nozzle to cure poor grip. Prusa warns that damage from a wrong Live adjust Z value is not covered by warranty. If the calibration pattern looks right, look for the cause elsewhere, as in first layer not sticking to the bed.

Bambu Lab: first-layer calibration and the start G-code

Bambu Lab printers measure the bed during calibration and, with Auto Bed Leveling switched on in the print dialog, again before each print. Bambu Lab's first step for a bad first layer is always a fresh calibration, not an offset.

  • A1 and A1 mini. A first layer that is too low usually means levelling was not run after a plate change, or the hotend has moved because its heater screws or buckle are loose. Check those only with the hotend below 50 °C and the printer switched off (Bambu Lab), and unplug it before you touch the screws. Only after checking those does Bambu Lab describe a temporary fix: in Printer Settings, Printer Start G-code, change G29.1 Z{-0.02} on the textured plate. Too high: go lower, for example to Z{-0.03}. Too low: go higher, for example to Z{-0.01}. Restore the default once the cause is fixed.

  • P2S. Run Auto Bed Leveling and High-temperature Bed Leveling under Setting, Calibration, Print Calibration. Then use Calibration, First Layer Quality Calibration: decrease the value if the first layer is too high, and increase it if it is too low, up to a maximum of 0.05 mm.

Select the plate you actually use. Bambu Lab's first-layer article says the printer lowers the nozzle by 0.04 mm only for the Textured PEI Plate, so slicing for another plate leaves the first layer too high. The A1 start G-code shown in the A1 guide uses 0.02 mm for the same purpose.

One value per plate and filament

A thicker or thinner plate changes the right offset. Prusa keeps one value per sheet. Klipper tells you to repeat the paper test for every surface you print on. Marlin adds that an inductive probe senses the metal under the sheet, so a thicker sheet needs a more positive offset by the difference.

For PETG, no source backs a large extra gap. Prusa says PETG needs slightly more squish than PLA, because it tends to lift. Forum users often ask about raising the nozzle for PETG instead; the accepted Stack Exchange answer calls an extra 0.2 mm gap illogical and keeps the normal paper gap. Print a one-layer PETG test on your own plate and let the lines decide. More settings are in the PETG print settings article.

If you swap plates or filaments often, keep the offset out of the printer and in the profile. A slicer-level offset, such as PrusaSlicer's, is written into each G-code file. It sits in the printer profile, so keep a copy of that profile for each plate or filament that needs its own value.

When to set it again, and when the offset is not the problem

Set it again after changing the nozzle, hotend or probe, after moving the printer, after a firmware reset such as M502 that cleared stored settings, and whenever the first layer is wrong everywhere (Marlin, Klipper, Prusa).

The offset is not the problem when the probe gives different readings at the same spot; see BLTouch and CR Touch probe offsets and failures. It is not the problem either when one area is wrong while the rest is right; see bed levelling: manual tramming versus an automatic mesh. And when the height is right but prints still let go, work through first layer not sticking to the bed, which starts with a clean plate.