Motor steps per turn
Nozzle
Microsteps
Nearest magic layer
0.16mm

This height is not a whole number of steps. Better pick the nearest magic one.

Magic below0.12 mm
Magic above0.16 mm
Z travel per full step0.0400 mm
Steps per mm (Z)400.00
Sensible range for the nozzle0.10-0.32 mm
Magic layers for this nozzle
0.120.160.200.240.280.32

Applies to printers with a lead screw or threaded rod on Z. On printers whose firmware rounds the motion itself, the difference is usually small.

How the magic layer heights are worked out

Formula

full step [mm] = screw lead / (motor steps per turn x ratio)
magic layer = n x full step
sensible layer ≈ 25-80% of the nozzle diameter
steps per mm = microsteps / full step

A stepper motor stops most accurately on full steps. Positions in between, the microsteps, are less repeatable because they depend on the coil current and the load. If a layer is a whole number of steps, every layer has the same thickness.

Travel per full step depends on the Z screw lead and the motor. A T8 screw with an 8 mm lead (four starts) moves the nut 8 mm per turn, and a 1.8° motor makes 200 steps per turn, so one step is 0.04 mm.

The nozzle limits layer height too. The usual range is about 25% to about 80% of its diameter: thinner layers lay down poorly, thicker ones bond badly.

With fine screws, such as a T8 with a 2 mm lead, the full step is so small that practically every common layer is magic. It matters most with 8 mm leads and threaded rods.

Example on the default values (T8 with 8 mm lead, 1.8° motor, 0.4 mm nozzle)

  1. Full step: 8 mm / 200 = 0.04 mm.
  2. A 0.15 mm layer is 3.75 steps, so the nearest magic heights are 0.12 and 0.16 mm.
  3. For a 0.4 mm nozzle (range 0.10-0.32 mm) the magic layers are: 0.12, 0.16, 0.20, 0.24, 0.28, 0.32 mm.
  4. At 16 microsteps the Z axis has 400 steps per mm.
  5. With a 2 mm lead screw the full step is 0.01 mm, so a 0.15 mm layer is magic as well.

Full step for common Z drives (1.8° motor, 0.4 mm nozzle)

DriveFull stepSteps per mm (16 microsteps)First magic layers
T8 lead screw, 8 mm lead0.0400 mm4000.12, 0.16, 0.20, 0.24, 0.28, 0.32
T8 lead screw, 4 mm lead0.0200 mm8000.10, 0.12, 0.14, 0.16...
T8 lead screw, 2 mm lead0.0100 mm1,6000.10, 0.11, 0.12, 0.13...
M5 threaded rod (0.8 mm)0.0040 mm4,0000.10, 0.12, 0.14, 0.16...
M8 threaded rod (1.25 mm)0.0063 mm2,5600.10, 0.15, 0.20, 0.25...

Practical tips

  • Check the T8 lead by counting the starts: looking from the side, count the grooves over 8 mm, or measure how far the nut moves in one turn.
  • Set both the layer height and the first layer height in the slicer to a magic value, and turn off variable layer height if you are fighting banding.
  • Banding on walls has other causes too: a bent screw, nut backlash, swings in bed temperature or flow. A magic layer removes only one of them.
  • On Klipper or Marlin printers steps per mm are set in the configuration. Change them only after changing the screw, motor or microstepping.

Video tutorials: print it well

Short tutorials from my BnB3D channel (Polish audio, English subtitles).

Free 3D-printable QR code generator – Wi-Fi, reviews, keychain and magnet
Free 3D printed cookie cutter generator – from any shape
All tutorials on YouTube

Handy for this tool

Affiliate links: if you buy something I get a small commission, and you pay the same. As an Amazon Associate I earn from qualifying purchases.

Frequently asked questions

What are layer height magic numbers?+

Heights at which the Z axis moves by a whole number of motor steps. Every layer then has exactly the same thickness, with no rounding to a microstep position.

Will a non-magic layer ruin the print?+

Usually not, because microstepping lets the motor stop between full steps. Those positions can be less repeatable, though, which sometimes shows as faint banding on walls. A magic layer removes that cause.

What magic layer for a T8 screw with an 8 mm lead?+

With a 1.8° motor, multiples of 0.04 mm: 0.12, 0.16, 0.2, 0.24 and 0.28 mm. The popular 0.15 mm is not magic, so 0.16 mm is the better choice.

Do Bambu Lab or Prusa printers need magic layers?+

Manufacturers tune their default profiles to their own Z drive, so usually nothing needs changing. The calculator helps with your own profiles, modifications and DIY printers.

Doesn't microstepping solve the problem?+

It helps, because it allows any height, but a microstep position depends on the load and is less repeatable than a full step. So with banding on walls it is worth checking the magic height first.