snugfit

Hex nut and screw head dimensions for 3D printed pockets (M2 to M8)

An M3 nut is 5.5 mm across flats and 2.4 mm thick; an M3 socket cap head is 5.5 mm in diameter and 3 mm tall. For a printed pocket, add 0.2 mm to the width and about 0.4 mm to the depth.

Last reviewed 30 November 2026

Hex nuts

Width across flats is what a spanner measures, and what you measure with calipers across two opposite sides. Nyloc nuts are taller than the plain nuts in this table, and flange nuts are wider at the base: measure those.

ISO 4032 hexagon nuts, in millimetres
ThreadAcross flatsAcross cornersThickness (max)
M244.61.6
M2.555.82.0
M35.56.42.4
M478.13.2
M589.24.7
M61011.55.2
M81315.06.8

Across corners is across flats divided by cos 30° (about 1.155 times). It is the diameter of the circle a hexagonal pocket is drawn in.

Socket head cap screws

ISO 4762 socket head cap screws, in millimetres
ThreadHead diameterHead heightHex key
M23.821.5
M2.54.52.52
M35.532.5
M4743
M58.554
M61065
M81386

Head height equals the thread size. Button heads and countersunk heads are different shapes with different sizes.

Sizing a nut trap

  • Width: across flats plus 0.2 mm for a nut that presses in and stays. Use plus 0.3 to 0.4 mm if the nut should drop in freely.
  • Depth: nut thickness plus 0.4 mm, so the nut sits just below the surface.
  • Leave at least 1.2 mm of solid plastic under the nut, or it will pull through when tightened.
  • Orient the pocket so it opens upward on the bed where you can. A pocket that opens sideways has a flat roof that has to bridge.

Sizing a counterbore for a cap screw

  • Diameter: head diameter plus 0.5 mm. The head needs to turn freely and a hex key needs to reach it.
  • Depth: head height plus 0.2 to 0.5 mm, so the head sits below the surface.
  • A counterbore facing down on the bed is a flat overhang. Print the part the other way up, or accept a rough ceiling inside the recess.

Try it: thumb screw knob

This knob generator uses the nut table above: pick the thread size and the hex pocket and through hole are sized for you. Change the nut pocket offset to tune the grip. Full page for this generator.

Loading the model builder…First visit downloads a 3.5 MB engine. After that, models build in about a second.

Questions

How big is an M3 nut?
5.5 mm across flats, about 6.4 mm across corners and up to 2.4 mm thick, for a standard plain hex nut.
My nut is 0.5 mm wider than the table says.
Some nuts are made to older national standards, where a few sizes differ (M10 is the common one, at 17 mm instead of 16 mm). Square nuts, nyloc nuts and flange nuts also differ. Measure the nut you have.
The printed hex pocket has rounded corners and the nut will not go in.
Add 0.1 mm to the pocket offset, or rotate the pocket so a flat side, not a corner, is at the top if it opens sideways.

Where these numbers come from

  • ISO 4032, Hexagon regular nuts (style 1). Widths across flats and nut thicknesses.
  • ISO 4762, Hexagon socket head cap screws. Head diameters, head heights and hex key sizes.

Figures from standards are nominal dimensions. Anything described as a starting point or a typical value is a commonly used figure to test from, not a measurement we have validated on your printer. How parts are sized and checked.

Generators that use this