Skip to main content
True Precision Machining

Keyway & keyseat size chart.

Pick the key from the shaft diameter — the standards already did the sizing. This chart gives square and flat key sizes per ANSI/ASME B17.1 with the matching keyseat depth in the shaft (half the key height) and keyway depth in the hub (half the height plus clearance), keyseat width tolerances for a side fit, and the DIN 6885 metric parallel-key table with its published t₁/t₂ depths. We machine keyseats and keyways daily — milled in the shaft, cut in the bore.

Inch standard
ANSI/ASME B17.1
Metric standard
DIN 6885
Keyseat depth · shaft
h / 2
Keyway depth · hub
h/2 + clearance

01 · How a keyed joint works

Half in the shaft, half in the hub.

A parallel key is a square or rectangular bar that sits in two matching slots — the keyseat milled into the shaft and the keyway cut into the hub bore. Torque transfers through the key’s side faces in shear and bearing; the top and bottom faces just locate it. That is why the width fit matters most: the slot widths are toleranced for a snug side fit, while the hub slot is cut slightly deeper than half the key so the assembly never binds on top of the key.

The depth split is fixed by convention: the shaft keyseat takes half the key height (h/2), and the hub keyway takes the other half plus a small clearance — 0.005″ for inch parallel keys per ANSI/ASME B17.1 practice. DIN 6885 publishes the two depths directly as t₁ (shaft) and t₂ (hub), and does not split the key evenly: roughly 57–64% of the key height sits in the shaft (t₁ ÷ h across the table; e.g. 6 × 6: t₁ = 3.5, t₂ = 2.8).

A key locates torque, not position. If the hub also needs precise radial location, pair the keyway with a controlled bore fit — see standard fits and the press-fit calculator for interference-fit hubs.

A keyed joint pulled apart: a round shaft with a slot milled along its top, a round-ended key lifted above that slot, and a hub ring with a matching slot cut into the top of its bore. Both slots are shown in red.
Parts are pulled apart and the two slots are red. Not to scale.

The three parts of a keyed joint

The key drops into the shaft, then the hub slides over both.

Keyseat
The slot milled into the shaft. The lower half of the key sits in it.
Key
A square or rectangular bar. Torque passes through its side faces, so the width fit matters most.
Keyway
The slot cut into the hub bore. It is a little deeper than half the key, which leaves clearance above the key.
End view of a keyed shaft and hub. The key width is W and its height is h. The shaft keyseat is h/2 deep and the hub keyway is h/2 plus clearance deep. W h h/2 + clearance h/2

How deep each slot is cut

Looking down the shaft. For inch keys the shaft keyseat is half the key height (h/2) and the hub keyway is h/2 plus 0.005″ clearance, so the hub never binds on top of the key. DIN 6885 lists its two depths directly as t₁ and t₂. The gap above the key is enlarged here.

Inch keys · ANSI/ASME B17.1

Key size versus shaft diameter (5/16″ to 4-1/2″)

Square keys are preferred through 6-1/2″ shafts; flat (rectangular) keys suit thin hub sections. Shaft ranges read over the first size, up to and including the second.

Shaft Ø (over–incl.) Square key (preferred) Flat (rectangular) key Keyseat width
Class 1, sq. key
W × H Shaft depth (h/2) Hub depth (+.005″) W × H Shaft depth Hub depth
5/16 – 7/16″ 3/32 × 3/32 0.0469″ 1.19 mm 0.0519″ 1.32 mm — — — .0938–.0958″ +.002 / −.000″
7/16 – 9/16″ 1/8 × 1/8 0.0625″ 1.59 mm 0.0675″ 1.71 mm 1/8 × 3/32 0.0469″ 0.0519″ .1250–.1270″ +.002 / −.000″
9/16 – 7/8″ 3/16 × 3/16 0.0938″ 2.38 mm 0.0988″ 2.51 mm 3/16 × 1/8 0.0625″ 0.0675″ .1875–.1895″ +.002 / −.000″
7/8 – 1-1/4″ 1/4 × 1/4 0.1250″ 3.17 mm 0.1300″ 3.30 mm 1/4 × 3/16 0.0938″ 0.0988″ .2500–.2520″ +.002 / −.000″
1-1/4 – 1-3/8″ 5/16 × 5/16 0.1563″ 3.97 mm 0.1613″ 4.10 mm 5/16 × 1/4 0.1250″ 0.1300″ .3125–.3145″ +.002 / −.000″
1-3/8 – 1-3/4″ 3/8 × 3/8 0.1875″ 4.76 mm 0.1925″ 4.89 mm 3/8 × 1/4 0.1250″ 0.1300″ .3750–.3770″ +.002 / −.000″
1-3/4 – 2-1/4″ 1/2 × 1/2 0.2500″ 6.35 mm 0.2550″ 6.48 mm 1/2 × 3/8 0.1875″ 0.1925″ .5000–.5020″ +.002 / −.000″
2-1/4 – 2-3/4″ 5/8 × 5/8 0.3125″ 7.94 mm 0.3175″ 8.06 mm 5/8 × 7/16 0.2188″ 0.2238″ .6250–.6280″ +.003 / −.000″
2-3/4 – 3-1/4″ 3/4 × 3/4 0.3750″ 9.52 mm 0.3800″ 9.65 mm 3/4 × 1/2 0.2500″ 0.2550″ .7500–.7530″ +.003 / −.000″
3-1/4 – 3-3/4″ 7/8 × 7/8 0.4375″ 11.11 mm 0.4425″ 11.24 mm 7/8 × 5/8 0.3125″ 0.3175″ .8750–.8780″ +.003 / −.000″
3-3/4 – 4-1/2″ 1 × 1 0.5000″ 12.70 mm 0.5050″ 12.83 mm 1 × 3/4 0.3750″ 0.3800″ 1.0000–1.0030″ +.003 / −.000″

