Calibration
First-Layer Squish, Line Width, and Z-Offset Calibration
Key takeaways
- True first-layer nozzle clearance equals commanded initial layer height plus any Z-offset error; a -0.04 mm offset error on a 0.20 mm layer forces 125% of expected plastic into the remaining gap.
- Heating a brass/aluminum hotend from 20 °C to 240 °C and an aluminum bed to 100 °C elongates components by 0.08 to 0.14 mm via linear thermal expansion (ΔL = α × L₀ × ΔT), requiring hot-soak calibration.
- Setting first-layer line width to 120%–140% of nozzle diameter (0.48–0.56 mm on a 0.40 mm nozzle) increases lateral wetting pressure against build plate micro-texture without over-thinning Z clearance.
First-layer adhesion and bottom-surface dimensional accuracy depend on matching the physical nozzle-to-bed clearance (h_actual) to the initial layer height (h_1) commanded by your slicer. Because the slicer extrudes a fixed volume of plastic based on h_1 and the first-layer line width (w_1), any Z-offset error (Δz) directly alters the actual cross-sectional area available beneath the nozzle (w_effective = w_1 × h_1 / (h_1 + Δz)). Calibrating Z-offset after full thermal expansion at printing temperature—combined with a first-layer line width of 120% to 140% of nozzle diameter—maximizes bed contact pressure while preventing elephant’s foot and plowed surface ridges.
Nozzle-to-Bed Clearance and Volume Conservation Math
When the slicer generates G-code for the first layer (for example, G1 Z0.20), it assumes that Z = 0.00 mm represents the exact plane where the nozzle tip touches the build plate. If your probe or endstop Z-offset has an uncompensated error Δz (where negative Δz means the nozzle sits closer to the bed than commanded, and positive Δz means the nozzle sits higher above the bed), the true physical gap is:
h_actual = h_1 + Δz
Assuming your extruder and filament multiplier are tuned via Extruder E-Steps and Rotation Distance and Flow Rate and Extrusion Multiplier Calibration, the extruder delivers the exact volume of molten polymer calculated for h_1 and w_1. Because molten polymer is incompressible, squeezing that constant volume into a vertical clearance h_actual forces the effective extruded line width (w_effective) to scale inversely with height:
w_effective ≈ w_1 × (h_1 / h_actual) = w_1 × [h_1 / (h_1 + Δz)]
How Small Z-Offset Errors Amplify First-Layer Over-Extrusion
Consider a 0.40 mm (0.0157 in) nozzle printing a first layer at h_1 = 0.20 mm (0.0079 in) height and w_1 = 0.50 mm (0.0197 in) line width. A ±0.04 mm (±0.0016 in—less than half the thickness of standard copier paper) Z-offset error substantially changes effective line width and fill percentage:
Z-Offset Error (Δz) |
True Nozzle Gap (h_actual) |
Effective Line Width (w_effective) |
Space-Filling Ratio (h_1 / h_actual) |
Physical Behavior on Build Plate |
|---|---|---|---|---|
| +0.08 mm (Too high) | 0.28 mm | 0.357 mm | 71.4% (-28.6% fill) | Round, unflattened cord; zero lateral contact; detaches on corners |
| +0.04 mm (Slightly high) | 0.24 mm | 0.417 mm | 83.3% (-16.7% fill) | Parallel gaps between infill lines; visible valleys on bottom face |
| 0.00 mm (Calibrated) | 0.20 mm | 0.500 mm | 100.0% (Exact fill) | Uniform flat bottom; lines fuse cleanly without upward ridges |
| -0.04 mm (Slightly low) | 0.16 mm | 0.625 mm | 125.0% (+25.0% fill) | Excess plastic plows up into sharp ridges between adjacent passes |
| -0.08 mm (Too low) | 0.12 mm | 0.833 mm | 166.7% (+66.7% fill) | Translucent wave patterns, severe elephant’s foot, extruder clicking |
This inverse relationship (h_1 / (h_1 + Δz)) explains why the Slic3r First Layer manual recommends a generous first-layer height (0.20 to 0.25 mm on a 0.40 mm nozzle, even when upper layers print at 0.10 to 0.12 mm). On a 0.25 mm first layer, a -0.03 mm bed flatness ripple creates a manageable 13.6% local volume excess (0.25 / 0.22 = 1.136). On a 0.10 mm first layer, that same -0.03 mm ripple creates a 42.9% volume excess (0.10 / 0.07 = 1.429), causing severe nozzle scraping.
Sign Conventions in Marlin (M851) vs. Klipper (z_offset)
Verify how your firmware defines the sign of its probe offset before making adjustments:
- Marlin (
M851 Z): Defines the probe trigger point relative to the nozzle (Z_probe_trigger - Z_nozzle). Because an inductive or BLTouch probe triggers below the nozzle tip,M851 Zis negative (such asM851 Z-1.85). MakingM851 Zmore negative (-1.90) moves the nozzle closer to the bed (-0.05 mm). - Klipper (
[probe] z_offset): Defines the distance the nozzle must descend after the probe triggers to reachZ = 0. For a probe that triggers above the bed, Klipper’sz_offsetinprinter.cfgis positive (z_offset: 1.850). Increasingz_offsetto1.900moves the nozzle closer to the bed, or you can runSET_GCODE_OFFSET Z_ADJUST=-0.05 MOVE=1during a live print followed byZ_OFFSET_APPLY_PROBE.
Thermal Expansion of the Hotend and Build Plate
Calibrating Z-offset with paper at room temperature (20 °C / 68 °F) and immediately printing at high temperature leaves the nozzle closer to the bed than measured. Metallic components in the vertical loop expand according to linear thermal expansion:
ΔL = α × L₀ × ΔT
Where ΔL is length change (mm), α is the coefficient of linear thermal expansion (10⁻⁶ /K), L₀ is initial heated length (mm), and ΔT = T_print - T_ambient (K or °C).
Worked Calculation: Room Temperature vs. Printing Temperature
Consider the vertical expansion of a direct-drive hotend and cast aluminum bed when heating from 20 °C (68 °F) to ABS/ASA printing temperatures (250 °C / 482 °F nozzle, 100 °C / 212 °F bed; see PLA vs. PETG vs. ASA Mechanical and Thermal Properties):
- Brass Nozzle + Heater Block (
α_brass ≈ 19 × 10⁻⁶ /K,L₀ = 20.0 mm,ΔT = 230 K):ΔL_hotend = 19 × 10⁻⁶ × 20.0 mm × 230 K = 0.0874 mm (87.4 µm) - Stainless Steel Heatbreak Transition (
α_ss ≈ 16 × 10⁻⁶ /K,L₀ = 12.0 mm, averageΔT = 110 K):ΔL_heatbreak = 16 × 10⁻⁶ × 12.0 mm × 110 K = 0.0211 mm (21.1 µm) - Aluminum Bed Plate + PEI Sheet (
α_al ≈ 23 × 10⁻⁶ /K, effective thickness above mountsL₀ = 8.0 mm,ΔT = 80 K):ΔL_bed = 23 × 10⁻⁶ × 8.0 mm × 80 K = 0.0147 mm (14.7 µm)
Summing these expansions (0.0874 + 0.0211 + 0.0147 = 0.1232 mm) reduces nozzle-to-bed clearance by 0.12 mm (123 µm) between cold and hot states—more than half of a 0.20 mm first layer. As noted in the Klipper Probe Calibration guide, standard 80 gsm copy paper is roughly 0.10 mm thick, which coincidentally offsets hotend thermal growth when calibrated cold. However, for repeatable results across PLA and ASA bed temperatures, pre-heat the bed for 5 to 15 minutes (with the nozzle at a 150 °C non-oozing standby temperature) before homing and bed meshing, then fine-tune the final 0.02 to 0.04 mm on a live first-layer patch.
Why Wider First-Layer Lines (120%–140% of Nozzle Diameter) Improve Adhesion
Slicer profiles typically set first-layer line width (w_1) between 120% and 140% of nozzle diameter d_n—such as 0.48 mm to 0.56 mm on a 0.40 mm nozzle (compare width-to-height combinations in the Flow & Volumetric Speed Calculator and Nozzle Size vs. Layer Height Limits).
- Exploiting the Nozzle Tip Annular Flat: A 0.40 mm nozzle orifice is surrounded by a flat brass ring (
d_flat ≈ 0.80 to 1.00 mm). Commanding a0.50 to 0.56 mmline width forces molten polymer laterally under this flat shoulder, which acts like a heated trowel to press plastic into the micro-texture of smooth or textured PEI. - Higher Wetting Pressure Without Reducing Z-Clearance: Widening
w_1increases contact area and melt-pool pressure while maintaining a safe0.20 mmvertical clearance above bed high spots.
Diagnosing First-Layer Surface Defects and Elephant’s Foot
Printing a single-layer 60 × 60 mm (2.36 × 2.36 in) square at 0.20 mm height provides a direct visual and tactile diagnostic, as shown in the Prusa First Layer Calibration guide:
| Visual & Tactile Symptom on Single-Layer Patch | Underlying Clearance Cause | Recommended Z-Offset Adjustment |
|---|---|---|
| Rounded strings; gaps between lines; sheet pulls apart easily when peeled | Nozzle too high (Δz > +0.03 mm); stadium edges fail to meet |
Lower nozzle in -0.02 mm to -0.04 mm increments |
| Center lines touch, but tiny pinholes remain where infill meets perimeter | Nozzle slightly high (Δz ≈ +0.01 to +0.02 mm) |
Lower nozzle by -0.01 mm to -0.02 mm |
Smooth, flat top and bottom; fuses into a tear-resistant sheet measuring ~0.20 mm |
Ideal clearance (Δz ≈ 0.00 mm) |
Save offset (M500 or SAVE_CONFIG) |
| Rough, sandpaper-like ridges along line boundaries; fingernail catches across paths | Nozzle slightly too low (Δz ≈ -0.02 to -0.05 mm); nozzle flat plows excess plastic upward |
Raise nozzle in +0.02 mm increments |
| Translucent wavy ripples; extruder clicks; wide flare on bottom perimeter | Nozzle severely too low (Δz < -0.06 mm); orifice obstructed by bed |
Raise nozzle by +0.05 mm to +0.10 mm |
Controlling Elephant’s Foot for Precision Assemblies
Even at an ideal Z-offset, first-layer squish pressure and bed heat cause the bottom 1 to 2 layers to flare outward by 0.10 to 0.20 mm per side (elephant’s foot), interfering with mating parts and vertical bores (see 3D Print Clearances and Fits and Why 3D Printed Holes Come Out Undersized). Rather than raising Z-offset and sacrificing adhesion, enable Elephant foot compensation (0.10 to 0.15 mm) in your slicer to inset the first layer’s XY contour, and verify mating tolerances in the Fit & Tolerance Calculator.
Run the numbers
Fit, Clearance & Shrinkage Calculator (+ STL Gauge)
Compute CAD dimensions for press, sliding, loose and print-in-place joints after polymer shrinkage and nozzle geometry, and download a printable STL test gauge.
Extrusion Flow, Volumetric Speed & E-Steps Calculator
Calculate capsule road cross-section, volumetric flow rate (mm³/s), speed limits, slicer flow ratio and Klipper/Marlin extruder steps.
Sources and further reading
3D printing guidance on this page is general. Printers, hotends, slicers and filament batches vary, so verify dimensions and settings with test prints and calipers. Always observe thermal, electrical and ventilation safety around heated components and melted polymers. Spotted an error? Tell us and we will review it under our corrections policy.