- ANSI B17.1: Keys and Keyseats. Inch parallel keys, sizes by shaft diameter, Class 1 and Class 2 fits.
- ANSI B17.2: Woodruff Keys and Keyseats.
- ISO 773 / DIN 6885-1: parallel keys and keyways, metric. DIN 6888: Woodruff keys. DIN 6892: calculation and design of parallel keys.
- ISO 286-1: limits and fits, used here for the keyway width deviations.
- Budynas, R. G. and Nisbett, J. K.: Shigley’s Mechanical Engineering Design, chapter 7 (keys and pins, Tables 7-1 and 7-6).
- Machinery’s Handbook, Industrial Press: keys and keyseats, Moore’s strength factor for keyed shafts.
- Pilkey, W. D. and Pilkey, D. F.: Peterson’s Stress Concentration Factors. Juvinall, R. C.: Fundamentals of Machine Component Design.
- Tables not yet verified. The built-in ANSI B17.1 and DIN 6885-1 size tables are the widely published values. Check each size against a licensed copy of the standard before putting it on a drawing.
- For informational use only. This calculator is provided as an engineering aid. Results must be verified by a qualified engineer before use in any safety-critical application. KasperCalc assumes no liability for design decisions made using these results.
Keyway Design Calculator: Key Size, Key Shear and Bearing Stress, Minimum Key Length and Keyway Tolerances
Pick a key for a shaft and a torque, check it, and find the minimum length | ANSI B17.1, ISO/DIN 6885-1, Woodruff keys, Shigley’s method
The Woodruff tables are not built in yet. The key number gives the width and diameter; take the height and seat depth from ANSI B17.2 (or DIN 6888).
Peak or start-up torque (optional)
A one-off torque such as a motor’s breakdown torque or a jam. It is checked against yield with no design factor. A NEMA Design B motor can reach about 2 to 2.5 times its rated torque at breakdown.
Free for a hub that slides along the key, normal for most fixed hubs, close for reversing or shock loads.
Results update as you type.
Green is under 80% of the allowable, amber 80–100%, red over. The red dot marks the check that governs. The thick lines are the faces that bear: the shaft pushes on the key below the shaft surface, and the key pushes on the hub above it. The dashed red line is the shear plane.
| Check | Applied | Allowable | MS |
|---|
| Failure | Torque | × design torque |
|---|
Overview
A key carries torque from a shaft into a hub through two side faces. The shaft pushes on the part of the key below the shaft surface; the part above the surface pushes on the hub. Between the two, the key is loaded in shear across the plane of the shaft surface.
That gives three ways for the key joint itself to fail: the key shears, the shaft keyseat crushes, or the hub keyway crushes. A fourth is the shaft, weakened by the keyseat, yielding in torsion or cracking in fatigue at the end of the keyseat. This page checks all four and answers three questions: is this key OK, what is the shortest key that works, and what fails first.
A key is cheap and easy to replace, which is why it is often sized to be the weakest link. When the torque is high, reverses, or comes with heavy shock, a spline, a shrink fit or a taper-lock bushing usually does better than a longer key.
Standards & Sizing
The standards size the key from the shaft diameter, so the key is in proportion to the shaft. ANSI B17.1 gives inch keys, square or rectangular, with the keyseat cut to half the key height in both the shaft and the hub. ISO/DIN 6885-1 gives metric keys with separate depths t₁ in the shaft and t₂ in the hub; t₁ is the larger, so the key sits deeper in the shaft. Only the length is left to the designer, and that is what the strength checks set.
- 1-1/2 in shaft → 3/8 × 3/8 in square key (ANSI B17.1, shafts over 1-3/8 to 1-3/4 in).
- Ø 40 mm shaft → 12 × 8 mm key, t₁ = 5.0 mm, t₂ = 3.3 mm (DIN 6885-1, shafts over 38 to 44 mm).
Woodruff keys are numbered by size. In ANSI B17.2 the last two digits are the key diameter in eighths of an inch and the digits in front are the width in thirty-seconds: No. 204 is 1/16 × 1/2 in, No. 1212 is 3/8 × 1-1/2 in.
Torque & Force
From power and speed:
The design torque includes the service factor for the kind of load, and the key sees it as a force at the shaft surface:
Taking the force at the shaft surface is Shigley’s convention and is slightly conservative; DIN 6892 takes it at the middle of the contact height, a little further out.
Shear & Bearing
φ is the number of keys that carry load (1, or 1.5 for two keys). Shigley’s basis compares the shear with the shear yield strength from the distortion-energy theory, and the bearing stress with the yield strength of the weaker of the two parts in contact:
For a square key the bearing face is only half the key height, while the shear plane is the full key width, so bearing usually governs. It governs harder still when the hub is aluminum or iron, which is why the hub material matters.
Effective Length & Multiple Keys
Rounded key ends sit in the rounded ends of an end-milled keyseat and carry no load. Form A (both ends round) loses one key width, form C one half, form B nothing:
Load is not spread evenly along a long key: the shaft twists along the hub, so the end where the torque enters takes more than its share. Length beyond about 1.5 D adds little real capacity, and the page warns when the key or the required length goes past it. Two keys at 180° are counted as 1.5 keys (the DIN 6892 load-sharing factor of 0.75 on each).
Woodruff Keys
A Woodruff key is a segment of a disc of diameter Dk and height h, sitting t₁ deep in a round-bottomed seat. The shear plane is the chord at the shaft surface, and the two bearing faces are the parts of the disc segment below and above the surface:
The key projects only a little into the hub, so the hub face is small, and the seat is deep, so the shaft is weakened more than by a parallel key. Woodruff keys suit light torque and tapered shafts, where they can rock to line up with the hub.
Shaft Weakening
For the static check the keyed shaft is taken as a plain shaft of reduced strength, using H. F. Moore’s factor:
For fatigue the stress concentration at the end of the keyseat is what matters. Shigley’s first-iteration estimates are Kt = 2.14 in bending and Kts = 3.0 in torsion for an end-milled (profile) keyseat, and Kt = 1.7 in bending for a sled-runner keyseat. The sled-runner end is gentler but needs more length. Stopping the keyseat short of a shoulder keeps its stress concentration away from the shoulder fillet’s.
Shock, Reversing Load & Speed
The service factor KA scales the steady torque for the kind of machine: 1.0 for a uniform load, rising to 1.75–2.0 for heavy shock. Use the factor your industry or gearbox maker gives where there is one.
A peak torque, such as a motor’s breakdown torque or a jam, is a different question. It is rare, so it is checked against yield with no design factor: the key and the parts around it should not yield when it happens.
A reversing torque rocks the key in its seat. It frets the faces, loosens the hub and drives fatigue cracks from the keyseat end. Use a close fit, keep the hub from moving axially, and check the shaft for fatigue. At high speed, balance the shaft and hub together with the half-key convention of ISO 8821, or the key itself unbalances the rotor.
Tolerancing & Fits
| ISO fit | Shaft keyseat width | Hub keyway width | Use |
|---|---|---|---|
| Free | H9 | D10 | Hub slides along the key |
| Normal | N9 | JS9 | General use, fixed hub |
| Close | P9 | P9 | Reversing or shock loads |
The key itself is h9 on width and h11 on height (h9 for a square section). The page works the deviations out from ISO 286 at the key size, so they are exact for the class; the depth tolerances it shows (+0.1 mm up to 6 mm keys, +0.2 mm for 8 to 50 mm) are the usual DIN 6885 values and should be checked against the standard. ANSI B17.1 has Class 1, a clearance fit, and Class 2, a side fit that may have slight interference.
Worked Example: Shigley’s Keyed Gear
The key-selection example in Shigley’s Mechanical Engineering Design (chapter 7): a 1-7/16 in shaft carries 40 hp at 600 rpm into a gear. A 3/8 in square key of cold-drawn steel with Sy = 65 kpsi is used in a shaft with Sy = 75 kpsi, with a design factor of 2.80. Load this example into the calculator.
Crushing governs, as it usually does for a square key, so the key must be at least 1.34 in long. The calculator gives the same two lengths.
Verification
The engine (js/keyway-math.js) runs in automated tests:
| Case | By hand | This page |
|---|---|---|
| Shigley keyed gear, key length for shear | 1.16 in | 1.16 in |
| Same, key length for crushing | 1.34 in | 1.34 in |
| Ø 40 mm, 12 × 8 key, 500 N·m, Leff 50 mm | τ 41.7, σshaft 100, σhub 166.7 MPa | same |
| 12 mm keyway, normal fit | N9 0 / −0.043, JS9 ±0.0215 mm | same |
| At the required length | the governing margin is exactly zero | same |