Articles › 3D printing

Dimensional accuracy and fits: calibration cube, compensation, elephant foot

Measure a calibration cube to see what is off, set XY/hole and elephant foot compensation in your slicer, then pick a loose, snug or press-fit clearance.

Intermediate 7 min read October 21, 2026 3D printing, from choosing a printer to smooth parts · lesson 15/20

What you will learn
  • FDM parts go wrong in three ways: outer edges grow, holes shrink, and the base flares (elephant foot). Each is fixed in a different place.
  • Measure a calibration cube before touching the slicer. If the 20 mm sides and the holes are off by the same amount, the problem is flow or steps, not compensation.
  • Compensation = deviation ÷ 2, because a hole or edge is off on both sides. A 6.0 mm hole that measures 5.6 wants +0.2 mm hole compensation.
  • Fits start at 0.1–0.2 mm per side for snug and 0.3–0.5 mm for loose, and you print a test piece first every time.

The part looks fine but will not go in, or goes in and rattles. Every printer brand has this problem, because FDM does not print the file exactly. It deviates in a systematic way, and systematic errors can be corrected. This lesson is about measuring where your printer is off, where to fix it in the slicer, and how much clearance to leave so parts mate the first time.

The numbers assume a 0.4 mm nozzle and 0.2 mm layers, the usual defaults. Your printer and your spool will give different values, so measure your own.

Where the error comes from

Typical FDM accuracy is around ±0.15 to ±0.5 mm, but the error is not random. There are four main causes, and each leaves a different fingerprint.

CauseSymptomFixed by
The extruded line is squashed and spreads sidewaysOuter edges slightly larger, holes smallerFlow first, then compensation
The nozzle drags material toward the centre on tight curvesHoles shrink more than outer edges growHole compensation
The first layer is pressed into a hot bedA lip around the base (elephant foot)Elephant foot compensation, Z-offset, a chamfer
The material shrinks as it coolsThe whole part is smaller by a percentage; worst with ABSShrinkage compensation in the filament profile

Holes in an STL are also polygons, not true circles, so they lose a little more before the slicer even sees them.

Loose / sliding fit0.3-0.5 mmSnug / press by hand0.1-0.2 mmTight / press fit0 to -0.1 mmholes come out ~0.2 mm small · outsides a bit bigelephant foot: first layer flares out
Print a small test piece first, every time; every printer drifts differently

Step 1: a calibration cube, measured properly

The 20 mm cube with X, Y and Z on its faces is a good test because it is easy to measure. Print it with the profile you actually use, then take calipers to it.

  • Width in X and Y at mid-height, not at the base.
  • The same again at the base, within 1 mm of the bed. The difference from mid-height is your elephant foot.
  • Height in Z.
  • If you add a test plate with 4, 6 and 8 mm holes, measure those too.

The numbers tell you which layer the problem lives in.

  • X and Y differ, say 20.0 and 20.3: mechanical (belt tension, steps/mm), not a slicer issue.
  • X and Y both large by the same amount and a single wall is thicker than the line width: flow is too high. Fix flow first, as in the lesson on tuning a new filament.
  • Outer edges only slightly large but holes clearly small: normal FDM behaviour. Time for compensation.

Compensation treats the symptom. Set once, it affects every part. If flow or the mechanics are still wrong, you get a value that looks right today and wrong on the next spool.

Step 2: test the fit with a tolerance test

OrcaSlicer ships a Handy Model called the Orca Tolerance Test (right-click the plate in Prepare, Add Handy Model). It is a base with six hexagonal holes at 0.0, 0.05, 0.1, 0.2, 0.3 and 0.4 mm clearance, plus a hexagonal tester, or you can use a 6 mm Allen key. The smallest hole the key slides into without force is the minimum clearance for this printer and this spool.

A well-tuned machine usually passes at 0.1–0.2 mm. If you need 0.3–0.4 mm before it fits, go back to flow and compensation.

Step 3: set the right compensation

The setting names differ between slicers, but the rule is the same: positive grows, negative shrinks, in mm per side.

SlicerOuter contourHolesFirst layer
PrusaSlicerXY size compensation (Print Settings, Advanced); moves contours and holes togetherSame value as the contourElephant foot compensation
OrcaSlicer / Bambu StudioX-Y contour compensationX-Y hole compensationElephant foot compensation (plus the number of layers it tapers over)
CuraHorizontal ExpansionHole Horizontal ExpansionInitial Layer Horizontal Expansion

OrcaSlicer also has Precise wall, which sets the overlap between the outer and the adjacent inner wall to zero. It straightens the outer contour without leaning on compensation; turn it on before you start measuring.

Worked example

