Skip to calculator
Fasteners & Torque · Calculator

Allen Key Size Calculator: Hex Key for Socket, Button and Flat Head Screws

The key follows the head, not just the thread. A 1/4-20 socket head cap screw takes 3/16 in; the same thread with a button or flat head takes 5/32 in, and a 1/4-20 set screw takes 1/8 in. In metric, M6 is 5 mm for a cap screw, 4 mm for button and countersunk heads, and 3 mm for a set screw. Each size below names the table it was read from.

Pick the screw, read the key

Choose inch or metric, the head type and the size. The result updates as you change any field.

ASME B18.3 · ISO 4762 · ISO 7380-1 · ISO 10642
Hex key
--
Socket depth
--
Units

If the only key at hand is from the other system

    Solid outline: the socket (at its largest size where the standard gives it). Shaded: the right key. Dashed amber: the nearest key from the other system. All three drawn to the same scale. For metric sockets, the bars below compare the slack of the right key and of the substitute.

    Reverse lookup: what does this key drive?

      Allen wrench size chart, inch: four head types on one row

      Read across a row and the pattern shows: at every size listed, button and flat heads take a smaller key than the cap screw, and set screws a smaller one still. Coarse and fine threads of the same diameter take the same key (1/4-20 and 1/4-28 both take 3/16 in in a cap screw), because the socket is sized to the head, not the pitch. Where a cell says “not listed”, none of the tables opened for this page gives that size, so it is left blank rather than guessed. Download the full table as CSV (CC BY 4.0) (every row carries its source URLs).

      On a phone, scroll the table sideways. The size column stays in place.

      Hex key (across flats) by screw size and head type, inch series. Cap screws: AFT Fasteners table, cross-checked with Eugene Fastener and Edmund Optics. Button heads: ASME B18.3 Table 3 as reproduced by fasten.it, cross-checked with AFT. Flat heads: ASME B18.3 Table 2A as reproduced by fasten.it, AFT from #4 to 3/4. Set screws: Albany County Fasteners, cross-checked with Edmund Optics and Eugene Fastener. Read November 22, 2026.
      Screw sizeSocket head cap screwButton headFlat head (82°)Set screw
      #0 (0.060 in)0.050
      0.0500 in · 1.27 mm
      0.035
      0.0350 in · 0.889 mm
      0.035
      0.0350 in · 0.889 mm
      not listed
      #1 (0.073 in)1/16
      0.0625 in · 1.588 mm
      0.050
      0.0500 in · 1.27 mm
      0.050
      0.0500 in · 1.27 mm
      not listed
      #2 (0.086 in)5/64
      0.0781 in · 1.984 mm
      0.050
      0.0500 in · 1.27 mm
      0.050
      0.0500 in · 1.27 mm
      not listed
      #3 (0.099 in)5/64
      0.0781 in · 1.984 mm
      1/16
      0.0625 in · 1.588 mm
      1/16
      0.0625 in · 1.588 mm
      not listed
      #4 (0.112 in)3/32
      0.0938 in · 2.381 mm
      1/16
      0.0625 in · 1.588 mm
      1/16
      0.0625 in · 1.588 mm
      0.050
      0.0500 in · 1.27 mm
      #5 (0.125 in)3/32
      0.0938 in · 2.381 mm
      5/64
      0.0781 in · 1.984 mm
      5/64
      0.0781 in · 1.984 mm
      not listed
      #6 (0.138 in)7/64
      0.1094 in · 2.778 mm
      5/64
      0.0781 in · 1.984 mm
      5/64
      0.0781 in · 1.984 mm
      1/16
      0.0625 in · 1.588 mm
      #8 (0.164 in)9/64
      0.1406 in · 3.572 mm
      3/32
      0.0938 in · 2.381 mm
      3/32
      0.0938 in · 2.381 mm
      5/64
      0.0781 in · 1.984 mm
      #10 (0.190 in)5/32
      0.1562 in · 3.969 mm
      1/8
      0.1250 in · 3.175 mm
      1/8
      0.1250 in · 3.175 mm
      3/32
      0.0938 in · 2.381 mm
      1/4 in3/16
      0.1875 in · 4.763 mm
      5/32
      0.1562 in · 3.969 mm
      5/32
      0.1562 in · 3.969 mm
      1/8
      0.1250 in · 3.175 mm
      5/16 in1/4
      0.2500 in · 6.35 mm
      3/16
      0.1875 in · 4.763 mm
      3/16
      0.1875 in · 4.763 mm
      5/32
      0.1562 in · 3.969 mm
      3/8 in5/16
      0.3125 in · 7.938 mm
      7/32
      0.2188 in · 5.556 mm
      7/32
      0.2188 in · 5.556 mm
      3/16
      0.1875 in · 4.763 mm
      7/16 in3/8
      0.3750 in · 9.525 mm
      not listed1/4
      0.2500 in · 6.35 mm
      not listed
      1/2 in3/8
      0.3750 in · 9.525 mm
      5/16
      0.3125 in · 7.938 mm
      5/16
      0.3125 in · 7.938 mm
      1/4
      0.2500 in · 6.35 mm
      5/8 in1/2
      0.5000 in · 12.7 mm
      3/8
      0.3750 in · 9.525 mm
      3/8
      0.3750 in · 9.525 mm
      5/16
      0.3125 in · 7.938 mm
      3/4 in5/8
      0.6250 in · 15.875 mm
      not listed1/2
      0.5000 in · 12.7 mm
      3/8
      0.3750 in · 9.525 mm
      7/8 in3/4
      0.7500 in · 19.05 mm
      not listed9/16
      0.5625 in · 14.288 mm
      not listed
      1 in3/4
      0.7500 in · 19.05 mm
      not listed5/8
      0.6250 in · 15.875 mm
      not listed
      1-1/8 innot listednot listed3/4
      0.7500 in · 19.05 mm
      not listed
      1-1/4 in7/8
      0.8750 in · 22.225 mm
      not listed7/8
      0.8750 in · 22.225 mm
      not listed
      1-3/8 innot listednot listed7/8
      0.8750 in · 22.225 mm
      not listed
      1-1/2 in1
      1.0000 in · 25.4 mm
      not listed1
      1.0000 in · 25.4 mm
      not listed

      Decimal and millimetre values are the exact conversions of the nominal fraction (1 in = 25.4 mm). The 0.028, 0.035 and 0.050 in keys have no common fraction and are sold by their decimal size.

      Hex key size chart, metric

      Metric is more regular than inch: from M3 to M16 the button head and the countersunk head take the same key, always smaller than the cap screw's. The socket limits under each key come from the ISO tables themselves. They matter in the next sections, because they decide whether an inch key fits.

      Hex socket size s (nominal, with the socket limits in mm) by thread and head type. Cap screws: ISO 4762:2004 Table 1 for M1.6 to M12, Eugene Fastener for M14 to M24. Button heads: ISO 7380-1:2022 Table 1. Countersunk heads: ISO 10642:1997 Table 1. Set screws: Albany County Fasteners, cross-checked with Edmund Optics. Read November 22, 2026.
      ThreadCap screw (ISO 4762)Button head (ISO 7380-1)Countersunk (ISO 10642)Set screw
      M1.61.5 mm
      socket 1.52 to 1.58
      not listednot listednot listed
      M21.5 mm
      socket 1.52 to 1.58
      not listednot listed0.9 mm
      M2.52 mm
      socket 2.02 to 2.08
      not listednot listed1.3 mm
      M32.5 mm
      socket 2.52 to 2.58
      2 mm
      socket 2.02 to 2.08
      2 mm
      socket 2.02 to 2.06
      1.5 mm
      M43 mm
      socket 3.02 to 3.08
      2.5 mm
      socket 2.52 to 2.58
      2.5 mm
      socket 2.52 to 2.58
      2 mm
      M54 mm
      socket 4.02 to 4.095
      3 mm
      socket 3.02 to 3.08
      3 mm
      socket 3.02 to 3.08
      2.5 mm
      M65 mm
      socket 5.02 to 5.14
      4 mm
      socket 4.02 to 4.095
      4 mm
      socket 4.02 to 4.095
      3 mm
      M86 mm
      socket 6.02 to 6.14
      5 mm
      socket 5.02 to 5.14
      5 mm
      socket 5.02 to 5.14
      4 mm
      M108 mm
      socket 8.025 to 8.175
      6 mm
      socket 6.02 to 6.14
      6 mm
      socket 6.02 to 6.14
      5 mm
      M1210 mm
      socket 10.025 to 10.175
      8 mm
      socket 8.025 to 8.175
      8 mm
      socket 8.025 to 8.175
      6 mm
      M1412 mmnot listed10 mm
      socket 10.025 to 10.175
      not listed
      M1614 mm10 mm
      socket 10.025 to 10.175
      10 mm
      socket 10.025 to 10.175
      8 mm
      M2017 mmnot listed12 mm
      socket 12.032 to 12.212
      10 mm
      M2419 mmnot listednot listednot listed

      ISO 10642 prints two maximum socket sizes for each thread. The larger one is used here, so the fit checks below lean toward more slack, not less. ISO 10642 has been revised since 1997 (editions 2019 and 2026); the socket column of the newer editions was not compared for this page.

      How deep the key goes: socket depth by head type

      A smaller key is one difference between a button head and a cap screw. Depth is the other. ISO gives a minimum key engagement t for each head, and the low heads give the key much less to bite on. On an M6, the cap screw guarantees 3 mm of engagement on a 5 mm hex; the button head guarantees 2.08 mm on a 4 mm hex. Smaller hex, 31% less depth, same hand on the wrench.

      Minimum key engagement t (mm) and the change against the cap screw of the same thread: (t_head − t_cap) / t_cap. Sources: ISO 4762:2004, ISO 7380-1:2022 and ISO 10642:1997, Table 1 of each. The M16 cap screw row is not in the ISO 4762 preview, so its change is not computed.
      ThreadCap screw t minButton head t minvs capCountersunk t minvs cap
      M31.3 mm
      2.5 mm key
      1.04 mm
      2 mm key
      -20%1.1 mm
      2 mm key
      -15%
      M42 mm
      3 mm key
      1.3 mm
      2.5 mm key
      -35%1.5 mm
      2.5 mm key
      -25%
      M52.5 mm
      4 mm key
      1.56 mm
      3 mm key
      -38%1.9 mm
      3 mm key
      -24%
      M63 mm
      5 mm key
      2.08 mm
      4 mm key
      -31%2.2 mm
      4 mm key
      -27%
      M84 mm
      6 mm key
      2.6 mm
      5 mm key
      -35%3 mm
      5 mm key
      -25%
      M105 mm
      8 mm key
      3.12 mm
      6 mm key
      -38%3.6 mm
      6 mm key
      -28%
      M126 mm
      10 mm key
      4.16 mm
      8 mm key
      -31%4.3 mm
      8 mm key
      -28%
      M16not in the 2004 preview5.2 mm
      10 mm key
      –4.8 mm
      10 mm key
      –

      In the shop this turns into three habits. Push the key to the bottom of a button head socket before you load it; if it stops short, there is paint, chips or threadlocker in the socket, and a pick costs less than an extractor. Use the short arm of the L for breaking a button head loose, so the long arm does not tempt you past what 2 mm of engagement will carry. And keep a dedicated, unworn key for the M4 to M8 button heads, the range where the engagement is between 1.3 and 2.6 mm.

      Using an inch key in a metric socket

      Most conversion charts pair keys by nearest size, as if 3/16 in and 5 mm were the same tool. They are not, and the error has a size. The slack between a key and its socket, across the flats, runs between two limits:

      slack min = socket smin − key amax   ·   slack max = socket smax − key amin

      Socket limits come from ISO 4762. Key limits come from the AFT Fasteners key table, which lists across-flats maximum and minimum for each inch and metric key. If the smallest key is wider than the largest socket, it will not go in. If the least slack of the substitute is larger than the most slack the right key can ever have, the substitute is loose in every case, and loose is how sockets round out.

      Nearest inch key in an ISO 4762 cap screw socket: slack across flats in mm, computed with the equation above. Socket limits: ISO 4762:2004 Table 1. Key limits: AFT Fasteners, short-arm SAE and metric key tables. Computed November 22, 2026.
      SocketSocket limits (mm)Slack with the right metric keyNearest inch keySlack with the inch keyVerdict
      1.5 mm
      M2 cap screw
      1.52 to 1.580.02 to 0.111/16 in
      1.588 mm
      -0.067 to 0.018 (can interfere)may not enter
      2 mm
      M2.5 cap screw
      2.02 to 2.080.02 to 0.115/64 in
      1.984 mm
      0.036 to 0.122usable in a pinch
      2.5 mm
      M3 cap screw
      2.52 to 2.580.02 to 0.113/32 in
      2.381 mm
      0.14 to 0.225loose
      3 mm
      M4 cap screw
      3.02 to 3.080.02 to 0.121/8 in
      3.175 mm
      none: key 0.057 to 0.155 mm too widewill not enter
      4 mm
      M5 cap screw
      4.02 to 4.0950.02 to 0.1355/32 in
      3.969 mm
      0.053 to 0.166usable in a pinch
      5 mm
      M6 cap screw
      5.02 to 5.140.02 to 0.183/16 in
      4.763 mm
      0.258 to 0.416loose
      6 mm
      M8 cap screw
      6.02 to 6.140.02 to 0.191/4 in
      6.35 mm
      none: key 0.159 to 0.33 mm too widewill not enter
      8 mm
      M10 cap screw
      8.025 to 8.1750.025 to 0.2255/16 in
      7.938 mm
      0.088 to 0.276usable in a pinch
      10 mm
      M12 cap screw
      10.025 to 10.1750.025 to 0.2253/8 in
      9.525 mm
      0.5 to 0.701loose

      Three of these are usable in a pinch: 5/64 in for a 2 mm socket, 5/32 in for a 4 mm socket and 5/16 in for an 8 mm socket, because their slack overlaps the right key's range. 3/16 in in a 5 mm socket starts at 0.258 mm of play, already more than the 0.180 mm worst case of a real 5 mm key. A 1/4 in key will not enter a 6 mm socket at all: its smallest size, 6.299 mm, is wider than the largest 6 mm socket, 6.14 mm.

      The reverse direction, a metric key in an inch socket, cannot be checked the same way here, because the socket limits of ASME B18.3 are not in any table opened for this page. The calculator gives the nominal difference instead. A 5 mm key is 0.238 mm wider than a 3/16 in key, so it should not enter a 3/16 in socket; do not drive it in.

      Four mistakes in published Allen wrench charts, and the correction

      These come from charts on the first page of results for this search, read on November 22, 2026. Each correction cites the table it comes from.

      “Flat head socket screws use the same key as cap screws of the same thread.” Not in either system. A 1/4-20 flat head takes 5/32 in (ASME B18.3 Table 2A; AFT), not the 3/16 in of the cap screw. An M6 ISO 10642 flat head takes 4 mm, not 5 mm. The flat head takes the same key as the button head, at every size where both are listed (#0 to 5/8 in, M3 to M16).

      A 3/8-16 button head listed with a 1/4 in key. The button head table gives a 0.219 in socket, which is 7/32 in (ASME B18.3 Table 3; AFT lists 7/32 in too). A 1/4 in key cannot enter a 7/32 in socket, so the reader who trusts the chart is left with a key that does not fit and no explanation.

      A #4 set screw listed with a 1/16 in key. Two other charts give 0.050 in (Albany County Fasteners; Edmund Optics). 1/16 in is the #6 set screw key. Grab a 1/16 in key for a #4 set screw and it will not go in; grab a 0.050 in key for a #6 and it sits 0.0125 in under size.

      “5 mm = 3/16 in”, “6 mm = 7/32 in”, “7 mm = 1/4 in” in conversion tables. These are nearest sizes, not equivalents. 3/16 in is 4.763 mm, 7/32 in is 5.556 mm and 1/4 in is 6.350 mm. The table above shows what the 0.238 mm gap between 5 mm and 3/16 in does to the fit. A related error: the key size is not the thread diameter. It is the width across the flats of the socket.

      Three worked examples

      1. 3/8-16 button head, inch. ASME B18.3 Table 3 gives a 0.219 in socket: key 7/32 in = 0.21875 in = 5.556 mm. Nearest metric keys: 6 mm is 0.444 mm wider (will not enter), 5 mm is 0.556 mm narrower, 10.0% of the key, on top of the normal slack. Neither is a substitute.
      2. M6 countersunk head, ISO 10642. Key 4 mm, socket 4.020 to 4.095 mm, minimum engagement 2.2 mm. The right 4 mm key (3.96 to 4.00 mm) leaves 4.020 − 4.00 = 0.020 to 4.095 − 3.96 = 0.135 mm. A 5/32 in key (3.929 to 3.967 mm) leaves 4.020 − 3.967 = 0.053 to 4.095 − 3.929 = 0.166 mm: usable in a pinch.
      3. M6 cap screw, ISO 4762. Key 5 mm, socket 5.02 to 5.14 mm. Right key: 0.020 to 0.180 mm of slack. A 3/16 in key (4.724 to 4.763 mm) leaves 5.02 − 4.763 = 0.258 to 5.14 − 4.724 = 0.416 mm: loose in every case.

      And the reverse lookup: a 5/32 in key drives a #10 cap screw, a 1/4 in button or flat head and a 5/16 in set screw. One key, four different screws.

      Next step for the same screws: the socket head cap screw counterbore chart, the flat head countersink chart, the clearance hole chart and the bolt torque chart.

      Questions about Allen key sizes

      What size Allen key fits a 1/4-20 screw?

      It depends on the head. A 1/4-20 socket head cap screw takes a 3/16 in key, a 1/4-20 button head or flat head takes 5/32 in, and a 1/4-20 set screw takes 1/8 in. The thread pitch does not change the key: 1/4-28 takes the same keys.

      What size hex key fits an M6 screw?

      An M6 socket head cap screw (ISO 4762) takes a 5 mm key. M6 button head (ISO 7380-1) and M6 countersunk flat head (ISO 10642) screws take 4 mm. An M6 set screw takes 3 mm.

      Can I use a 3/16 in key on a 5 mm socket?

      It goes in, but it fits loose. With the limits used on this page, a 3/16 in key leaves 0.258 to 0.416 mm of slack in an M6 cap screw socket, while the right 5 mm key leaves 0.020 to 0.180 mm. That extra play is what rounds a socket under torque.

      Do flat head socket screws use the same key as cap screws?

      No. A 1/4-20 flat head socket cap screw takes 5/32 in, not the 3/16 in of the cap screw, and an M6 ISO 10642 flat head takes 4 mm, not 5 mm. In both systems the flat head takes the same key as the button head of the same thread, at every size where both are listed (#0 to 5/8 in, M3 to M16).

      Not on this page yet

      Sources

      Cite this page

      ToolSpecVault Engineering Data Team. (2026, November 22). Allen Key Size Calculator. ToolSpecVault. https://toolspecvault.com/allen-key-hex-key-size-calculator/

      Published 2026-11-22 · table rows read 2026-11-22 · text last checked 2026-11-22 · The calculator and the tables on this page read the same data, and the worked examples use the calculator's own equations.