Depths are measured at the side of the keyseat. The width tolerance applies to the keyseat in both shaft and hub for the standard clearance side fit (B17.1 Class 1) — keys are typically negative-tolerance bar stock (+.000/−.002″), so the key never jams in an in-tolerance slot. The width limits shown are for the square key; a flat key of the same width uses the same slot width. B17.1 continues with 1-1/4″ through 2-1/2″ keys for shafts past 4-1/2″ (up to 11″); below 5/16″ shafts, keys are non-standard or replaced by splines and set screws.

Metric keys · DIN 6885-1

Metric parallel keys (6 to 130 mm shafts)

DIN 6885 publishes both depths directly: t₁ in the shaft, t₂ in the hub, plus slot-width limits for each ISO fit. From 8 × 7 up the key is rectangular; at every size roughly 57–64% of the key height sits in the shaft.

Shaft Ø d (over–incl.) Key b × h (mm) Shaft depth t₁ Hub depth t₂ Slot width — P9
shaft & hub, tight
N9 shaft / JS9 hub
normal fit
6 – 8 mm 2 × 2 1.2 mm 0.0472″ 1.0 mm 0.0394″ 1.969–1.994 1.971–1.996 1.9875–2.0125
8 – 10 mm 3 × 3 1.8 mm 0.0709″ 1.4 mm 0.0551″ 2.969–2.994 2.971–2.996 2.9875–3.0125
10 – 12 mm 4 × 4 2.5 mm 0.0984″ 1.8 mm 0.0709″ 3.958–3.988 3.970–4.000 3.9850–4.0150
12 – 17 mm 5 × 5 3.0 mm 0.1181″ 2.3 mm 0.0906″ 4.958–4.988 4.970–5.000 4.9850–5.0150
17 – 22 mm 6 × 6 3.5 mm 0.1378″ 2.8 mm 0.1102″ 5.958–5.988 5.970–6.000 5.9850–6.0150
22 – 30 mm 8 × 7 4.0 mm 0.1575″ 3.3 mm 0.1299″ 7.949–7.985 7.964–8.000 7.9820–8.0180
30 – 38 mm 10 × 8 5.0 mm 0.1969″ 3.3 mm 0.1299″ 9.949–9.985 9.964–10.000 9.9820–10.0180
38 – 44 mm 12 × 8 5.0 mm 0.1969″ 3.3 mm 0.1299″ 11.939–11.982 11.957–12.000 11.9785–12.0215
44 – 50 mm 14 × 9 5.5 mm 0.2165″ 3.8 mm 0.1496″ 13.939–13.982 13.957–14.000 13.9785–14.0215
50 – 58 mm 16 × 10 6.0 mm 0.2362″ 4.3 mm 0.1693″ 15.939–15.982 15.957–16.000 15.9785–16.0215
58 – 65 mm 18 × 11 7.0 mm 0.2756″ 4.4 mm 0.1732″ 17.939–17.982 17.957–18.000 17.9785–18.0215
65 – 75 mm 20 × 12 7.5 mm 0.2953″ 4.9 mm 0.1929″ 19.926–19.978 19.948–20.000 19.9740–20.0260
75 – 85 mm 22 × 14 9.0 mm 0.3543″ 5.4 mm 0.2126″ 21.926–21.978 21.948–22.000 21.9740–22.0260
85 – 95 mm 25 × 14 9.0 mm 0.3543″ 5.4 mm 0.2126″ 24.926–24.978 24.948–25.000 24.9740–25.0260
95 – 110 mm 28 × 16 10.0 mm 0.3937″ 6.4 mm 0.2520″ 27.926–27.978 27.948–28.000 27.9740–28.0260
110 – 130 mm 32 × 18 11.0 mm 0.4331″ 7.4 mm 0.2913″ 31.912–31.974 31.938–32.000 31.9690–32.0310