You print a test plate designed with a 20.00 mm outer edge and a 6.00 mm hole. It measures 20.16 mm outside and 5.60 mm in the hole.

  1. Outer deviation = 20.00 − 20.16 = −0.16 mm. It is off on both sides, so divide by 2: X-Y contour compensation = −0.08 mm.
  2. Hole deviation = 6.00 − 5.60 = +0.40 mm. Divide by 2: X-Y hole compensation = +0.20 mm.
  3. Reprint and measure. You should see about 20.0 outside and 6.0 in the hole. If not, adjust in steps of 0.02–0.05 mm.

In PrusaSlicer, with one value, you have to choose what to get right. Most people make the holes right (+0.2) and accept a slightly larger outside, or fix hole sizes in the CAD file instead.

Elephant foot: the flared base

The first layer, pressed firmly onto a hot bed, flares into a lip around the base. Parts that must sit flush against each other, or a lid that drops into a box, catch on it every time.

  • Elephant foot compensation shrinks the first layer inward. About 0.2 mm works well with a 0.4 mm nozzle (official PrusaSlicer profiles have it on by default). Do not go past half the first-layer line width. If the brim no longer attaches to the part, the value is too high.
  • From the measurements: base 20.35 mm, mid-height 20.10 mm, difference 0.25, halved: about 0.12 mm per side. Set 0.1–0.15 and measure again.
  • If the base still flares after that, the cause is usually a Z-offset that is too low or a bed that is too hot, not the compensation value.
  • The slicer-free fix: put a 0.3–0.5 mm chamfer on the bottom edge of the model in CAD. The lip ends up inside the volume you cut away.

Shrinkage: a percentage, not millimetres

ABS shrinks about 1–2% as it cools, so a 100 mm part can end up at 98–99 mm, and no fixed mm compensation can fix that. PETG and PLA shrink far less. For ABS/ASA, use the shrinkage value in the filament profile (PrusaSlicer: Filament, Advanced, as a percentage in XY and Z; OrcaSlicer: Shrinkage (XY) and (Z)). Measure a long test piece and work it out: designed 100, measured 98.8, shrinkage 1.2%. The value varies a lot with the enclosure and how fast the part cools, so only trust your own machine’s number.

Clearance for fits

Once compensation has the part close to the file, choose the clearance for the fit you want. Values are per side (hole minus shaft, divided by 2).

FitClearance per sideUsed for
Press fit, pushed or tapped in0.0 to −0.05 mmPermanent pins, inserts, parts that never come apart
Transition, pushed in by hand, removable, no play0.1–0.2 mmAlignment pegs, lids that must stay put
Clearance, slides and turns0.3–0.5 mmPrint-in-place hinges, rails, everyday box lids

Example: an 8.00 mm steel rod should fit snugly but be removable. Design the hole at 8.00 + 2 × 0.15 = 8.30 mm. If it should spin freely, 8.00 + 2 × 0.4 = 8.80 mm. If you print both parts, remember the printed shaft can grow too, so the test piece must include both.

Board cases in particular, with walls, height and cable cut-outs, are covered in the case design lesson; this lesson does not repeat it.

Tips that help in practice: a vertical hole is rounder than a hole printed in a side wall (the top of a side hole sags). A small chamfer on the hole’s mouth and the shaft’s end guides the fit. And on a material that shrinks a lot, a 0.1 mm press fit in the file can end up so tight it cracks.

Common mistakes

  • Setting compensation before fixing flow. The value hides two problems at once; change spools and everything drifts again.
  • Entering the whole deviation without halving it. Hole 5.6, target 6.0, enter +0.4, get a 6.4 hole.
  • Measuring at the base and concluding the whole part is oversize. That is elephant foot.
  • Storing the values in the printer profile when they depend on the filament.
  • Raising elephant foot compensation until the brim lets go, then adding more brim instead of lowering the value.
  • Designing exact-size mating parts with zero clearance and hoping compensation will cover it.

With dimensions under control, the next lesson is about smooth surfaces. Some of those methods, vapor smoothing especially, take 0.1–0.3 mm back, so today’s measurements still matter there.

Sources

FAQ

Should I fix steps/mm or flow first?

Yes. If a 20 mm cube measures 20.3 on both axes and a single wall is thicker than the line width, flow is too high. Fix that first, then look at compensation. Compensation treats the symptom, and one setting hits every part you print.

Why did XY compensation fix my holes but shrink the outside?

PrusaSlicer's XY size compensation moves outer contours and holes in the same direction. To correct them separately, use X-Y hole compensation and X-Y contour compensation in OrcaSlicer or Bambu Studio, or Hole Horizontal Expansion in Cura.

Do the values change with the material?

Yes. ABS shrinks about 1–2% as it cools; PETG and PLA far less. Keep compensation values with the filament profile, not the printer profile, and measure again when you change to a different brand of spool.

Circuits and code were tested on sample boards. Boards differ in pin layout, so check your board's pinout before you power anything.