I have what I thought would be a simple question.

I don't have an auto leveling probe, I do my leveling manually with 4 screws and a piece of paper (I measured the thickness to 0.1 mm).

For the longest time I would have trouble with the first layer, sometimes having to give the bed screws a quarter turn to bring the bed up a bit. I would see that the nozzle seemed quite far away from the bed. This went on for the longest time and I just chalked it up to the quality of my printer.

I realized recently that when I level the bed, I am inserting a piece of paper in between the nozzle and the bed. Obviously, I should be taking the thickness into account as a 0.1mm thick piece of paper accounts for 50 % higher than the nozzle should be for a 0.2 mm first layer height.

My question is, how do I set (either in Cura or directly in Marlin config) the z home offset to account for the 0.1 mm thickness of my calibration paper?


4 Answers 4


It is preferred to get the distance correct by hardware changes (leveling screws). But it is possible to do it with software. You can not only change the Z offset in the slicer or in the configuration of Marlin, but also with G-code commands.

The "paper drag" method is perfect for determining the correct Z level. Once you leveled with the paper, you do not need to create an offset to account for the paper thickness, however, there are purists that do that. So basically, what we call Z=0 is in fact Z="paper thickness", unless you are a purist. But a slightly larger gap makes printing much easier. Too small heights cause e.g. rippling effects or too much pressure build-up in the nozzle. In order to change your offset after leveling, you could try one of the following methods. This is sometimes a useful method for creating a little extra offset for printing PETG, but personally I do not do that.

In Ultimaker Cura: Open the plugin manager ("Toolbox"->"Browse packages...") and install "Z Offset Setting", a new parameter will be available in the "Build Plate Adhesion" settings menu called "Z Offset". (See also this older, not up-to-date answer)

In Marlin configuration file, modify the MANUAL_Z_HOME_POS constant:

//#define MANUAL_Z_HOME_POS 0

In G-code:

By adding the following lines to your start G-code (see e.g. this answer) using the G92 G-code command:

G0 Z0.2 ; Move the head to 0.2 mm (so now 0.3 on your machine)
G92 Z0  ; Call this Z = 0

or when you are able to connect to the printer over USB using a printer terminal (e.g. Pronterface, Repetier or OctoPrint) using the M206 G-code command:

Use M206 to apply a persistent offset to the native home position and coordinate space. This effectively shifts the coordinate space in the negative direction.

M206 Z-0.2 ; Will raise the Z height by 0.2 mm
M500       ; Stores the offset in memory

Alternatively, when you cannot connect through a terminal, putting the last 2 lines in a text file and saving that as a .gcode file on an SD card and "printing" the file will also store the new offset (if M500 is enabled in the configuration file: #define EEPROM_SETTINGS // Enable for M500 and M501 commands)

  • $\begingroup$ I had seen the plugin for cura but it felt hacky to me especially since this seems like it would be a universal requirement for everyone without auto bed leveling. Is this what everyone else does?? $\endgroup$ Oct 23, 2018 at 20:38
  • $\begingroup$ @MatthewGoulart Preferred solution is to correctly level the bed from a hardware point of view (what most people do). From the software solutions I prefer the M206 / M500 as this stores this for all models you print. If you do it in the slicer or startcode, you need to remmeber that, e.g. when you change slicer. $\endgroup$
    – 0scar
    Oct 23, 2018 at 20:53
  • $\begingroup$ Sorry if this question has an obvious answer, but how would you level it on a hardware level? Are you saying I give the screws an extra 1/8 of a turn after leveling with the paper? $\endgroup$ Oct 23, 2018 at 21:04
  • $\begingroup$ When you say "Once you leveled with the paper, you do not need to create an offset to account for the paper thickness" are you implying that most people just ignore the offset introduced by the paper? Are you saying I should just not take it into account? $\endgroup$ Oct 23, 2018 at 22:26
  • 1
    $\begingroup$ @MatthewGoulart - Yeah, just ignore it. The paper width is your zero starting point. $\endgroup$
    – Greenonline
    Oct 23, 2018 at 22:36

Based on Oscar's solution using M206, I found it convenient to add in my MicroSD card a hierarchy of such gcode files to set the Z offset to every possible value in some range. For example, "printing" the file z_offset/1mm/1mm2/1mm275.gcode will set (permanently) the Z offset to 1.275 millimeters.

This hack is a workaround to the lack of Z offset setting in the printer's menu, and is an alternative to "hardware" Z tuning by moving the endstop. It can be useful when using different build plates with varying thickness, or attaching a pen or any other tool to the print head.

Here is a simple bash script which creates the files taking the MicroSD card location as argument:

#!/bin/bash -e

mkdir $1/z_offset

for i in {9..0}
    mkdir $1/z_offset/"$i"mm
    for j in {9..0}
        mkdir $1/z_offset/"$i"mm/"$i"mm"$j"
        for d in 00 25 50 75
            echo -e \
                 M206 Z-$i.$j$d\\nM500\\nM117 Z-offset="$i"."$j$d"mm \

I chose a 0.025mm resolution, as 0.1mm is slightly to coarse to adjust for first layer issues. Tested successfully on a Creality Ender 3 printer (which seems to have a 0.015mm resolution on the Z-axis).


Assuming you already know your Z-offset value, there are several ways to set Z-offset for your printer:

  • on printer's display

    On the printer's LCD, navigate to Control > Motion > Z Offset. Here you can set the Z-Offset value. Next, navigate to Control > Store settings to store this offset permanently to EEPROM.

    The location of this setting may vary depending on the printer and firmware, but it is usually located in the Control section.

  • in slicer

    Z-offset value can be set in slicer, from where it will be added at the beginning of each generated G-code file.

    • PrusaSlicer

      Navigate to Printer Settings > Size and coordinates > Z offset. Requires an advanced view mode.

      PrusaSlicer Z-offset setting

    • SuperSlicer

      Navigate to Printer Settings > Size and coordinates > Z offset. Requires an expert view mode.

      SuperSlicer Z-offset setting

    • Cura

      Navigate to Print settings > Build Plate Adhesion > Z Offset. Requires Z Offset Setting plugin installed.

      Cura Z-offset setting

  • in G-code

    It can be set with M851 command, followed by M500 to store it in the EEPROM. For example:

   M851 Z-0.69;
  • in firmware

    In Configuration.h, find NOZZLE_TO_PROBE_OFFSET and set third parameter (Z-offset):

       -53.5,   // X-offset
       8,       // Y-offset
       -0.69 }  // Z-offset <-- set it here

I usually set it via printer's display, since it seems like the fastest and most practical way.


You don't! Level the bed such that you know the nozzle is above the bed. Stop the print. Disable the steppers. Let it all cool down. Tram the bed (or what you call level). Then start the print again. It doesn't matter what first layer height your slicer thinks it is. All that matters is that it sticks and doesn't elephant foot. Note, if you are using glue stick or white glue (like I do) the thickness of the glue layer will be different between the edge of the glass (I assume you're using glass, otherwise you're never going to get a good tram) and the starting position of the prints.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .