A keyway is a slot machined in a shaft or hub that holds a key, so torque passes from the shaft to a gear, pulley, coupling or rotor without slipping. It is one of the oldest and most reliable ways to transmit torque, and it is common on motor shafts, gearbox parts, conveyor rollers and small machine components. Getting it right means choosing the correct key size, tolerances, depth and machining method.

Keyway problems usually show up as loose hubs, worn keys or cracked shafts. For example, a keyway cut too wide lets the key rock under reversing loads and wear quickly, while a sharp-cornered keyway end can start a fatigue crack. In this guide, we explain keyways: types, standard sizes, tolerances and fits, how keyways are machined, stress and fatigue design, inspection, and how to specify them on drawings. For shaft fits, see our guide to tolerance for slip fit.

A keyway is a slot in a shaft (keyseat) and a matching slot in a hub that together hold a key to transmit torque. Common types are parallel keys (DIN 6885 / ISO 773, ANSI B17.1), Woodruff keys and tapered keys. Key size is chosen from the shaft diameter in standard tables; width tolerances such as P9 (tight), N9 (normal) or JS9 (loose) set the fit. Shaft keyseats are usually end-milled or slot-milled; hub keyways are broached, shaped or wire-EDM’d. Rounded keyway ends and fillet radii reduce stress concentration and fatigue risk.

In short: size the key from the shaft, choose the width fit, machine accurately and avoid sharp corners.

Key points:

  • Standards: DIN 6885, ISO 773, ANSI B17.1.
  • Fits: P9, N9, JS9 width tolerances.
  • Methods: milling for shafts, broaching or EDM for hubs.

What Is a Keyway?

A keyway is a machined slot that holds a key between a shaft and a hub.

Components:

  • Keyseat: slot in the shaft
  • Keyway: slot in the hub
  • Key: usually steel, rectangular or semicircular

For example, a pulley on a motor shaft uses a parallel key so belt torque passes into the shaft. Our CNC turning and CNC milling services machine shafts and hubs with keyways.

Key Takeaway: Above all, the slot turns a smooth fit into a torque-carrying joint.

Which Types of Keys and Keyways Exist?

Types of keys and keyways differ by shape and how they lock.

Keyway types: parallel key, Woodruff key and tapered key
Type Description Typical uses
Parallel (feather) key Rectangular key, parallel sides Most shafts and hubs
Woodruff key Semicircular key in a curved seat Small shafts, tapered fits
Tapered (gib-head) key Wedge-shaped, locks axially Heavy, older designs
Splines Multiple integral keys High torque, sliding hubs

For example, a small instrument shaft may use a Woodruff key because the curved seat is easy to cut and the key cannot slide out. Key standards such as DIN 6885 are published through DIN.

Key Takeaway: In other words, parallel keys are the default; Woodruff keys suit small shafts.

How Are Key Sizes Chosen?

Key and slot sizes are chosen from standard tables based on shaft diameter.

Example (parallel keys, DIN 6885 / ISO, approximate):

Shaft diameter Key width × height
10–12 mm 4 × 4 mm
12–17 mm 5 × 5 mm
17–22 mm 6 × 6 mm
22–30 mm 8 × 7 mm
30–38 mm 10 × 8 mm

Key length is chosen from torque and hub length. For example, a 20 mm shaft typically uses a 6 × 6 key. Always confirm with the full standard table.

Key Takeaway: For this reason, start from the standard table instead of inventing sizes.

Which Tolerances and Fits Apply to Keyways?

Tolerances and fits for keyways control how tightly the key sits in the shaft and hub.

Fit (width) Shaft keyseat Hub keyway Typical use
Tight P9 P9 Reversing loads, no play
Normal N9 JS9 General use
Free (sliding) H9 D10 Hub slides on shaft

Depth tolerances are also given in the standard. For example, a gearbox with reversing torque uses P9 to avoid key rocking. Our guide to the machining tolerance chart explains tolerance grades.

Key Takeaway: Overall, choose the width fit by load type and whether the hub slides.

How Are Key Slots Machined?

Key slots are machined differently on shafts and hubs.

Key slot being cut in a gear hub on a broaching press

Shaft keyseats:

  • End milling for closed-end keyseats
  • Slot milling (side milling) for open-end keyseats
  • Woodruff cutters for Woodruff seats

Hub slots:

  • Broaching for production
  • Shaping or slotting for small batches
  • Wire EDM for hardened hubs and precise widths

For example, a hardened gear hub slot can be wire EDM’d after heat treatment to keep its width accurate. Our guide to wire EDM explains the process.

Key Takeaway: Equally, plan hub slots before hardening, or use wire EDM after.

How Do Keyways Affect Shaft Strength?

Keyways affect shaft strength because they remove material and create stress concentrations.

Design rules:

  • Fillet radius at the keyseat bottom corners
  • Rounded (sled-runner or end-milled) ends instead of sharp ends
  • Avoid keyseats at shoulders with sharp transitions
  • Check fatigue for reversing or high-cycle loads
  • Consider splines or press fits for very high torque

For example, a shaft that cracks at the keyseat end often had a sharp end; an end-milled radius reduces stress. Our guide to heat treatment of steel covers shaft hardening.

Key Takeaway: As a rule, keep slot corners rounded on loaded shafts.

How Should Keyways Be Inspected and Specified?

Keyways should be inspected for width, depth, position and symmetry, and specified with standard references.

Inspection:

  • Width with gauge blocks, pin gauges or go/no-go keys
  • Depth with micrometers or height gauges
  • Symmetry or position relative to the shaft axis
  • Length and end shape

Specification:

  • Standard and size, such as “DIN 6885-A 6×6”
  • Width tolerance, such as N9
  • Depth dimension with tolerance
  • Symmetry or position tolerance
  • Edge breaks and radii

For example, “Keyseat 6 N9, depth 3.5 +0.1, symmetry 0.03 to A” is clear. Our quality control and inspection process checks keyway features when specified.

Key Takeaway: Finally, include symmetry to the shaft axis, not only width and depth.

FAQ

  • Q: What is a keyway?
    • A slot in a shaft or hub that holds a key to transmit torque.
  • Q: How is keyway size chosen?
    • From standard tables based on shaft diameter.
  • Q: What does P9 or N9 mean for key slots?
    • Width tolerance classes for tight (P9) or normal (N9) key fits.
  • Q: How are hub slots made?
    • By broaching, shaping or wire EDM.
  • Q: Why do shafts crack at keyways?
    • Sharp corners and ends create stress concentrations under cyclic load.

Conclusion

A keyway transmits torque reliably when its size follows the standard, its width fit suits the load, it is machined accurately and its corners are rounded. Specify width, depth and symmetry clearly. To review a shaft or hub, send your 3D model and 2D drawing to our engineers.

  • LinkedIn
  • YouTube
  • Facebook
  • Reddit