# Bolt and screw holes in 3D prints: clearance, counterbore, countersink, and captive nuts

The clearance, counterbore, countersink, and captive-nut sizes that actually work for M3 to M5 screws in FDM prints, plus how to fix a bad fit with a slider, not a remodel.

---

You modeled a nice bracket, put an M4 hole through it, printed it, and now the bolt
will not go through. Or it goes through, but the head sticks up proud of the surface
and rocks. Or you added a hex pocket for a nut and the nut either spins uselessly or
will not seat at all. Every one of these is a hole-sizing problem, and every one of
them has a known number that just works.

This post is the cheat sheet: real clearance-hole diameters for M3, M4, and M5, how
to sink a head flush with a counterbore or a countersink, how to trap a nut so it
holds torque, and how to fix any of it with a slider instead of remodeling the part.
If you are pressing brass inserts instead of running a bolt straight through, that is
a different hole, and our [heat-set insert guide](/blog/heat-set-inserts-3d-printing)
has those numbers.

## What size hole do you need for a 3D-printed screw?

For a bolt that passes straight through a part (a clearance hole, not a threaded one),
model the hole a bit larger than the bolt so the shaft drops through without binding.
The standard metric clearance sizes are a good starting point, but FDM prints holes
slightly undersized, so on a printer you usually want the normal or loose column, or
one step up, and a quick test-fit.

Here is where to start. "Standard" is the machinist's clearance number; "FDM start"
is what to actually model on a typical FDM printer before test-fitting.

| Bolt | Close | Normal (standard) | Loose | FDM start (model this) |
|---|---|---|---|---|
| M3 | 3.2 mm | 3.4 mm | 3.6 mm | 3.4 to 3.6 mm |
| M4 | 4.3 mm | 4.5 mm | 4.8 mm | 4.6 to 4.8 mm |
| M5 | 5.3 mm | 5.5 mm | 5.8 mm | 5.6 to 5.8 mm |

Why the FDM column runs high: when the nozzle traces a small circle it over-extrudes
slightly into the curve, so a printed hole comes out a fraction of a millimeter
smaller than modeled. That shrink is exactly why an 8 mm modeled hole can refuse an
8 mm shaft. If you want the full mechanical reason and the running-fit and press-fit
numbers behind it, our [tolerances guide](/blog/3d-printing-tolerances-parts-that-fit)
covers it. For a clearance hole you do not need to be precise, you need to be a little
generous: the bolt only has to pass through, the head and the nut do the clamping.

## How do you sink a screw head flush? Counterbore vs countersink

To get a screw head at or below the surface, you cut a wider recess around the top of
the clearance hole. A counterbore is a flat-bottomed cylinder for a cylindrical head
(a socket-head cap screw). A countersink is an angled cone for a tapered head (a flat
head). Match the recess to the head you are using, not the other way around.

**Counterbore, for socket-head cap screws.** Make the bore diameter about 1 mm larger
than the head so it drops in cleanly, and the depth equal to the head height (a touch
deeper if you want it recessed below the surface). Socket-head cap screw heads are
almost exactly as tall as the bolt is wide, so the head height equals the M number.

| Bolt | Head diameter | Counterbore diameter (model this) | Head height / bore depth |
|---|---|---|---|
| M3 | 5.5 mm | 6.5 mm | 3.0 mm |
| M4 | 7.0 mm | 8.0 mm | 4.0 mm |
| M5 | 8.5 mm | 9.5 mm | 5.0 mm |

**Countersink, for flat heads.** A metric flat head is a 90 degree cone. Cut the
recess at a 90 degree included angle out to the head's outside diameter and the head
sits flush. One catch: flat-head diameters vary by screw type. A socket countersunk
head (the hex-drive flat head) is wider than a slotted or Phillips machine screw of
the same thread. So the safest move is to measure your actual head with calipers and
countersink to that diameter plus about 0.3 mm. The values below are a generous
starting point that clears a common socket countersunk head.

| Bolt | Countersink diameter (start here) | Angle |
|---|---|---|
| M3 | 6.5 mm | 90 degrees |
| M4 | 8.5 mm | 90 degrees |
| M5 | 10.5 mm | 90 degrees |

One printing note: the flat bottom of a counterbore prints cleanly because it is a
ceiling built on solid layers below. The angled wall of a countersink is a mild
overhang, but at 45 degrees from horizontal it is well inside what FDM handles without
support. Neither needs supports if the hole faces up on the bed.

## How do you capture a nut in a printed part?

To bolt into a printed part without a threaded insert, trap a standard hex nut in a
pocket and run the bolt into it. The pocket has to be the right width so the nut does
not spin, and the right depth so it seats fully. Size the hex pocket to the nut's
width across the flats plus a little clearance, and the depth to the nut's thickness
plus a hair.

| Nut | Width across flats | Hex pocket width (model this) | Nut thickness | Pocket depth |
|---|---|---|---|---|
| M3 | 5.5 mm | 5.7 to 5.9 mm | 2.4 mm | 2.6 to 2.9 mm |
| M4 | 7.0 mm | 7.2 to 7.4 mm | 3.2 mm | 3.4 to 3.7 mm |
| M5 | 8.0 mm | 8.2 to 8.4 mm | 4.7 mm | 4.9 to 5.2 mm |

