Z offset

On this page 8

Z offset is the vertical correction value that tells a printer how far the nozzle actually sits from the build surface when the machine believes it is at Z = 0. In FDM printing, it is the single setting that determines how strongly the first layer is pressed into the bed, and therefore whether the print sticks, looks smooth and keeps accurate dimensions.

The value is usually small, typically between -0.05 mm and -2.5 mm depending on the probe design, and it is adjusted in steps of 0.01 to 0.025 mm. Because the first layer is often only 0.2 to 0.3 mm thick, an error of a few hundredths of a millimeter changes the result visibly, which makes the Z offset one of the most frequently tuned parameters on any fused deposition modeling machine.

The Z offset exists because the reference point the firmware uses is rarely the nozzle tip itself. A mechanical endstop, an inductive probe or a BLTouch-style pin probe triggers at a certain height, and the firmware treats that trigger as a known position. The offset is the measured distance between that trigger height and the height at which the nozzle should start laying plastic.

When the printer homes, it records the trigger position, then applies the offset so that commanded Z = 0 places the nozzle roughly one sheet of paper above the bed or slightly closer. With auto bed leveling, the probe also maps the bed surface at many points, but the mesh only describes relative height differences; the Z offset still supplies the absolute zero that the whole mesh is shifted by.

In Marlin firmware the value is stored as M851 Z for probe-based machines, while Klipper uses z_offset in the probe section and saves live adjustments with Z_OFFSET_APPLY_PROBE. Some machines with nozzle-contact sensing, such as load-cell or strain-gauge beds, measure the nozzle directly and need only a tiny residual offset to compensate for thermal expansion and the force needed to trigger.

Reference methods and typical offset values

The size and sign of the Z offset depend mainly on the homing reference. The following table compares common reference methods and the offsets they usually require.

Reference methodWhat triggersTypical offsetRepeatability
Mechanical endstopCarriage presses a microswitchOften 0 to -0.3 mm, set by screw or firmwareAbout 0.01 to 0.03 mm
Inductive probeMetal bed enters the sensing field-0.8 to -2.5 mmAbout 0.005 to 0.02 mm, varies with temperature
Pin probeDeployed pin touches the surface-1.0 to -2.5 mmAbout 0.005 to 0.01 mm
Nozzle contact sensingNozzle touches bed via load cell-0.02 to -0.1 mmAbout 0.005 mm with a clean nozzle
Z reference methods and typical offsets

A negative value moves the nozzle closer to the bed, and a positive value moves it away. Several printer interfaces display the sign inverted, so the safest rule is to watch the nozzle physically during the first adjustment rather than trusting the label.

Reading the first layer to judge the offset

The most reliable way to evaluate the Z offset is to inspect the first layer. A correct setting produces lines that are slightly flattened and fused together, with a uniform matte or satin surface and no gaps between adjacent extrusions. The table below links common first-layer symptoms to their cause and correction.

SymptomLikely causeCorrection
Round, separate lines that peel offNozzle too highLower by 0.02 to 0.05 mm
Gaps between lines, poor adhesionNozzle slightly highLower by 0.01 to 0.02 mm
Smooth, fused lines with even widthCorrect offsetSave the value
Transparent or thin layer with ridgesNozzle slightly lowRaise by 0.01 to 0.02 mm
Plastic plows sideways, nozzle scrapesNozzle far too lowRaise by 0.05 mm or more
Elephant foot on the finished partExcess first-layer squishRaise slightly, check bed temperature
First layer symptoms and offset corrections

Common calibration patterns include a single-layer square, a set of concentric rectangles or a first-layer grid covering the whole bed. Adjusting the offset live with babystepping while such a pattern prints is the fastest method, because the effect of each 0.01 mm step becomes visible immediately.

Several parameters influence the first layer, and they are often confused with the Z offset. Each one solves a different problem, so changing the wrong one masks the real fault instead of fixing it.

SettingWhat it controlsWhen to change it
Z offsetAbsolute nozzle height at Z = 0Wrong squish everywhere on the bed
Bed mesh levelingRelative height differences across the bedSquish varies between bed regions
First layer heightThickness of the first layer in the slicerNeed more tolerance for an uneven bed
First layer flowAmount of plastic extruded on layer oneCorrect height but under-filled or over-filled lines
Slicer Z offsetShift applied in the G-code onlyPer-profile tweak, for example for a textured sheet
Settings that affect the first layer

A firmware offset applies to every print on that machine, while a slicer-level offset applies only to jobs sliced with that profile. Mixing both is legitimate but should be documented, because a double correction is a common source of mysterious first-layer failures.

Factors that shift the offset over time

A Z offset that was perfect last week can drift, because it depends on physical conditions rather than being a permanent constant. The main reasons are:

  • Changing the build plate, for example from smooth PEI to a textured or glass sheet with a different thickness.
  • Swapping the nozzle or hotend, which changes the nozzle length below the probe.
  • Thermal expansion of the hotend, bed and frame; calibrating cold and printing hot can differ by 0.02 to 0.05 mm.
  • Inductive probe temperature drift, since the sensing distance changes as the probe warms up near a heated bed.
  • Plastic residue on the nozzle tip when the machine uses nozzle contact sensing.

Good practice is to calibrate at printing temperature, store separate offsets for each build surface where the firmware allows it, and re-check after any maintenance on the toolhead. A probe offset in X and Y is a different value that describes the horizontal distance between probe and nozzle; it must also be correct, or the mesh is applied to the wrong bed position.

Common mistakes when setting the Z offset

Most problems come from adjusting the offset to hide other faults. A warped bed, a loose probe mount or an inconsistent extruder can all produce symptoms that look like a wrong offset, yet no single offset value can correct them.

  • Tuning the offset in one corner only while the opposite corner is poorly leveled.
  • Forgetting to save the value with M500 or SAVE_CONFIG, so it is lost after a restart.
  • Using a paper test with a cold nozzle and expecting the same squish at 210 °C.
  • Moving the nozzle so low that it scratches the PEI sheet or blocks extrusion.

Stripped to the essentials

A 3D printer needs to know exactly where the bed is. Its sensor finds the bed, but the sensor is not at the same height as the nozzle. The Z offset is the small correction that closes this gap.

Think of writing with a pen. Press too lightly and the line skips. Press too hard and the paper tears. The Z offset sets how firmly the nozzle presses the first layer onto the bed. When it is right, the first lines look smooth and stick well. When it is wrong, the print fails in the first minute.

Where it is applied

A small product design studio runs four identical printers with pin probes and switches between smooth and textured PEI sheets depending on the job. The textured sheet is about 0.1 mm thicker, so parts printed on it after a sheet change came out with rough, over-squished first layers and visible elephant foot on snap-fit housings.

The technician printed a single-layer 100 mm square on each sheet at 60 °C bed temperature and adjusted the offset live in 0.01 mm steps. The smooth sheet settled at -1.62 mm and the textured sheet at -1.54 mm. Both values were stored as separate slicer profiles, and the snap-fit housings then assembled without filing, while first-layer failures across the four printers dropped to almost none.