Keys and keyways are the most common method of transmitting torque between a shaft and a hub (gear, sprocket, pulley, coupling). They are simple, reliable, and field-replaceable -- when sized correctly. Undersized keys shear, undersized keyways crush, and poorly toleranced fits either seize or develop fretting corrosion that destroys both shaft and hub.
This guide covers key selection per ANSI B17.1 (Keys and Keyseats), stress analysis for shear and bearing failure, combined loading effects, and the stress concentration that keyways introduce into shaft bending calculations.
Key Types and Standard Sizes per ANSI B17.1
ANSI B17.1 standardizes three key types:
- Square keys: Width = Height = approximately 1/4 of shaft diameter. Standard for shaft diameters up to about 6.5 inches. Most common type.
- Rectangular keys: Width = approximately 1/4 of shaft diameter, Height = approximately 3/16 of shaft diameter. Used for larger shafts where a square key would be too deep.
- Woodruff keys: Semicircular cross-section. Self-aligning, easy to assemble. Common in machine tools and automotive. Not suitable for high torque or reversing loads.
Standard key sizes from ANSI B17.1 (selected):
- Shaft 0.500–0.625": Key 1/8 × 1/8"
- Shaft 0.625–0.875": Key 3/16 × 3/16"
- Shaft 0.875–1.250": Key 1/4 × 1/4"
- Shaft 1.250–1.375": Key 5/16 × 5/16"
- Shaft 1.375–1.750": Key 3/8 × 3/8"
- Shaft 1.750–2.250": Key 1/2 × 1/2"
Key length should be between 1 and 1.5 times the shaft diameter. Shorter keys have high bearing stress. Longer keys may not load uniformly due to shaft/hub deflection.
Shaft & Keyway Calculator
Size keys and keyways for shafts transmitting torque. Shear and compressive stress checks per ASME B17.1 with standard key size lookup.
Shear and Bearing Failure Analysis
Keys fail in two modes: shear along the interface between shaft and hub halves, and bearing (crushing) on the contact surfaces between key and keyway.
Shear stress on the key:
τ = (2T) / (d × W × L)
Where T is torque, d is shaft diameter, W is key width, and L is key length. The shear plane is at the shaft-hub interface, through the full width and length of the key.
Bearing stress on the key sides:
σb = (2T) / (d × (H/2) × L)
Where H is key height. Bearing acts on half the key height (the portion in the shaft or the portion in the hub). For square keys, H = W, so bearing stress is twice the shear stress -- bearing failure is more common than shear failure.
Allowable stresses depend on key material (typically AISI 1018 or 1045 steel): shear allowable is about 0.5 × yield strength; bearing allowable is about 0.9 × yield strength. For AISI 1045 (yield ~60 ksi): allowable shear ≈ 30 ksi, allowable bearing ≈ 54 ksi.
With a 2:1 design factor of safety applied: allowable shear ≈ 15 ksi, allowable bearing ≈ 27 ksi. For reversing or shock loads, increase the safety factor to 3:1 or higher.
Shaft & Keyway Calculator
Size keys and keyways for shafts transmitting torque. Shear and compressive stress checks per ASME B17.1 with standard key size lookup.
Keyway Stress Concentration on the Shaft
A keyway is a stress raiser on the shaft. The sharp corners at the bottom of the keyway create stress concentrations that reduce the shaft's fatigue strength in bending. This is particularly important for shafts subject to rotating bending loads (most shaft applications).
Stress concentration factors (Kt) for keyways per Peterson's Stress Concentration Factors:
- Sled-runner (end-milled) keyway: Kt ≈ 1.6–2.0 for bending, 1.3–1.5 for torsion
- Profile (side-milled) keyway: Kt ≈ 2.0–2.5 for bending, 1.5–2.0 for torsion
The profile keyway has higher stress concentration because of the sharp step at each end. Sled-runner keyways have a gradual runout that reduces the concentration.
When sizing a shaft with a keyway, the bending fatigue strength must be reduced by the notch sensitivity factor (q) and stress concentration factor. The effective fatigue stress concentration factor Kf is:
Kf = 1 + q(Kt − 1)
Where q is the notch sensitivity (typically 0.7–0.9 for steel shafts). A shaft that is adequate without a keyway may be undersized once the keyway stress concentration is included.
Shaft & Keyway Calculator
Size keys and keyways for shafts transmitting torque. Shear and compressive stress checks per ASME B17.1 with standard key size lookup.
Key Fits, Tolerances, and Installation
ANSI B17.1 defines three classes of fit for keys and keyways:
- Class 1 (Clearance fit): Easy assembly and disassembly. Key fits loosely. For light duty, infrequent disassembly, or applications where axial freedom is needed.
- Class 2 (Side clearance or transition fit): Key fits snugly with slight clearance or slight interference on the width. Standard for most industrial applications. Light tapping may be needed for installation.
- Class 3 (Interference fit): Key is interference fit on the width. Requires pressing or heating hub for assembly. For heavy torque, shock loads, or applications where zero backlash is critical.
Key material is typically softer than both shaft and hub so the key fails first, acting as a mechanical fuse that protects the more expensive components. AISI 1018 cold-drawn steel is standard for keys in carbon steel shafts.
Keyway depth in the shaft and hub must be carefully controlled. The standard is H/2 in the shaft and H/2 in the hub (splitting the key height equally). The keyway bottom should have a fillet radius (typically 1/64" to 1/32") to reduce stress concentration, but the key corners must be chamfered to clear the fillet.
Shaft & Keyway Calculator
Size keys and keyways for shafts transmitting torque. Shear and compressive stress checks per ASME B17.1 with standard key size lookup.
Shaft & Keyway Calculator
Size keys and keyways for shafts transmitting torque. Shear and compressive stress checks per ASME B17.1 with standard key size lookup.