Hardware & Maintenance

Bed leveling and Z-offset: how to level a 3D printer bed

Bed leveling keeps the nozzle the same height above the bed everywhere, and the Z-offset sets what that height is for the first layer. It's three jobs: tramming (making the bed mechanically parallel to the nozzle's path), mesh leveling (a probe maps what's left and the firmware compensates), and Z-offset (set by live-adjusting a real first layer). Miss one and the other two can't save you.

8 min read Updated October 2026 Beginner Hardware & Maintenance · 5 of 6
Quick fix
  1. Heat the bed and nozzle to printing temperature, and clean the nozzle tip and the plate.
  2. Tram the bed if it has screws: paper or a 0.1 mm feeler gauge at each corner, or let SCREWS_TILT_CALCULATE (Klipper) or G35 (Marlin) tell you how far to turn.
  3. Build a fresh mesh with your printer's bed leveling, BED_MESH_CALIBRATE or G29.
  4. Print a first-layer test and live-adjust Z in 0.01–0.02 mm steps until lines are flat and touching.
  5. Save the offset (Z_OFFSET_APPLY_PROBE + SAVE_CONFIG, or M500).

Tramming vs mesh leveling vs Z-offset

JobWhat it doesWhen to do it
TrammingMakes the bed mechanically parallel to the gantry with its adjustment screws or nutsAt setup, after moving the printer, after bed or gantry work
Mesh bed levelingA probe measures a grid of points; the firmware raises and lowers Z to follow the bed's shapeBefore every print on most modern printers, or whenever the plate or temperature changes
Z-offsetSets the nozzle-to-bed gap for the first layerAfter a nozzle, probe or sheet change, or when the first layer looks wrong

How to tram a 3D printer bed

Even with a probe, tram the bed if it has adjustment screws and is visibly tilted. The mesh can correct a tilt, but the less it has to correct, the better the first layer. Many Bambu Lab and Prusa printers don't need routine tramming; Bambu Lab, for example, only sends you to its manual bed leveling nuts during troubleshooting.

  1. Heat the bed (and nozzle) to printing temperature. Hot beds and frames sit at a slightly different height than cold ones.
  2. Home the printer, then disable the steppers so you can move the head by hand (or move it from the screen).
  3. Move the nozzle over the first adjustment screw and slide a sheet of printer paper or a 0.1 mm feeler gauge under it.
  4. Turn the screw until you feel light, even drag.
  5. Repeat at every screw, then go round again; adjusting one corner moves the others slightly.

Probe-equipped printers can do the measuring for you. On Klipper, SCREWS_TILT_CALCULATE (with a [screws_tilt_adjust] section configured) reports how many turns to give each screw. On Marlin builds with assisted tramming enabled, G35 does the same.

The paper test: what it can and can't tell you

The paper test is a fine way to get close. It's not a way to get it right.

  • Paper varies. Ordinary 80 gsm copy paper is about 0.1 mm thick, but brands differ, and humidity changes it.
  • "Light drag" is subjective. Two people can set the same printer 0.05 mm apart, which is a quarter of a typical first layer.
  • Temperature and ooze skew it. Cold tests are off once things expand, and a blob on the nozzle tip adds thickness.
  • A feeler gauge is more repeatable, but still only gets you to the starting line.

Ellis' tuning guide treats the paper test as a rough adjustment only. The final answer always comes from watching a real first layer, below.

Mesh bed leveling: how it works

The probe measures a grid of points (5×5 is a common default; odd counts give a centre point), and the firmware moves Z up and down during the first layers to follow that shape. Many setups also fade the correction out over the first several millimetres of height (Klipper's fade_start and fade_end, Marlin's fade height).

  • Bambu Lab: enable bed leveling when sending a print. On the A1, Bambu Lab says a full Auto Bed Leveling from the Calibration page is more thorough (21×21 points on the A1 vs 7×7 before a print) and strongly recommends it after changing the build plate, hotend or heatbed. Recent firmware can probe only the area under the print.
  • Prusa MK4 family, XL and CORE One: mesh bed leveling runs at the start of each print.
  • Klipper and Marlin: see the commands below. Adaptive meshing (Klipper's ADAPTIVE=1) probes only where the objects are, which needs [exclude_object] and object labelling enabled in your slicer.
BED_MESH_CALIBRATE ADAPTIVE=1   ; probe only the area this print uses
BED_MESH_PROFILE SAVE=default   ; optional: store a mesh to reuse
SAVE_CONFIG                     ; write stored profiles to printer.cfg
G28             ; home all axes
G29             ; probe the bed and build a mesh
M420 S1         ; or: turn on the mesh saved in EEPROM instead of probing

Bed probe types: BLTouch, CR Touch, inductive, load cell, eddy current

ProbeHow it senses the bedWorks onNotes
BLTouch and similarA pin drops, touches the bed and is pushed up; a Hall-effect sensor detects itAny surfaceSits beside the nozzle, so it needs X/Y offsets and a Z-offset
CR TouchThe same drop-pin idea, with optical detectionAny surfaceSet up like a BLTouch; common on Creality upgrades
Inductive (PINDA v2, SuperPINDA, generic sensors)Detects the metal under the sheet without touchingSteel sheets and metal bedsSensitive to temperature and sheet thickness; PINDA v2 has a thermistor for compensation, SuperPINDA is designed without one
Nozzle contact (load cell, strain gauge, force sensors)The nozzle itself touches the bed and a sensor feels the forceAny rigid surfaceMeasures the nozzle directly, so no separate Z-offset to set. Used by Prusa's MK4 family, XL and CORE One, Bambu Lab's X1, P1 and A1 series, and Creality's K1 and K2 Plus
Eddy current (e.g. BIGTREETECH Eddy, Beacon, Cartographer)Measures distance to the metal under the sheet with a magnetic fieldMetal beds and sheetsVery fast, dense scans; needs temperature compensation for drift. Some can also touch the bed to set Z-offset
No probe (manual mesh)You do a paper test at each grid pointAny surfaceMarlin's manual mesh bed leveling, or Klipper's BED_MESH_CALIBRATE METHOD=manual

On Klipper, eddy-current probes have their own scanning modes (METHOD=scan or rapid_scan), and Klipper's documentation warns about significant thermal drift, with TEMPERATURE_PROBE_CALIBRATE to correct it.

How to set the Z-offset (and baby-step it live)

A separate probe measures where its trigger point meets the bed, not where the nozzle tip is. The Z-offset is that difference. On every common system, a more negative value moves the nozzle closer to the bed (more squish).

  1. Get a rough offset first: Klipper's PROBE_CALIBRATE (paper under the nozzle, TESTZ, then ACCEPT), Marlin's M851, or your printer's Z-offset wizard.
  2. Print first-layer test squares spread around the bed. Ellis suggests a first layer of 0.25 mm or more and around 120% line width, which is more forgiving.
  3. Adjust live in 0.01–0.02 mm steps while it prints, until the lines are flat, touching, and still visible.
  4. Save the result so the next print starts there.
SET_GCODE_OFFSET Z_ADJUST=-0.01 MOVE=1   ; 0.01 mm closer, live during the first layer
Z_OFFSET_APPLY_PROBE                     ; afterwards: fold it into the probe z_offset
SAVE_CONFIG                              ; write it to printer.cfg (restarts Klipper)
M290 Z-0.01     ; babystep 0.01 mm closer while printing
M851            ; report the probe Z-offset
M851 Z-1.45     ; set a new probe Z-offset (example only)
M500            ; save to EEPROM

On Klipper printers with a separate Z endstop, use Z_OFFSET_APPLY_ENDSTOP instead. On Marlin builds with BABYSTEP_ZPROBE_OFFSET enabled, M290 also updates the probe offset, so M500 saves it directly.

  • Prusa MK4 family, XL and CORE One: the load cell sets the first layer automatically. For a temporary tweak, long-press the knob during the first layer (Live Adjust Z, reset after the print). For a permanent change, PrusaSlicer has a Z offset under Printer Settings → General.
  • Prusa MK3 series: Live Adjust Z is saved per steel sheet. Prusa gives typical values between about −1.500 and −0.200.
  • Bambu Lab: the nozzle-contact sensing sets the height. If the first layer is off, clean the nozzle tip and plate, check the plate for bulges, and run bed leveling from the Calibration page.

Not sure what "right" looks like? There's a good-first-layer checklist in first layer not sticking. Over-squished first layers also cause elephant's foot.

Your first-layer lines are round, with small gaps between them. Which way should you adjust the Z-offset?

  1. Raise the nozzle (a more positive offset)
  2. Lower the nozzle (a more negative offset)
  3. Leave Z alone and raise the bed temperature

Round, separate lines mean the plastic is being laid on top of the bed rather than pressed into it, so the nozzle is too high. Lower it 0.01–0.02 mm at a time until the lines are flat and just touching.

Free PrintPal toolG-code ViewerCheck the first-layer height and line width in your sliced file before you start tuning squishOpen tool

When to redo each step

What changedWhat to redo
Swapped the nozzle or hotendZ-offset. Nozzle-contact printers re-measure themselves; Bambu Lab recommends a full calibration-page leveling on the A1 after a hotend change
Swapped the build sheetFresh mesh; Z-offset too if the new sheet is a different thickness or your probe senses the metal underneath
Moved or bumped the printerTram (if it has screws), mesh, then check the Z-offset
First layer suddenly wrongClean nozzle tip and plate, fresh mesh, then Z-offset
Large enclosed printer, first prints of the dayMesh at full temperature after a heat soak; frames can drift as they warm
Problems start from layer 2 upwardProbably not leveling; see the calibration guide

Frequently asked questions

How do I level my 3D printer bed?

Heat the bed and nozzle to printing temperature, then tram the bed with its adjustment screws (paper or feeler gauge at each corner) if it has them. Run a bed mesh with your probe, print a first-layer test, and live-adjust the Z-offset until the lines are flat and touching. Save the new offset.

What is Z-offset on a 3D printer?

Z-offset is the correction between where the printer thinks the bed is and where the nozzle actually needs to be for the first layer. On printers with a separate probe it's the height difference between the probe's trigger point and the nozzle tip. A more negative value moves the nozzle closer to the bed.

Is the paper test accurate enough for bed leveling?

Only as a starting point. Paper is about 0.1 mm thick but varies, and the amount of drag is subjective. Use it for rough tramming or a first Z-offset, then fine-tune by watching a real first layer and adjusting in 0.01–0.02 mm steps.

Do I still need to level the bed if my printer has auto bed leveling?

Usually you don't need to tram it often, but it helps if the bed has adjustment screws and is visibly tilted, because the mesh then has less to correct. You still need a correct Z-offset, unless the printer senses the bed with the nozzle itself, as load cell and force-sensor printers do.

Related articles

Sources & further reading