The formula
Every slicer on this page applies its hole setting as an offset of the layer outline: each hole wall moves by the value, so the diameter changes by twice the amount. Bambu Lab’s wiki says it outright: “The hole diameter will increase by twice the compensation value.”
per-wall correction = (designed diameter - measured diameter) / 2
new hole value = value used for the test print + per-wall correction
new outline value = value used for the test print + (designed outer - measured outer) / 2
- The designed diameter is the size in the model. The measured diameter comes from the printed test part.
- The value used for the test print is whatever sat in the setting when the part printed: 0 on a first test. Bambu Lab’s wiki adds each new correction to the previous value the same way.
- The outer size is any width or peg diameter across two outside walls. Bambu Lab’s wiki works its contour value as (55 − measured) ÷ 2 for a 55 mm test part that fits the center of its spool.
PrusaSlicer and SuperSlicer count the other way, so a negative value opens holes. The calculator subtracts the correction for those two.
How do you calculate XY hole compensation?
Subtract the measured hole diameter from the designed one and halve it. The slicer moves every hole wall by the setting’s value, so the diameter changes twice as much. A 5 mm hole that measures 4.80 mm needs +0.10 mm of X-Y hole compensation in OrcaSlicer or Bambu Studio, added to any value already set.
Worked example: OrcaSlicer or Bambu Studio
These are the calculator’s example values: a 5 mm hole that printed at 4.80 mm, with hole compensation at 0.
- Diameter error: 5.00 − 4.80 = 0.20 mm short.
- Per wall: 0.20 ÷ 2 = 0.10 mm.
- New value: 0 + 0.10 = 0.1 mm in X-Y hole compensation.
Say the same part has a 20 mm outer width that measured 19.90 mm. X-Y contour compensation becomes (20 − 19.90) ÷ 2 = 0.05 mm. The two settings act separately. Bambu Lab’s wiki says hole compensation does not change the outer size, and contour compensation does not touch hole sizes.
On the next round, add the correction to the current value. If the reprinted hole measures 4.94 mm with 0.1 mm set, the new value is 0.1 + (5 − 4.94) ÷ 2 = 0.13 mm.
Does PrusaSlicer have hole size compensation?
No. PrusaSlicer 2.9.6, the current release, has no setting that moves only holes. Its XY Size Compensation offsets every wall of the part: a negative value opens holes but shrinks the outside by the same amount. To change a hole alone, draw it larger in CAD or cut it with a resizable negative volume.
The setting is in Print Settings > Advanced > Slicing, shown in Expert mode. Its tooltip reads “The object will be grown/shrunk in the XY plane by the configured value (negative = inwards, positive = outwards). This might be useful for fine-tuning hole sizes.” PrusaSlicer’s 3.0.0-alpha12 test build has the same single option and no hole-only one.
Your options in PrusaSlicer:
- XY Size Compensation for the whole print. Use it when the holes are small and the outside is large by about the same amount. One negative value fixes both.
- XY Size Compensation for one object. It is an object setting: in Expert mode, right-click an object and use Add settings to give it its own value. Modifiers and parts can’t carry this setting.
- A negative volume. Right-click the model and add a negative volume, such as a cylinder. Prusa’s Knowledge Base describes this as a way to “create easily resizable holes directly in PrusaSlicer”. Make it the hole’s drawn diameter plus the measured shortfall.
- The model. Draw the hole larger in CAD by the diameter error. It works the same in any slicer.
Worked example: one setting for holes and outline
A 5 mm hole measures 4.80 mm and a 20 mm width 20.10 mm, with XY Size Compensation at 0.
| Pick in the calculator | XY Size Compensation | Hole after | Width after |
|---|---|---|---|
| Fix the hole | -0.1 mm | 5.00 mm | 19.90 mm (0.10 mm under) |
| Fix the outer size | -0.05 mm | 4.90 mm (0.10 mm under) | 20.00 mm |
| Split the difference | -0.075 mm | 4.95 mm (0.05 mm under) | 19.95 mm (0.05 mm under) |
Both features come out right at once only when the hole’s shortfall equals the width’s excess. Add the hole’s remaining error to its diameter in CAD.
PrusaSlicer warns that it skips XY Size Compensation on an object with fuzzy-skin painting, or with multi-material painting on a printer with more than one extruder.
Hole compensation settings by slicer
| Slicer (version checked) | Hole setting | Where it is | Positive value | Outline setting |
|---|---|---|---|---|
| OrcaSlicer 2.4.2 | X-Y hole compensation (xy_hole_compensation) |
Process > Quality > Precision | opens holes | X-Y contour compensation |
| Bambu Studio 02.08.02.61 | X-Y hole compensation (xy_hole_compensation) |
Process > Quality > Precision | opens holes | X-Y contour compensation |
| UltiMaker Cura 5.13 | Hole Horizontal Expansion (hole_xy_offset) |
Custom print settings > Walls | opens holes | Horizontal Expansion (xy_offset) |
| PrusaSlicer 2.9.6 | none | XY Size Compensation (xy_size_compensation), positive closes holes |
||
| SuperSlicer 2.5.59.13 | XY holes compensation (hole_size_compensation) |
Print Settings > Slicing > Modifying slices | closes holes | Outer XY size compensation (xy_size_compensation) |
All of them take millimeters per wall, not a diameter.
OrcaSlicer and Bambu Studio
Both slicers show the two options in Advanced mode, under Precision on the Quality tab of the process settings. Their source code offsets holes and outer contours in separate steps, so one does not disturb the other.
- Only closed holes count. Bambu Lab’s wiki says a layer where the hole opens to the side of the part has nothing to compensate, and that compensating such a model leaves visible layer separation at the hole. A hole lying parallel to the bed opens to the side in every layer it crosses.
- Every hole moves. The offset applies to all closed holes in the layer, round or square.
- Color painting turns it off. In both slicers’ source, a color-painted object gets no hole or contour compensation when the project uses more than one filament.
- Polyholes. OrcaSlicer’s Convert holes to polyholes sits in the same Precision group. It finds almost-circular holes that span more than one layer and redraws each as a polyhole, a polygon computed from the nozzle size and the hole diameter.
- Bambu Studio’s Auto circle contour-hole compensation is a separate option. Its tooltip calls it an experimental feature for round holes and contours below 50 mm, for PLA Basic, PLA CF, PET CF, PETG CF and PETG HF only. The option’s User Customized Offset runs the other way: positive means a tighter fit.
UltiMaker Cura
Hole Horizontal Expansion and its max diameter sit in the Walls section of the custom settings, but only Cura’s Expert visibility preset shows the pair. Typing “hole” in the settings search box also finds both. Horizontal Expansion itself is in the Basic preset.
Two details change the value to type:
- Horizontal Expansion runs first. CuraEngine offsets the whole layer by Horizontal Expansion, which closes holes by the same amount, and then expands the holes. If you raise Horizontal Expansion to fix the outside, add the same amount to Hole Horizontal Expansion. The calculator’s Cura value already includes the extra.
- Hole Horizontal Expansion Max Diameter scales the value by hole area. CuraEngine gives a round hole of diameter d about value × (1 − (d ÷ max)²), and nothing at or above the max. Cura enables the max diameter only while Hole Horizontal Expansion is above zero.
Say a 5 mm hole measures 4.80 mm and a 20 mm width 19.90 mm. They need Horizontal Expansion 0.05 mm and Hole Horizontal Expansion 0.1 + 0.05 = 0.15 mm. With a 10 mm max diameter, the 5 mm hole receives 75% of the value, so type 0.15 ÷ 0.75 = 0.2 mm. A 3 mm hole then gets 0.182 mm per wall and an 8 mm hole 0.072 mm. Cura’s settings file flags values outside -1 to 1 mm.
SuperSlicer
XY holes compensation sits on the Slicing page, in the Modifying slices group, in Expert mode. Its tooltip gives the sign: “negative = inwards = remove area, positive = outwards = add area, should be negative as the holes are always a bit smaller”. A 5 mm hole printed at 4.80 mm needs -0.1 mm.
- It acts on convex holes only (holes with no inward corners, such as circles), and adds to Inner XY size compensation.
- XY holes threshold (default 100 mm², a round hole of about 11.3 mm) is the largest hole that gets the full value. Above it, the effect fades in a straight line to nothing at four times the area, about 22.6 mm. For holes in that band, the calculator scales its answer up to match.
- Convert round holes to polyholes is in the same group.
The checked release, 2.5.59.13, is SuperSlicer’s latest stable build. The 2.7.61 test builds carry the same settings.
How to measure the test hole
- Print a test part with upright holes in three sizes (3, 5 and 10 mm, say) plus one outer width. Use the filament and process profile the real part will use. Bambu Lab’s wiki says the calibration is specific to each filament.
- Note the hole and outline values in the profile, or zero them.
- Measure once the part is at room temperature.
- Use gauge pins or drill bit shanks where you have them: the largest that slides in is the size a pin will see. With calipers, read the hole with the inside jaws at three angles and average.
- Don’t size a hole by a screw alone. Bambu Lab’s wiki notes that M6 screws made to the ISO 6g tolerance usually measure about 5.9 mm.
If every hole is short by about the same amount, one value fixes them all. Why holes print undersized (polygon facets, corner cutting, line squash) is covered in the dimensional accuracy calibration guide.
Calibrating tolerance with a fit test
A fit test replaces the calipers with a known part. The OrcaSlicer Calibration Guide puts tolerance last, “as the result depends on every calibration above”, so run it after flow and pressure advance.
- OrcaSlicer Tolerance Test. Right-click the plate, choose Add Handy Model and pick Orca Tolerance Test. Its base has six hexagonal holes with tolerances of 0, 0.05, 0.1, 0.2, 0.3 and 0.4 mm, checked with a 6 mm hex key or the printed hex tester. The wiki gives no formula for turning the result into a setting. For a number to type, measure a round test hole and use the calculator.
- Bambu Lab’s screw test. The wiki uses a MakerWorld test model with holes labeled in compensation steps, sized for a metric screw from M3 to M6, and recommends M6 for the most accurate result. Find the hole the screw fits snugly and type its label into X-Y hole compensation. On a reprint, add the label of the new snug hole to the value already set: 0.2 mm + 0.1 mm = 0.3 mm.
Compensation makes a hole print at its drawn size. The gap a pin, bearing or screw needs is a separate design choice. The tolerance calculator gives fit clearances, and the screw hole size calculator covers clearance and tap holes for screws.
If the hole is still the wrong size
- Small and large holes need different values. The error is not a fixed offset. Use Cura’s max diameter or SuperSlicer’s threshold, try polyholes, or add a per-size allowance in CAD.
- The hole and the outside are both small, more so on large parts. That is shrinkage, which a percentage scale fixes. Set it with the shrinkage calculator and then measure the hole again.
- Holes small and outer walls large by the same amount. The walls printed wider than drawn on both faces, which can point to over-extrusion. Check flow with the flow rate calculator before you add compensation.
- The hole reads differently across X and across Y. One axis moves more or less than commanded, so check that axis’s belt tension and steps per mm. If the oval’s long and short axes run on the diagonals, the frame is out of square: see the skew calculator.
- The setting changes nothing. Check for multi-color painting or a hole that opens to the side. Bambu Lab’s wiki also says holes below 1 mm can be hard to tune.
Published · Figures last checked
Sources
- Bambu Lab Wiki, XY Hole / Contour compensation (accessed 2026-10-18)
- Bambu Studio v02.08.02.61 source, PrintConfig.cpp (xy_hole_compensation, xy_contour_compensation, enable_circle_compensation) (accessed 2026-10-18)
- Bambu Studio v02.08.02.61 source, PrintObjectSlice.cpp (hole and contour offsets, multi-color painted objects) (accessed 2026-10-18)
- Bambu Studio v02.08.02.61 source, Tab.cpp (Quality page, Precision group) (accessed 2026-10-18)
- OrcaSlicer v2.4.2 source, PrintConfig.cpp (xy_hole_compensation, xy_contour_compensation, hole_to_polyhole) (accessed 2026-10-18)
- OrcaSlicer v2.4.2 source, PrintObjectSlice.cpp (_shrink_contour_holes) (accessed 2026-10-18)
- OrcaSlicer v2.4.2 source, Tab.cpp (Quality page, Precision group) (accessed 2026-10-18)
- OrcaSlicer Wiki, Precision settings (accessed 2026-10-18)
- OrcaSlicer Wiki, Tolerance calibration (accessed 2026-10-18)
- OrcaSlicer Wiki, Calibration guide (accessed 2026-10-18)
- UltiMaker Cura 5.13.0, fdmprinter.def.json (xy_offset, hole_xy_offset, hole_xy_offset_max_diameter) (accessed 2026-10-18)
- UltiMaker Cura 5.13.0, setting visibility presets (basic.cfg and expert.cfg) (accessed 2026-10-18)
- CuraEngine 5.13.0 source, slicer.cpp (horizontal expansion and hole offsets) (accessed 2026-10-18)
- PrusaSlicer releases (2.9.6 current, 3.0.0-alpha12) (accessed 2026-10-18)
- PrusaSlicer 2.9.6 source, PrintConfig.cpp (xy_size_compensation) (accessed 2026-10-18)
- PrusaSlicer 2.9.6 source, Tab.cpp (Advanced page, Slicing group) (accessed 2026-10-18)
- PrusaSlicer 2.9.6 source, PrintObjectSlice.cpp (XY Size Compensation and painting) (accessed 2026-10-18)
- PrusaSlicer 2.9.6 source, GUI_Factories.cpp (object and part settings) (accessed 2026-10-18)
- PrusaSlicer 3.0.0-alpha12 source, PrintConfig.cpp (accessed 2026-10-18)
- Prusa Knowledge Base, Per model settings (accessed 2026-10-18)
- Prusa Knowledge Base, Negative volume (accessed 2026-10-18)
- SuperSlicer 2.5.59.13 source, PrintConfig.cpp (hole_size_compensation, hole_size_threshold, xy_size_compensation, hole_to_polyhole) (accessed 2026-10-18)
- SuperSlicer 2.5.59.13 source, PrintObjectSlice.cpp (_shrink_contour_holes and the hole threshold) (accessed 2026-10-18)
- SuperSlicer 2.5.59.13, print.ui (Slicing page layout) (accessed 2026-10-18)
- SuperSlicer releases (2.5.59.13 stable, 2.7.61 prereleases) (accessed 2026-10-18)
- SuperSlicer 2.7.61.10 source, PrintConfig.cpp (accessed 2026-10-18)