Skip to content

Z-Offset Calibration: Setting the Exact Gap Between Nozzle and Bed

Why the printer’s idea of Z=0 rarely matches where the nozzle tip actually needs to sit, and how to close that gap with the paper test, a printed first layer, or your probe’s own calibration routine.

Z-Offset Calibration

Z-offset is the one number that decides whether your first layer sticks, squishes correctly, or gets scraped off the bed by a nozzle sitting too low. It answers one specific question: after the printer homes its Z axis and decides “this is Z=0,” how far off is that from the height where the nozzle tip needs to sit for a good first layer? Get that number wrong by a few tenths of a millimeter and you will see it right away, either as a print that will not stay stuck to the bed or as one where the nozzle drags and refuses to extrude cleanly.

The confusion comes from the fact that homing and touching the bed are not the same event. A microswitch, an inductive probe, or a strain gauge tells the firmware when Z homing is done, but that trigger point is rarely where the nozzle needs to be for extrusion. Z-offset corrects the raw homing position, and it is one of the last things to dial in, which is why the Essential 3D Printer Calibration, in the Right Order guide places it near the end of the sequence rather than the start.

What the printer actually means by Z=0

When a printer homes Z, it moves the nozzle down until a physical event happens, a switch closes, a probe pin retracts, or a load cell detects contact, and labels that position as the reference point for all further Z movement. That reference point is usually close to the real bed surface but not correct, once you account for nozzle length, hotend mounting tolerances, and how the bed sits relative to the frame. Z-offset shifts the whole coordinate system by a small, fixed amount so that when the slicer calls for Z=0.2mm, the nozzle actually sits 0.2mm above the physical bed, not above wherever the endstop happened to trigger.

This is why Z-offset lives separately from bed leveling. Leveling makes the bed parallel to the gantry. Z-offset sets the absolute distance at that reference point. A perfectly level bed will still print in mid-air or gouge the plate if the offset is wrong.

The paper test and the printed first layer test

The classic manual method is the paper test. Home the printer, move the nozzle to the center of the bed, slide a sheet of ordinary printer paper underneath, and lower Z in small steps while sliding the paper back and forth. You want the point where the paper starts to drag with slight resistance, not where it is pinned solid and not where it slides freely. That resistance point becomes your Z-offset. It costs nothing and it works, but it depends on feel, and people apply different amounts of drag.

The printed first layer test is more reliable and works the same way across Marlin, Klipper, and closed firmware machines alike. Print a simple pattern, often a grid or concentric squares, and read the extruded lines instead of trusting your fingers. Round, separated lines sitting on the bed like wire mean the nozzle is too high. Lines flattened past the point of texture, or turned glassy and thin, mean the offset has gone too low. The correct result is lines touching their neighbors, mildly flattened, and consistently opaque across the whole area, not glossy in one corner and starved in another, which points to a leveling problem instead.

How auto bed leveling probes change the picture

Add a BLTouch, CR Touch, or similar probe and there are technically two offsets in play, and mixing them up is the most common source of confusion. The probe triggers at a physical location offset from the nozzle tip, since the pin sits to the side and extends below or above the nozzle depending on mounting. That trigger-to-nozzle distance is the probe’s own offset, and it must be measured and stored on its own before you ever touch the fine first-layer adjustment.

In Marlin, the probe offset is set with the M851 command and saved to EEPROM with M500, so it survives power cycles unless reset deliberately. Klipper splits the two cases into separate commands: Z_ENDSTOP_CALIBRATE for a plain mechanical endstop, moving the nozzle down until it just touches the bed, and PROBE_CALIBRATE for BLTouch-style probes, which triggers the probe automatically and then asks for a manual fine adjustment to calculate the difference.

Closed firmware machines fold this into a guided wizard instead of raw commands. Bambu Lab printers call the value Nozzle Offset Z and let you fine-tune it live during a first layer, in steps as small as 0.01mm. Creality and similar brands offer a comparable calibrate Z offset menu, often paired with an auto leveling routine that measures the bed mesh first. The idea holds everywhere: the probe’s own trigger offset gets set once, while the fine Z-offset gets rechecked far more often.

Per-material offset is mostly a myth

A lot of forum advice claims TPU or other flexible filaments need their own Z-offset. Physically, that is not quite right. The distance between the nozzle tip and the bed does not change because you loaded a different spool. What changes is how much squish a material tolerates before it looks wrong or fails to stick. TPU compresses differently than PLA, so a layer reading as correctly squished for PLA can look under-squished for TPU, and printers set up for PLA sometimes get nudged a touch lower for flexible filaments as a workaround. That is a flow and adhesion tolerance issue dressed up as a Z-offset issue, and the Bed Adhesion guide and the First Layer Not Sticking guide are better starting points for it.

When you actually need to redo it

Z-offset is not a set-once value. Swapping nozzles, even to an identical model, changes the tip length by a small but real amount, so recalibrate after any nozzle change or after clearing a clog that involved removing the nozzle. Changing the bed surface, a new spring steel plate, a magnetic sheet, or a PEI sheet with a different texture, moves the physical reference point too, since surface thickness rarely matches between products. Reinstalling a BLTouch or CR Touch resets its trigger offset, so remeasure that before the fine offset means anything again. Firmware updates occasionally reset EEPROM values or change defaults, so check after any update touching probe or Z-axis settings.

Tuning it in practice

Start with the paper test or a printed first layer test to get close, then refine with live adjustment during an actual print if the machine supports it. Move in steps of around 0.05mm while still coarse, dropping to 0.01 or 0.02mm once the lines are close. A layer that looks too high, glassy, or shows gaps between lines with weak edge adhesion needs the value moved down, usually a more negative number in Marlin’s convention. Lines flattened past their texture, faint clicking as the extruder fights back-pressure, or a base spreading into the wide skirt known as elephant’s foot mean the value needs to go the other way. Judge the first three or four layers rather than just the first one, since some beds settle slightly as they heat up.

There is no universal correct number here, only a correct relationship between the nozzle, the bed surface, and whatever probe sits between them. Once it is dialed in, write it down somewhere outside the printer’s own memory. It is the kind of value you will want back fast the next time a nozzle swap or a new bed sheet throws it off.

Z-offset is a mechanical calibration, not a thermal one. If your hotend or bed temperature is oscillating instead of holding steady, that is a separate job covered in our guide to PID tuning.

Your next print can be better

Describe the symptom. Start with the most likely fix.

The troubleshooting hub narrows the library by print stage, material and the action you are comfortable taking.