Depth tolerances are +0.1 mm (keys through 6 × 6) and +0.2 mm (8 × 7 through 32 × 18; +0.3 mm from 36 × 20). Keyway width is toleranced by ISO fit class, typically P9 in both members — see the fit notes below. Slot-width limits are ISO 286 values for the nominal width b (e.g. 8 P9 = 7.949–7.985 mm). Key forms: A = round ends (end-milled pocket), B = square ends (open/through keyseat). DIN 6885 continues past 130 mm (36 × 20 at 130–150 mm and up). Source: DIN 6885-1; slot-width limits per ISO 286.

Interactive · depth control values

Keyseat calculator — key size, S and T for your shaft.

Enter the actual shaft (or bore) diameter. The calculator picks the standard key from the tables above and gives the gaugeable dimensions a print should carry: S, bottom of the shaft keyseat to the opposite side of the shaft, and T, bottom of the hub keyway to the opposite side of the bore. Default: 1-1/2″ shaft.

Units

Try:
Standard key
—
Keyseat depth at side (h/2)
—
Chordal height Y
—
S — shaft gauge dim
—
T — hub gauge dim
—
Slot width
—
End view of the shaft drawn to scale for the entered diameter, with the keyseat width, keyseat depth and the S gauge dimension. W = 0.3750″ h/2 S Drawn to scale for the entered shaft.
How this is calculated ▸

Inch (ANSI/ASME B17.1 depth control values):

  • Y = (D − √(D² − W²)) / 2 — chordal height of the slot
  • S = D − Y − H/2 — shaft: keyseat bottom to far side
  • T = D − Y + H/2 + C, C = 0.005″ — hub: keyway bottom to far side of bore

W, H = square key width and height from the table; D = shaft (or bore) diameter. Check: 1″ bore with a 1/4″ key → Y = .0159″, T = 1.114″.

Metric (DIN 6885-1): the standard publishes the depths directly, so shaft gauge dim = d − t₁, hub gauge dim = d + t₂; slot widths are the ISO 286 P9 / N9 / JS9 limits.

Limits: nominal values for the standard key that fits the entered diameter — apply the depth tolerances in the notes above, and use a flat key or a different fit class where the table says so.

02 · How to read it

Fits, tolerances, and the details that bite.

Strictly, B17.1 calls both slots “keyseats” — shop convention says keyseat in the shaft, keyway in the hub. Shaft keyseats are milled on a machining center (end mill for profile/closed seats, side cutter for sled-runner/open seats); hub keyways are typically broached, shaped, or wire-EDM’d.

  • Inch fit classes (B17.1)

    Class 1 is the default clearance side fit — bar-stock key in a keyseat cut to the width tolerances in the table (+.002/−.000″ through 1/2″ widths, +.003/−.000″ from 5/8″). Class 2 tightens the width tolerances toward line-to-line for minimal backlash; Class 3 is an interference side fit for keys that must not move (defined by agreement, not tabulated).

  • Metric fit classes (DIN 6885 / ISO 773)

    Width fit is called out as an ISO tolerance on the slot: P9 shaft + P9 hub for the tight fit (the usual keyway callout), N9 shaft + JS9 hub for an easier fit (ISO 773’s “normal,” called loose in the DIN vendor tables), H9 shaft + D10 hub for a free sliding fit. The key itself is h9 width bar stock.

  • Reversing loads want a tighter side fit

    A Class 1 / loose fit is fine under steady one-direction torque. Reversing or pulsating drives hammer the key across the side clearance and peen the slot — step up to Class 2 / P9, or eliminate the backlash entirely with an interference-fit hub sized on the press-fit calculator plus a key as mechanical backup.

  • Measuring depth in the real world

    You can’t drop a depth mic into a slot on a round surface and read h/2 directly — the surface falls away on both sides. Production drawings dimension keyseats from the opposite side of the shaft (shaft Ø minus depth, gauged over a pin or the key), which is also how B17.1’s published depth-control values work. The h/2 values here are the slot-side depths those dimensions resolve to.

  • Square vs flat keys

    Square keys are the inch default through 6-1/2″ shafts. Flat (rectangular) keys give up some bearing area to take a shallower hub cut — useful when the hub wall is thin (sheaves, thin-flange couplings) or the shaft is large and a full square key wastes section. DIN 6885 builds this in: from 8 × 7 up the metric key is already rectangular.

  • Keyseats are stress raisers

    The slot corners concentrate bending and torsional stress — a keyseat can cut a shaft’s fatigue strength dramatically. Specify filleted corners on hardened or highly loaded shafts, prefer profile (end-milled) seats away from shoulders, and check the material’s endurance data on our material datasheets before you size purely on static shear.

Technically reviewed by the True Precision Machining engineering team · Last reviewed November 2026

Standards referenced: ANSI/ASME B17.1, DIN 6885, ISO 286

Have a part that needs to be made right?

Tell us about your part and we'll quote within 24 hours. Aerospace, medical, and defense work welcome.

Did this page answer your question?