Hex bolts, hex cap screws, socket-head screws and flange bolts can share a thread size while requiring different tools and clearances.
Across flats versus across corners
A hex wrench or socket fits the distance across opposite flats. Across-corners diameter is larger and matters for surrounding clearance, but it is not the wrench label.
Avoid universal head-size assumptions
Product standards and head styles differ. Measure an existing fastener or consult the exact manufacturer drawing or governing standard before designing a counterbore or tool-access envelope.
Important limitation
A wrench that fits does not identify the bolt grade, thread or safe torque.
A wrench that fits does not identify the bolt grade, thread or safe torque.