Shaft Key & Keyway Calculator

Standard key cross-section for any inch shaft from the verified ASME B17.1 schedule (5/16–6½ in, square and rectangular), keyseat depth, and the Shigley shear and bearing checks: minimum key length for your torque, material, and design factor, with a pass/fail badge on the length you have.


ASME B17.1-1967 (R2013) · Shigley's Mechanical Engineering Design

Shaft & Key

in
lbf·in
ksi
Check a key length
in

Inch shafts over 5/16 through 6½ in (the B17.1 square-key range; metric DIN 6885 out of scope). 65 ksi ≈ cold-drawn medium-carbon key stock — enter your grade's certified yield. Keyed joints commonly carry a design factor of 2–3.

Key & Checks (ASME B17.1 · Shigley)

0.375 × 0.375in key (W × H)PASS at 2.000 in
keyseat depth 0.1875 in (H/2) · tangential force 6,667 lbf
1.094in
Minimum key length (bearing governs)
0.948in
Min length — shear
1.094in
Min length — bearing
8,889psi
Shear stress at entered length
17,778psi
Bearing stress at entered length

τ = 2T/(d·w·L) ≤ 0.577·Sy/nd; σ = 4T/(d·h·L) ≤ Sy/nd (Shigley). Key size per the verified B17.1 schedule; badge at displayed 3-decimal precision. Keep key length within the hub and roughly 1–1.5 × d; the keyseat's stress concentration on the shaft is a separate check.

About Shaft Key & Keyway Calculator (ASME B17.1)

The shaft key and keyway calculator does the two halves of key design in one pass. First the geometry: enter the shaft diameter and the ASME B17.1 schedule returns the standard key cross-section — 1/4 × 1/4 square for a 1-inch shaft, 3/8 for anything over 1-3/8 through 1-3/4, and so on through the 6-1/2 inch square-key range — along with the rectangular alternative where the standard lists one and the nominal keyseat depth of half the key height.

Then the strength: from your torque, key material yield strength, and design factor, the tool computes the tangential force F = 2T/d and checks the two classical failure modes from Shigley — shear across the key's width and bearing (crushing) on its half-height flank — reporting the minimum key length each demands and which one governs. Enter the hub length you actually have and the badge says pass or fail at the displayed precision.

How It Works

  1. Enter the shaft diameter (over 5/16 through 6-1/2 inches — the range where ASME B17.1 prefers square keys; larger rectangular-preferred shafts are out of scope). The schedule lookup is epsilon-safe: a diameter exactly on a band boundary such as 7/8 stays in the lower band, per the table's "over … to (incl.)" wording.
  2. Pick square or rectangular. The width is the same either way — the keyseat is milled the same — but the rectangular key is shorter in height, which halves nothing structurally except the bearing flank: expect a longer minimum length in bearing. The smallest band (5/16–7/16) has no rectangular key in the standard, and the tool says so instead of inventing one.
  3. Enter the torque the key must carry, the key material yield strength (65 ksi is a common cold-drawn 1045 key stock figure; enter yours), and a design factor — keyed joints commonly use 2 to 3 against yield because keys see impact and reversal.
  4. The shear check divides the tangential force over the shear plane w × L with the distortion-energy allowable 0.577·Sy/nd; the bearing check divides it over the (h/2) × L flank with Sy/nd. Bearing usually governs for rectangular keys and for square keys it is a near tie — the tool reports both minimum lengths and takes the larger.
  5. Compare with the hub: the key can only be as long as the hub it sits in, and practice keeps key length between about 1× and 1.5× the shaft diameter — if the governing minimum comes out longer, use a stronger key material, two keys at 90°, or splines. The pass/fail badge on your entered length is decided at the same 3-decimal precision the lengths display at.

Worked Example

A 1-1/2 inch shaft transmits 5,000 lbf·in. B17.1 gives a 3/8 × 3/8 square key (band 1-3/8 to 1-3/4), keyseat depth 3/16 in. Tangential force F = 2 × 5000 / 1.5 = 6,667 lbf. With 65 ksi key stock and a design factor of 2: shear allowable 0.577 × 65/2 = 18.75 ksi needs L = 6667/(0.375 × 18750) = 0.95 in; bearing allowable 32.5 ksi needs L = 4 × 5000/(1.5 × 0.375 × 32500) = 1.09 in — bearing governs. A 2-inch hub passes comfortably: at that length the key sees 8,889 psi shear and 17,778 psi bearing.

Formulas

Tangential force and shear check
F = 2T/d; τ = 2T/(d·w·L) ≤ 0.577·Sy/nd
Bearing (crushing) check
σ = 4T/(d·h·L) ≤ Sy/nd
Minimum key length
L_min = max[ 2T·nd/(d·w·0.577·Sy), 4T·nd/(d·h·Sy) ]

Standards & References

  • ASME B17.1-1967 (R2013), Keys and Keyseats — Table 1 key size versus shaft diameter (verified against two concordant published reproductions; scope over 5/16 to 6-1/2 in, the square-key-preferred range; keyseat depth = H/2 per the table)
  • Shigley's Mechanical Engineering Design, 11th ed. — keys and pins: shear and bearing failure checks with the 0.577·Sy distortion-energy shear allowable

Frequently Asked Questions

What size key do I use for a 1-inch (or 1-1/2 inch) shaft?

Per ASME B17.1: a 1-inch shaft (band over 7/8 to 1-1/4) takes a 1/4 × 1/4 square key with a 1/8 in deep keyseat; a 1-1/2 inch shaft (band over 1-3/8 to 1-3/4) takes a 3/8 × 3/8 key with a 3/16 in keyseat. The width sets the keyseat cutter; the standard also lists a shorter rectangular height for most bands.

Square or rectangular key — which should I pick?

B17.1 prefers square keys through 6-1/2 inch shafts and rectangular above (the large sizes are out of this tool's scope). Rectangular keys reduce the keyseat depth in weakened or hollow shafts, at the price of less bearing flank — the minimum length in bearing grows proportionally. If the hub is long enough, either works; the stress checks tell you.

How long does the key need to be?

Long enough that neither shear across the width nor crushing on the half-height flank exceeds its allowable: L ≥ max[2T·nd/(d·w·0.577Sy), 4T·nd/(d·h·Sy)]. Practice also keeps keys between roughly 1 and 1.5 shaft diameters — if the math demands more, upgrade the key material (the key should be slightly weaker than shaft and hub, so it fails first), fit two keys, or move to splines.

What material is key stock, and what yield strength do I enter?

Common inch key stock is cold-finished low or medium carbon steel — 1018/1045 class, with yield strengths from about 45 to 90+ ksi depending on grade and draw. Enter the certified value for your stock. Deliberately choosing a key softer than the shaft makes the cheap, replaceable part the mechanical fuse.

Why is bearing stress checked on h/2, not the full height?

Only half the key sits in the shaft keyseat; the other half stands proud into the hub keyway. The tangential force is transferred across each half-height flank, so the crushing area is (h/2) × L — which is why σ = 4T/(d·h·L) carries the factor 4 and why bearing, not shear, usually governs.

Does this calculator size the shaft too?

No — it sizes the key and keyseat for a shaft you already have. The keyseat itself weakens the shaft (a stress-concentration factor near 2 at the end-milled runout is typical); check the shaft with the shaft design calculator using the keyed-section factors, and remember set screws over keys only locate, they do not transmit rated torque.