Two tricks that make nut traps far more reliable. First, put the pocket opening on a
side wall or the bottom so the nut slides in from the side and the bolt pulls it
against a solid face: pulling into solid plastic holds torque far better than a nut
sitting in a shallow top-facing well. Second, if you must build a pocket as a ceiling
partway up the print (a captive nut buried inside), remember the roof over it is an
overhang; a chamfered or bridged top keeps it clean. More on that in our
[overhangs and supports guide](/blog/overhangs-and-supports).

If you are going to take the joint apart repeatedly, or the plastic is thin, skip the
trapped nut and use a brass [heat-set insert](/blog/heat-set-inserts-3d-printing)
instead. A trapped nut is great for a permanent or occasionally-serviced joint and
costs nothing but a nut you already own.

## Should the hole be printed horizontally or vertically?

A hole printed vertically (its axis pointing up off the bed, so it prints as a stack
of rings) comes out rounder and more accurate than one printed horizontally (its axis
parallel to the bed). A horizontal hole has to bridge across its own top, so the upper
portion sags into a slight oval and the top layers droop inward. If a fit is critical,
orient the part so the hole points up. If a hole must run horizontally, a teardrop or
chamfered top helps it bridge, and you should model it a touch larger and plan to
clean it with a drill bit.

This is the same reason clearance holes are forgiving and nut pockets are not: a
clearance hole has millimeters of slack, but a hex pocket that goes 0.4 mm oval will
let the nut spin. Point the important holes up.

## How Meshra sizes these holes for you

Here is the part that saves the back-and-forth. In [Meshra](/builder) you describe the
part in plain English, including the holes, and it writes real parametric CAD and
builds an exact solid: "a 60 by 40 mm mounting plate, 4 mm thick, with four M4
clearance holes 8 mm from each corner, counterbored for socket-head caps." You get a
watertight, millimeter-exact model and a slider for every dimension it generated, hole
diameter included.

That matters because the numbers above are starting points, not guarantees: your
printer, nozzle, and filament shift them a few tenths. When your test print comes out
with the bolt binding, you do not remodel anything. You drag the hole-diameter slider
up 0.2 mm and re-export. The change re-runs the same CAD deterministically, with no AI
call, free on every plan, so dialing in a fit is a slider nudge, not a rebuild. Any
slider Meshra recognizes as a clearance or fit dimension even gets a small info badge
in the parameter drawer that links straight to the tolerances guide, so the number and
its explanation are right next to the control.

Meshra exports STEP for CNC quoting, STL and 3MF for your slicer, and GLB for the web,
all in millimeters, clearly labeled so a slicer never guesses the wrong unit. The
printability summary also reads the part's geometry the moment it loads and flags a
wall that is too thin around a hole or a face that would need supports, before you
ever slice.

<TryMeshra />

## FAQ

### What is the difference between a clearance hole and a tapped hole?

A clearance hole is oversized so a bolt passes straight through and is held by a nut or
an insert on the other side; that is what this post covers. A tapped or threaded hole
is cut so the bolt threads directly into it. On FDM, printing usable threads directly
is unreliable for small fasteners you will take apart often, which is why makers use
clearance holes with trapped nuts or brass inserts instead. Larger, coarse threads
(a jar lid, a knob, a housing) are a different story and print well; our guide to
[designing 3D printed threads](/blog/design-3d-printed-threads) covers the pitch,
clearance, and profile that make those hold.

### Do I need to make the hole bigger than the chart to allow for shrinkage?

Usually yes, a little. FDM holes print slightly undersized, so for a clearance hole
model the normal or loose column, or step up 0.2 to 0.4 mm, then test-fit. For a hex
nut pocket, the clearance is already built into the "model this" column above. Always
test one before committing to a batch.

### How deep should a counterbore be?

Equal to the screw head's height to sit flush, or a little deeper to recess the head
below the surface. A socket-head cap screw head is about as tall as the bolt is wide,
so 3.0 mm for M3, 4.0 mm for M4, and 5.0 mm for M5.

### My printed nut trap lets the nut spin. What went wrong?

The pocket is too wide, or it printed oval. Tighten the across-flats width toward the
low end of the "model this" range, and orient the part so the pocket does not print as
a sagging horizontal ceiling. Pulling the bolt to seat the nut against a solid face,
rather than into a shallow top well, also keeps it from spinning.

### Can I add all of this to a part without CAD software?

Yes. Describe the plate or bracket and the holes you want in plain language in the
[Meshra builder](/builder), and it generates the counterbored, countersunk, or
nut-trapped geometry with a slider for every dimension. Adjust the hole size after a
test print with the slider instead of re-modeling.

## Where to start

If you are adding holes to an existing design, open the part in the
[Meshra builder](/builder), describe the holes you need, and watch the printability
card as you set them. If you are starting from scratch, the
[template gallery](/templates) has brackets, mounts, and enclosures with hole and
clearance parameters already exposed, so you can size a bolt hole with a slider and a
test print rather than a caliper and a guess. For the fit math behind all of these
numbers, read the [3D printing tolerances guide](/blog/3d-printing-tolerances-parts-that-fit);
for the brass-insert version of a fastener hole, read the
[heat-set insert guide](/blog/heat-set-inserts-3d-printing). See
[pricing](/pricing) for current generation allowances, or
[create an account](/sign-up) to save a part and keep tuning the fit.

A hole is not a place to guess. Model the clearance a little generous, match the recess
to the head, size the nut pocket to the flats, point the important holes up, and keep
the one number you are unsure of on a slider so a test print corrects it in seconds.
