Slicing & Settings

Layer height, walls and line width: what to set and why

For a 0.4 mm nozzle, start with 0.2 mm layers, a line width of about 0.42–0.45 mm and three walls. Keep layer height between roughly 25% and 80% of the nozzle diameter, keep line width between 100% and 150% of it, and add walls (not infill) when a part needs to be stronger.

8 min read Updated October 2026 Beginner Slicing & Settings · 1 of 4
In short
  1. Layer height: 0.2 mm on a 0.4 mm nozzle for everyday prints, 0.10–0.16 mm for detail, up to about 0.28 mm for drafts.
  2. Strength: keep layers at or below half the nozzle diameter (0.2 mm on a 0.4) for strong parts. Thinner than that adds time, not strength.
  3. Walls: 3 for everyday parts, 4–6 for functional ones. Walls add more strength per gram than infill.
  4. Line width: 100–120% of the nozzle is normal; up to about 150% prints stronger, faster walls if your hotend keeps up.

What layer height should I use?

Layer height is the thickness of each printed slice. It sets vertical resolution, how smooth slopes and curves look, and print time. Time scales roughly with the inverse of layer height, so 0.1 mm layers take about twice as long as 0.2 mm layers.

The usable range depends on the nozzle. A widely used rule is 25% to 80% of the nozzle diameter; Prusa recommends staying below 80% and doesn't recommend going below 0.10 mm on a standard 0.4 mm nozzle, because the visible gain is tiny.

NozzleMinimum (~25%)Common rangeMaximum (~80%)
0.2 mm0.05 mm0.06–0.12 mm0.16 mm
0.4 mm0.10 mm0.12–0.28 mm (0.20 default)0.32 mm
0.6 mm0.15 mm0.20–0.40 mm0.48 mm
0.8 mm0.20 mm0.30–0.56 mm0.64 mm

Near the top of the range, the nozzle can no longer press each layer into the one below, so bonding and surface quality drop. Near the bottom, tiny Z errors become a large percentage of each layer and print time balloons.

What changes when you change layer height

  • Print time: roughly inverse. Halve the layer height and you roughly double the time.
  • Slopes and curves: thinner layers reduce stair-stepping. This is the most visible difference.
  • Vertical walls: very little visible change between 0.12 and 0.28 mm. Vertical wall finish is dominated by ringing, extrusion consistency and seams.
  • Strength: CNC Kitchen tested hooks at 0.05–0.4 mm with a 0.4 mm nozzle. Everything from 0.05 to 0.2 mm performed about the same (0.15 mm slightly best); 0.3 mm layers held only about half the load between layers, and 0.4 mm almost nothing. Past half the nozzle diameter, strength starts to suffer.
  • Overhangs and bridges: moderate layers (around 0.15–0.2 mm on a 0.4) usually look best; in CNC Kitchen's test, 0.05 mm layers even discoloured because the plastic stayed molten so long.

You don't need one layer height for the whole part. Variable layer height in PrusaSlicer, adaptive layer height in Bambu Studio and OrcaSlicer, and adaptive layers in Cura use thin layers only where the surface curves and thick ones where it's straight.

Magic numbers: do they still matter?

A "magic number" is a layer height that is an exact multiple of the Z axis's full step. The full step is the screw lead divided by the motor's steps per revolution:

  • 8 mm-lead screw with a 1.8° motor (200 steps): 8 ÷ 200 = 0.04 mm, so 0.12, 0.16, 0.20, 0.24, 0.28 mm.
  • The same screw with a 0.9° motor (400 steps): 0.02 mm.
  • 2 mm-lead screw with a 1.8° motor: 0.01 mm, so almost any layer height is "magic".

Microstepping lets the motor stop between full steps, but those positions are less precise, which can show as a subtle uneven pattern on tall smooth walls. On printers with fine screws, 0.9° motors or well-tuned drivers you'll rarely see a difference. Plug your own hardware into the calculator below to check.

Free PrintPal toolLayer Height CalculatorEnter your lead screw and motor to get your full-step height and magic numbersOpen tool

How many walls (perimeters) do you need?

Walls (Cura's Wall Line Count, PrusaSlicer's Perimeters, Bambu Studio's and OrcaSlicer's Wall loops) are the outlines of each layer. They carry most of the load in bending and twisting, because material far from the centre resists bending best.

WallsUse caseResult
1Vase (spiral) mode, lampshadesFast and light; fragile
2Decorative parts, propsThe default in most slicers; fine for low loads
3General purposeA good everyday default
4–6Brackets, mounts, tools, hingesLarge strength gain for modest extra time
7+Small, heavily loaded partsNear-solid; infill barely matters any more

CNC Kitchen's hook tests show why walls come first: at the same line width, two walls failed at about 20 kg and four walls at about 33 kg. If you're tempted to raise infill to 60% to make a part stronger, try five walls first; it's usually stronger, lighter and faster. The infill guide covers what infill is still good for.

A PLA bracket printed with 2 walls and 20% infill keeps cracking. What should you change first?

  1. Raise infill to 60%
  2. Raise walls to 4–5
  3. Raise layer height to 0.32 mm

