Z Offset and First Layer Height
Z offset is the distance between the nozzle and the bed when the printer thinks it is at zero. Set it with your printer's own tool (Live adjust Z on Prusa, PROBE_CALIBRATE on Klipper, M851 or the probe wizard on Marlin), then fine-tune it while a first layer prints. Too high and lines do not stick; too low and plastic cannot flow out and the nozzle can clog.
What the test measures
The first layer is pressed between the nozzle and the bed, so its quality depends on how big that gap really is. Prusa describes first layer calibration as setting the vertical Z distance between the nozzle and the print surface. On a printer with a probe, the number you set is the probe's offset: Klipper defines z_offset as the distance between nozzle and bed when the probe triggers, and Marlin's M851 sets the distance from the nozzle to the probe trigger point.
Prusa shows what each extreme does: with the nozzle too high the filament does not stick, and with it too close the filament cannot flow out, which can lead to a clogged nozzle.
Prerequisites
- Clean nozzle and bed. Klipper's paper test starts with removing any plastic from both.
- Bed trammed first (bed screws, Z_TILT_ADJUST, QUAD_GANTRY_LEVEL or your printer's own routine); build the mesh after setting the Z offset. Klipper says to rerun BED_MESH_CALIBRATE after recalibrating the probe. See Bed Tramming, Probing and Mesh Compensation. Klipper notes that changing bed tilt (bed screws, Z_TILT_ADJUST, QUAD_GANTRY_LEVEL and similar) invalidates the probe calibration when the probe sits off to the side of the nozzle.
- A repeatable probe. Klipper's
PROBE_ACCURACYprobes ten times; it says a range above 25 microns Rule of thumb means the probe is not accurate enough for typical bed leveling. - The build surface you will print on. Klipper points out that tape and other surfaces have their own thickness, so measure each surface you use.
How to run it on your printer
Prusa
On printers with a loadcell (Prusa lists the CORE One, MK4/S, MK3.9/S and XL), the first layer is calibrated automatically. You can still fine-tune by long-pressing the knob during the first layer, but Prusa says that adjustment is not saved for the next print. Prusa also points to PrusaSlicer's Printer Settings, General, Z offset, where a negative value means a more squished first layer; that value only applies to G-code sliced with it.
On printers with a PINDA-type sensor, Live adjust Z is set during First Layer Calibration and can be changed while printing (LCD Menu, Live adjust Z) or at rest (LCD Menu, Settings, Live adjust Z). On those printers Prusa says the change made while printing is saved and stays after power off. Turning the knob counter-clockwise makes the value more negative and brings the nozzle closer. Prusa gives typical values of -1.500 to -0.200 Rule of thumb; a value that wants to go above zero points to a sensor or alignment problem, not a calibration one.
Klipper with a probe
- Home, move the head near the bed center and run
PROBE_CALIBRATE. - Klipper probes, moves the nozzle over that spot and starts the manual probe tool. If the nozzle does not end up over the probed point, abort and calibrate the probe's X and Y offsets first.
- Do the paper test: lower the nozzle until you feel a small amount of friction on a piece of copy paper. Do this with nozzle and bed at room temperature; Klipper says heating changes the nozzle position by roughly 100 microns, about the thickness of the paper Rule of thumb.
ACCEPT, thenSAVE_CONFIG.
Consequences to know: changing the motion system, hotend position or probe location invalidates the result, and recalibrating the probe also invalidates any bed mesh made with it, so run BED_MESH_CALIBRATE again afterwards.
Marlin
Marlin's PROBE_OFFSET_WIZARD is an option you can enable, which means rebuilding the firmware. Without it, and assuming your homed Z is 0.0 at the nozzle (this method gives a wrong result on a printer that homes Z with the probe): home Z, raise Z and deploy the probe, lower slowly while checking M119 until the probe triggers, negate the Z position M114 reports, set it with M851 Z and save with M500. Marlin notes most probes trigger below the nozzle and so have a negative Z offset.
Reading the result
Klipper's method: print a hollow square with straight walls at a coarse layer height (around 75 percent of the nozzle diameter Starting point), with the first layer at the same height and width as the rest, and no brim or raft. Let it cool and look at the bottom edge.
| Bottom layer looks like | Meaning | Change |
|---|---|---|
| Bulges out slightly on all sides | Nozzle slightly too close | Raise: Klipper's example is SET_GCODE_OFFSET Z=+.010 |
| Narrower than the layers above | Nozzle slightly too far | Lower with a negative SET_GCODE_OFFSET |
| Filament does not stick | Too far (Prusa) | Lower, see First Layer Won't Stick |
| Filament cannot flow out of the nozzle | Too close (Prusa), with a risk of clogging | Raise |
Klipper says these adjustments are typically tens of microns Rule of thumb. If unsure, lower the nozzle until a small bulge appears, then back off until it disappears.
Making a fine adjustment stick
- Klipper: add
SET_GCODE_OFFSETto your START_PRINT macro and have the slicer call that macro at the start of each print, as Klipper's bed level guide describes. - Marlin:
M290 Zbabysteps during a print. When BABYSTEP_ZPROBE_OFFSET is enabled in firmware, M290 also changes the probe Z offset, which can then be saved withM500. UseM290 P0if you do not want that side effect. - Prusa: Live adjust Z, as above.
Leave these alone while you test
- First layer height and first layer line width, so you are judging only the gap.
- Flow and extrusion multiplier. A squished-looking first layer is a Z problem first.
- Elephant foot compensation. Set Z first; then see Elephant's Foot.
- Bed temperature, unless the filament maker's range says otherwise.
Prusa adds one material note: PETG and other high-temperature materials can need a slightly different squish than PLA. Use Live adjust Z for that kind of fine-tuning; if you replaced the sensor or took the print head apart, run the full first layer calibration instead.
- Live adjust Z Prusa Research
- Bed level Klipper
- Probe calibration Klipper
- M851: XYZ Probe Offset Marlin Firmware
- M290: Babystep Marlin Firmware
Last reviewed 2026-11-05