Layer Height Calculator (Magic Numbers)
Pick your Z-axis lead screw and motor and see which layer heights land on whole motor steps — the so-called magic numbers — filtered to the range your nozzle prints well.
The formula
magic layer heights = full step × 1, 2, 3, …
A stepper motor has 200 (1.8°) or 400 (0.9°) physical positions per turn where the rotor is held firmly by the magnet poles. Between them the driver interpolates microsteps by feeding the coils fractional currents, which positions the rotor less accurately and with less holding torque. If every layer starts on a full step, the layer spacing is as consistent as the screw allows; if it starts on a microstep, the actual height can vary by a few microns from layer to layer, which shows up as faint banding on glossy walls.
Worked example
Ender 3: T8x8 lead screw (8 mm per revolution), 1.8° motor (200 steps), direct drive.
- Full step: 8 ÷ 200 = 0.04 mm
- Magic heights: 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32
- Not magic: 0.10 (2.5 steps), 0.15 (3.75), 0.25 (6.25), 0.30 (7.5)
That's why "0.2 mm" is the near-universal default — it's magic on almost every lead-screw printer — and why 0.15 mm prints sometimes look slightly worse than 0.16 mm despite being finer.
Finding your lead screw
Lead is the distance the nut travels per revolution and is what matters here. It's often confused with pitch, the distance between adjacent threads. A "T8x8" screw has 8 mm lead from four 2 mm-pitch starts; a "T8x2" has a single start with 2 mm pitch and 2 mm lead. Count the thread starts at the end of the screw: four starts on an 8 mm screw with 2 mm pitch means 8 mm lead.
| Printer | Z drive | Full step |
|---|---|---|
| Ender 3 family, Ender 5, CR-10, Neptune 3/4, Sovol SV06, Kobra | T8x8, 1.8° | 0.04 mm |
| Prusa MK3S, MK4, Mini | T8x8, 1.8° | 0.04 mm |
| Bambu Lab A1, P1, X1 | 8 mm lead screws, 1.8° | 0.04 mm |
| Voron 2.4 | Belted, 80:16 reduction, 20T GT2 | 0.04 mm |
| Voron Trident, many custom CoreXY | T8x4 or T8x2 | 0.02 / 0.01 mm |
| Older printers on M5 threaded rod | 0.8 mm pitch, 1.8° | 0.004 mm |
If you're on Klipper, the numbers are in printer.cfg under [stepper_z]: rotation_distance is the travel per revolution, gear_ratio is the reduction, and full_steps_per_rotation defaults to 200.
How much this really matters
Honestly: less than it used to, and less than the internet suggests. Modern stepper drivers (TMC2209 and up) interpolate microsteps smoothly, well-built Z axes with anti-backlash nuts take up most of the slop, and printers with a fine 2 mm lead have a 0.01 mm full step that makes every sensible height magic. If your printer is a Bambu, a Prusa, or a well-tuned Voron, choose the layer height by nozzle and detail and don't think about it.
It matters most on budget lead-screw printers with 0.04 mm steps, older A4988 drivers, and glossy filaments that show every ripple. There, choosing 0.16 or 0.24 instead of 0.15 or 0.25 is free and visible.
Choosing within the magic set
Layer height trades detail for time roughly linearly — 0.12 mm takes about 1.7× as long as 0.20 mm — and the nozzle sets the sensible bounds. Below about 25% of the nozzle diameter the melt is squeezed so thin that pressure and flow get erratic; above about 75% the bead can't be pressed firmly onto the layer below and layer adhesion suffers. For strength, bigger layers within that range bond better; for surface finish, smaller. The volumetric speed calculator shows how fast you can print each height before the hotend becomes the limit.
Frequently asked questions
What are magic layer heights?
Layer heights that are an exact multiple of the distance one full motor step moves the Z axis. On an Ender 3 (8 mm lead screw, 200-step motor) a full step is 0.04 mm, so 0.12, 0.16, 0.20, 0.24 and 0.28 mm are magic and 0.15 or 0.25 are not. Landing on full steps avoids relying on microstep positions, which hold position less precisely.
What's the formula for a full step in mm?
Full step = lead screw travel per revolution ÷ (motor steps per revolution × gear ratio). For the common T8x8 screw and 1.8° motor that's 8 ÷ 200 = 0.04 mm. For a T8x2 screw it's 0.01 mm, and for a 0.9° motor on an 8 mm lead it's 0.02 mm.
Does this matter on a Bambu Lab or Prusa printer?
Much less. Modern printers with good drivers, stiff Z axes and belted or fine-lead Z move microsteps accurately, and Bambu's and Prusa's default profiles use heights like 0.2 that happen to be magic anyway. It matters most on budget lead-screw printers with older drivers, where non-magic heights can cause faint banding.
What layer heights work with a 0.4 mm nozzle?
Roughly 25–75% of the nozzle diameter: 0.10–0.30 mm. Below that the melt is squeezed too thin and flow becomes unreliable; above it the bead doesn't bond well to the layer below. 0.6 mm nozzles work from 0.15–0.45 mm, 0.2 mm nozzles from 0.05–0.15 mm.
Should the first layer be a magic number too?
Ideally yes, and it should also be at least the Z full step so the nozzle can reach it. A first layer of 0.2 mm on a 0.04 mm full-step machine is fine; 0.3 mm (7.5 steps) is not. The calculator's list applies to first layers as well.
Last reviewed September 7, 2026. Spotted an error or want another calculator? Tell us.