Back to Tools

Optimal Layer Height Calculator

Find the "Magic Numbers" for your 3D printer to reduce Z-banding and improve print quality.

Printer Hardware

Why does this matter?
Using layer heights that match full steps of your Z-motor avoids reliance on micro-stepping holding torque, leading to more consistent layers and less "banding".

Optimal Heights

Full Step Z-Move
0.0400 mm

Recommended Layer Settings:

0.04 mm1 full steps
0.08 mm2 full steps
0.12 mm3 full steps
0.16 mm4 full steps
0.20 mm5 full steps
0.24 mm6 full steps
0.28 mm7 full steps
0.32 mm8 full steps
For an Ender 3 (TR8x8, 1.8° motor), 0.12mm, 0.20mm, and 0.28mm are classic "Magic Numbers".

What are Magic Numbers?

"Magic Numbers" are layer heights that correspond exactly to full steps of your printer's Z-axis stepper motor.

Stepper motors move in discrete steps (usually 200 per rotation). While "microstepping" allows them to stop between steps, the holding torque at these intermediate positions is weaker and less precise.

If your layer height requires the motor to hold a position at 63% of a step, gravity or vibration might cause it to settle into the nearest full step, resulting in a layer that is slightly too thick or too thin. This repeats regularly, creating visible horizontal lines known as Z-Banding.

A note on modern drivers: Many newer printers use TMC2208/2209 stepper drivers with 256× interpolation. These produce smoother motion between full steps, which makes magic numbers less critical in practice. The positional error from interpolation is only about 0.006mm. That said, full-step positions still have the highest holding torque and accuracy, so using magic numbers never hurts and can still help on printers with visible Z-banding.

How to Choose

Detail Mode (0.08 - 0.12 mm)

Use for miniatures or high-detail parts. Printing takes much longer, but layer lines are barely visible.

Standard Mode (0.16 - 0.20 mm)

The sweet spot for most prints. Good balance of speed and quality. 0.20mm is the industry standard.

Draft Mode (0.24 - 0.28 mm)

Fast printing for functional parts where aesthetics don't matter as much. Stronger parts due to fewer layer interfaces.

The Rule of Thumb

Keep layer height below 80% of your nozzle diameter. For a 0.4mm nozzle, do not exceed 0.32mm layers.

Layer Height by Nozzle Size

As a rule of thumb, keep your layer height between about 25% and 75–80% of your nozzle diameter, with roughly 50% as the balanced sweet spot. Below ~25% the nozzle struggles to lay a clean line; above ~80% there isn't enough downward squish to fuse layers, which weakens adhesion. For a standard 0.4 mm nozzle that means a practical range of 0.10–0.32 mm, with 0.20 mm the common default.

NozzleMin (~25%)Typical (~50%)Max (~75–80%)
0.2 mm~0.05 mm~0.10 mm~0.15 mm
0.4 mm~0.10 mm~0.20 mm~0.32 mm
0.6 mm~0.15 mm~0.30 mm~0.45 mm
0.8 mm~0.20 mm~0.40 mm~0.60 mm

These are rule-of-thumb ranges (the percentage rule applied per nozzle), not hard limits. Your slicer, material and cooling all shift what actually prints cleanly.

First Layer Height

Set the first layer thicker than the rest, commonly 100–150% of your layer height (for example 0.20–0.30 mm for a 0.20 mm print). A taller first layer stays molten longer so it bonds to the bed, and it is far more forgiving of small bed-level or Z-offset errors. Avoid going below about 0.15 mm on the first layer.

Related tools and guides

Describe a part. Get a printable model.

GrandpaCAD turns a text prompt into a ready-to-print 3D model. Functional parts, organic shapes, multi-color prints. No CAD skills needed.

"Generate a layer-height test tower with stepped sections, a curved surface, a 45-degree overhang and small embossed numbers on each step, so I can compare surface finish across layer heights on my printer."

3 free generations, no card required
Watch GrandpaCAD demo