Z Resolution Magic Numbers | PrintCalcLab
Find layer heights that are exact multiples of your Z-axis lead screw full step.
Your Z axis cannot move in arbitrarily fine increments — it advances in discrete steps determined by the leadscrew lead, the stepper motor's step angle, and the driver's microstepping. Choosing a layer height that is an exact multiple of that step distance (a so-called magic number) means every layer lands precisely on a step boundary instead of being rounded to the nearest one, which helps avoid subtle banding and periodic Z artifacts. This calculator finds your step distance and tells you whether a given layer height is magic.
How It Works
The step distance equals leadscrew lead ÷ (motor steps per revolution × microsteps). The defaults assume a 1.8° motor (200 steps per revolution) and 16× microstepping, the typical configuration for A4988 or DRV8825 drivers; 0.9° motors use 400 steps, and 32× microstepping is also common. With an 8 mm lead, that works out to 8 ÷ 3200 = 0.0025 mm per step. The calculator divides your layer height by this value: if the ratio is a whole number, the height is magic; otherwise it suggests the nearest layer height that is.
FAQ
What are magic numbers in 3D printing?
They are layer heights that divide evenly into whole motor steps on the Z axis. When the ratio is not whole, the firmware must round each layer move, and on tall prints the accumulated rounding can appear as periodic banding.
Which defaults should I change for my printer?
Set steps per revolution to 400 if your Z motor is a 0.9° type, and match the microstepping to your driver — 16 is typical for A4988 and DRV8825 boards, while many 32-bit boards run 32. The leadscrew lead is the distance traveled per full rotation.
My layer height is not magic — how bad is it?
Often invisible, especially with interpolating stepper drivers, but it costs nothing to fix: the suggestion never moves your layer height by more than half a step distance, so a profile usually shifts by only a few microns.
Do magic numbers matter for the X and Y axes too?
They matter for Z because the layer height is repeated identically thousands of times, so any rounding error recurs at a fixed vertical interval and becomes visible. X and Y positions vary continuously across each layer, so rounding there does not accumulate into a periodic pattern.
Related Topics
- z resolution
- magic numbers
- layer height