Keyway Dimensions & Size Chart — Standard Key and Keyway Sizes

Getting keyway dimensions right starts with the standard for your shaft diameter. Key width, key height, shaft keyseat depth, and hub keyway depth are all defined by the shaft size and the applicable standard — ANSI B17.1 for inch-series keys, DIN 6885 or ISO 773 for metric. This page is a complete reference for standard keyway and key dimensions, how to calculate keyway depth, fit classes, and tolerances.

Bookmark this page as a quick reference — and if you need custom internal keyway tooling cut to any of these dimensions, that’s what we do.

How Keyway Dimensions Are Defined

A keyed connection involves four dimensional relationships, all driven by the shaft diameter:

Key width (b or W) — the width of the key across its bearing faces. This is the dimension that transmits torque and the one held to the tightest tolerance. Key width is standardized by shaft diameter range.

Key height (h or H) — the total height (or thickness) of the key. For square keys, height equals width. For rectangular keys, height is less than width.

Shaft keyseat depth (t₁) — how deep the keyseat is cut into the shaft, measured from the shaft surface to the bottom of the keyseat.

Hub keyway depth (t₂) — how deep the keyway is cut into the bore wall of the hub, measured from the bore surface to the bottom of the keyway.

The key sits partly in the shaft keyseat and partly in the hub keyway. The sum of the two depths, accounting for fit, equals the key height. Getting the hub keyway depth right is what ensures the key seats correctly and transmits torque without excessive clearance or interference.

ANSI B17.1 — Standard Inch Keyway Dimensions

The following are standard square and rectangular parallel key dimensions per ANSI B17.1 for common shaft diameter ranges. All dimensions in inches. Verify against your specific print before machining.

Shaft Diameter (in)Key Width (in)Key Height (in)Shaft Keyseat Depth (in)Hub Keyway Depth (in)
5/16 – 7/163/323/323/643/64
7/16 – 9/161/83/323/643/64
9/16 – 7/83/161/81/161/16
7/8 – 1¼1/43/163/323/32
1¼ – 1⅜5/161/41/81/8
1⅜ – 1¾3/81/41/81/8
1¾ – 2¼1/23/83/163/16
2¼ – 2¾5/87/167/327/32
2¾ – 3¼3/41/21/41/4
3¼ – 3¾7/85/85/165/16
3¾ – 4½13/43/83/8
4½ – 5½7/87/167/16
5½ – 6½11/21/2

Note on square vs. rectangular keys: For shaft diameters up to roughly 6.5″, ANSI B17.1 specifies square keys (width = height) for smaller shafts and rectangular keys (height less than width) for larger shafts. Some applications use rectangular keys on smaller shafts where radial space in the hub is limited. Always confirm which the print calls for.

DIN 6885 — Standard Metric Keyway Dimensions

Standard parallel key and keyway dimensions per DIN 6885/1 for common metric shaft diameter ranges. All dimensions in millimeters. ISO 773 dimensions are equivalent for most common sizes.

Shaft Diameter (mm)Key Width b (mm)Key Height h (mm)Shaft Keyseat Depth t₁ (mm)Hub Keyway Depth t₂ (mm)
6 – 8221.21.0
8 – 10331.81.4
10 – 12442.51.8
12 – 17553.02.3
17 – 22663.52.8
22 – 30874.03.3
30 – 381085.03.3
38 – 441285.03.3
44 – 501495.53.8
50 – 5816106.04.3
58 – 6518117.04.4
65 – 7520127.54.9
75 – 8522149.05.4
85 – 9525149.05.4
95 – 110281610.06.4
110 – 130321811.07.4
Conveyor Pulley

How to Calculate Hub Keyway Depth

If you need to determine the hub keyway depth for a keyway and it’s not directly given on the print, there are two common ways it’s expressed:

Method 1 — Standard depth from the table. For a standard key, the hub keyway depth (t₂) is given directly in the tables above by shaft diameter. This is the most common approach.

