Skip to main content
True Precision Machining
Engineering hub

Engineering · Reference

Keyway & keyseat 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); for the larger metric keys the rectangular section puts more than half the key in the shaft.

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.

End-view section of a keyed shaft and hub: a square parallel key sits half in the shaft keyseat and half in the hub keyway, with red dimensions for key width W, shaft keyseat depth equal to half the key height, and hub keyway depth equal to half the key height plus clearance. KEY WIDTH W TOP CLEARANCE (EXAGGERATED) HUB KEYWAY DEPTH = h/2 + CLEARANCE SHAFT KEYSEAT DEPTH = h/2 KEY HEIGHT h y = h/2 PARALLEL KEY JOINT — END VIEW Key sits half in the shaft keyseat, half in the hub keyway — torque shears across the key’s side faces. The hub keyway is cut h/2 + clearance deep so the assembly never binds on top of the key.

Inch keys · ANSI/ASME B17.1

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

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 tol.
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 +.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″ +.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″ +.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″ +.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″ +.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″ +.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″ +.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″ +.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″ +.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″ +.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. B17.1 continues with 1″ through 2-1/2″ keys for shafts past 3-3/4″ (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 44 mm shafts)

DIN 6885 publishes both depths directly: t₁ in the shaft, t₂ in the hub. From 8 × 7 up, keys are rectangular — more than half the key sits in the shaft.

Shaft Ø d (over–incl.) Key b × h (mm) Shaft keyway depth t₁ Hub keyway depth t₂
6 – 8 mm 2 × 2 1.2 mm 0.0472″ 1.0 mm 0.0394″
8 – 10 mm 3 × 3 1.8 mm 0.0709″ 1.4 mm 0.0551″
10 – 12 mm 4 × 4 2.5 mm 0.0984″ 1.8 mm 0.0709″
12 – 17 mm 5 × 5 3.0 mm 0.1181″ 2.3 mm 0.0906″
17 – 22 mm 6 × 6 3.5 mm 0.1378″ 2.8 mm 0.1102″
22 – 30 mm 8 × 7 4.0 mm 0.1575″ 3.3 mm 0.1299″
30 – 38 mm 10 × 8 5.0 mm 0.1969″ 3.3 mm 0.1299″
38 – 44 mm 12 × 8 5.0 mm 0.1969″ 3.3 mm 0.1299″

Depth tolerances are +0.1 mm (keys through 6 × 6) and +0.2 mm (8 × 7 and larger). Keyway width is toleranced by ISO fit class, typically P9 in both members — see the fit notes below. Key forms: A = round ends (end-milled pocket), B = square ends (open/through keyseat). DIN 6885 continues past 44 mm shafts (14 × 9 at 44–50 mm and up); rows here cover the sizes we see most.

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 June 2026

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

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.

Quotes in 24 hours