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.
| Thread | Across flats | Across corners | Thickness (max) |
|---|---|---|---|
| M2 | 4 | 4.6 | 1.6 |
| M2.5 | 5 | 5.8 | 2.0 |
| M3 | 5.5 | 6.4 | 2.4 |
| M4 | 7 | 8.1 | 3.2 |
| M5 | 8 | 9.2 | 4.7 |
| M6 | 10 | 11.5 | 5.2 |
| M8 | 13 | 15.0 | 6.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
| Thread | Head diameter | Head height | Hex key |
|---|---|---|---|
| M2 | 3.8 | 2 | 1.5 |
| M2.5 | 4.5 | 2.5 | 2 |
| M3 | 5.5 | 3 | 2.5 |
| M4 | 7 | 4 | 3 |
| M5 | 8.5 | 5 | 4 |
| M6 | 10 | 6 | 5 |
| M8 | 13 | 8 | 6 |
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.