Walls carry most of the bending load, so extra walls add more strength per gram than extra infill. Thicker layers would make it weaker: past half the nozzle diameter, layer bonding drops.

Top and bottom layers

Top and bottom layers are horizontal walls. Too few top layers leave pillowing: bumpy, holey top surfaces sagging between infill lines. Multiply layer count by layer height to get shell thickness and aim for roughly 0.8–1.2 mm on top (for example 5 layers at 0.2 mm) and 0.6–0.8 mm on the bottom. Low infill needs more top layers to bridge across the gaps.

Arachne vs classic walls

The Arachne wall generator varies line width along a wall so thin and tapering features fill cleanly instead of leaving gaps or tiny gap-fill moves. Cura (since 5.0) and PrusaSlicer (since 2.5) use it by default; Bambu Studio and OrcaSlicer offer it as Wall generator: Arachne. The classic generator keeps every line the same width, which some people prefer for dimensionally critical parts.

Line width (extrusion width) explained

Line width is how wide each extruded line is laid down. It isn't locked to the nozzle: the slicer changes flow so the plastic squishes out to the width you ask for. Most slicers default to 100–120% of the nozzle, and Prusa suggests about 110% as a sweet spot.

  • Wider than the nozzle (up to about 150%) squeezes each line harder into the one below. CNC Kitchen measured layer adhesion rising up to about 150% width, with surface quality unchanged up to about 140%. Two walls at 200% width were roughly twice as strong as two walls at 100%, in the same print time.
  • Narrower than the nozzle (down to about 90%) can sharpen fine details and small text, at the cost of time.
  • The catch is flow. Wider lines and thicker layers push more plastic per second: 0.2 mm × 0.45 mm at 200 mm/s is 18 mm³/s, which is beyond many standard hotends. See cooling, speeds and acceleration.
Free PrintPal toolVolumetric Flow CalculatorCheck if a layer height, line width and speed fit your hotendOpen tool

Typical per-feature line widths (0.4 mm nozzle)

Bambu Studio, OrcaSlicer, PrusaSlicer and Cura all let you set widths per feature. A typical setup:

FeatureLine widthWhy
First layer0.45–0.50 mmMore contact area for bed adhesion
Outer wall0.40–0.42 mmClean, accurate surface
Inner walls0.45 mmStronger walls with no visible cost
Top surface0.40–0.42 mmSmooth top finish
Sparse infill0.45–0.60 mmFewer, stronger lines; faster
Support0.40–0.42 mmEasy to remove

How layer height, walls and line width interact

Wall thickness is wall count × line width (roughly; adjacent lines overlap a little). Three walls at 0.45 mm make about a 1.35 mm shell; five walls make about 2.25 mm.

When you design a part, make thin walls a clean multiple of your line width: a 1.6 mm wall fits four 0.4 mm lines, while a 1.5 mm wall forces gap fill or Arachne's variable widths. The 3D printing design guide covers minimum wall sizes and clearances.

Layer height and line width multiply into flow, and flow is the real speed limit. Raising both at once is how "draft" profiles get fast; it's also how they hit the hotend's melt limit and start under-extruding.

Recommended presets by use case (0.4 mm nozzle)

Use caseLayer heightWallsLine widthInfill
Fast draft0.28 mm20.45 mm10–15%
Everyday default0.20 mm30.42–0.45 mm15%
Detailed model0.12 mm30.40–0.42 mm15%
Strong functional part0.16–0.20 mm50.45–0.55 mm25–40% gyroid or cubic
Display piece0.08–0.12 mm30.40 mm10%
Vase mode0.20–0.30 mm10.50–0.60 mm0%

Frequently asked questions

What is the best layer height for a 0.4 mm nozzle?

0.2 mm is the standard default. Use 0.10 to 0.16 mm for detailed models and up to about 0.28 mm for fast drafts. Stay at or below about 0.32 mm (80% of the nozzle), and at or below 0.2 mm when layer strength matters most.

Are thinner layers stronger?

Not really. In CNC Kitchen's tests with a 0.4 mm nozzle, layers from 0.05 to 0.2 mm performed about the same, with 0.15 mm slightly ahead, while 0.3 mm layers held only about half the load between layers. Thin layers mainly buy smoother slopes at the cost of print time.

How many walls should a 3D print have?

Two walls is the default in most slicers and is fine for decorative parts. Three is a good everyday setting, and four to six suits functional parts. Adding walls raises strength more efficiently than adding infill.

What line width should I use?

Most slicers use 100 to 120% of the nozzle diameter, about 0.40 to 0.48 mm on a 0.4 mm nozzle. Going up to about 150% gives stronger walls if your hotend can supply the extra flow, and going slightly below 100% helps fine detail.

Do magic numbers for layer height still matter?

Only on printers with a coarse Z full step, such as an 8 mm-lead screw driven by a 1.8° motor, which moves 0.04 mm per full step. If you see uneven layer lines on such a machine, pick layer heights that are multiples of that step; most modern printers look fine at any common layer height.

Related articles