Method 2 — Depth measured to the opposite side of the bore (shaft diameter + allowance). Some prints dimension the keyway depth as a total measurement from the bottom of the keyway across to the opposite bore wall. This “D + T” dimension equals the bore diameter plus the keyway depth minus a small allowance, and is used because it’s easier to measure with a pin and micrometer during machining. If your print gives a “D + T” or “bore plus keyway” dimension, that’s what this is.

For a standard parallel key, the practical rule is: the hub keyway depth is approximately half the key height plus a small clearance allowance for the fit class. The tables above already account for this — use them directly rather than calculating from scratch unless your application is non-standard.

Keyway Fit Classes and Tolerances

The fit between the key and the keyway determines how the assembly behaves under load. ANSI B17.1 defines three fit classes:

Class 1 — Free fit. Clearance on both the key width and the keyway. Used where easy assembly and disassembly is needed and some backlash is acceptable. Hub keyway width tolerance is typically +0.002″/-0.000″ over nominal key width for common sizes.

Class 2 — Normal fit (most common). Slight clearance between key and hub keyway; the key is a snug or light press fit into the shaft keyseat. This is the standard fit for most industrial power transmission — gears, couplings, pulleys, sprockets. Hub keyway width is typically held to the key width +0.002″/-0.000″.

Class 3 — Close fit. Transition or interference fit for high-precision or reversing-load applications where any backlash would cause problems. Requires the tightest tolerances on both the key and the keyway.

Metric tolerances (DIN 6885): Hub keyway width tolerance is designated Js9 for a normal fit, P9 for a tight/interference fit, and D10 for a loose fit. These are ISO tolerance grades applied to the nominal key width.

Practical takeaway: For the internal hub keyway, width is the critical dimension. A keyway that’s oversize on width lets the key rock under cyclic load, which causes fretting and eventually wallows out the slot. NMT keyseat millers hold keyslot width within ±0.0002″, which satisfies Class 3 requirements.

Parts With Multiple Keyways

Woodruff Key Dimensions

Woodruff keys — the half-moon keys used on tapered and smaller shafts — follow their own standard, ANSI B17.2. Woodruff keys are identified by a key number where the last two digits give the nominal diameter in eighths of an inch and the preceding digits give the width in thirty-seconds of an inch.

For example, a #808 Woodruff key is 8/32″ (1/4″) wide and 8/8″ (1″) in nominal diameter. If your application uses Woodruff keys, reference ANSI B17.2 for the specific keyseat width, depth, and cutter dimensions by key number.

Note: Woodruff keyseats are typically cut on the external shaft surface with a Woodruff cutter — a standard, off-the-shelf operation. NMT’s tooling addresses internal keyways in bores, which is the harder machining problem.

Common Keyway Dimensioning Questions

Where does the keyway depth get measured from?
Hub keyway depth (t₂) is measured radially from the bore surface to the bottom of the keyway. Shaft keyseat depth (t₁) is measured from the shaft surface to the bottom of the keyseat.

Is the hub keyway depth the same as the shaft keyseat depth?
Not always. For square keys they’re often equal, but for rectangular keys and metric standards the shaft keyseat is usually deeper than the hub keyway (compare the t₁ and t₂ columns in the DIN table above). Always use the correct column for the component you’re machining.

What if my shaft diameter falls exactly on a boundary in the table?
Standards define the ranges to be inclusive of the upper bound. When a diameter sits exactly on a boundary, the convention is to use the larger key size — but verify against your print, which governs.

Keyway Broaching for Airplane Landing Gear

Need Tooling Cut to These Dimensions?

Any of the keyway dimensions in the tables above — or any custom, non-standard dimension — can be milled as an internal keyway with a custom NMT keyseat miller. We manufacture tooling to your exact bore diameter and keyway width, depth, and length, in inch or metric standards, including blind bores with no relief hole required.

Tell us the bore diameter, keyway width, and depth from your print and we’ll quote custom tooling.

Call: 513-541-6682
Email: nationalmachinetoolco@gmail.com

National Machine Tool Co. — Cincinnati, OH — Over 100 years manufacturing custom keyseat millers to any standard or custom keyway dimension.