Skip to content
Omnikalc

Shaft key sizing calculator: is your key strong and long enough for the torque?

Enter the torque, the shaft diameter and the key size to get the shear and bearing stresses, the safety factors and the key length needed.

Updated on
Your inputs
lb-in

Value out of range

in

Value out of range

in

Value out of range

in

Value out of range

in

Value out of range

ksi

Value out of range

Results

Lowest safety factor of the key

3.80

The key has a comfortable margin
Force on the key
4,000 lbf
Shear stress in the key
7,111 psi
Bearing stress on the key side
14,222 psi
Key length for a safety factor of 2
0.79 in

A key is a small piece of steel that locks a gear, a pulley or a coupling to a shaft, and it carries the whole torque through two small areas. The shaft key sizing calculator takes the torque, the shaft diameter, the key width, height and length and the yield strength of the key, and gives the force on the key, the shear stress, the bearing stress, the lowest safety factor and the key length needed for a safety factor of 2.

How the calculation works

  • Enter the torque the shaft transmits, the shaft diameter, the width, height and length of the key and the yield strength of the key material.
  • The calculator finds the force on the key, which acts at the surface of the shaft: F = 2T / d.
  • The key can fail by shear along its length, with a stress of F / (b L), or by crushing (bearing) on the side of the keyway, with a stress of F / (h/2 × L).
  • It compares each stress with the yield strength, using 0.577 × Sy for shear, and gives the lowest safety factor and the length of key that would give a safety factor of 2.

Example

A shaft of 1.5 in diameter transmits 3,000 lb-in through a 3/8 × 3/8 in square key, 1.5 in long, of steel with 54 ksi yield strength. The force on the key is 2 × 3,000 / 1.5 = 4,000 lbf. The shear stress is 4,000 / (0.375 × 1.5) = 7,111 psi and the bearing stress is 4,000 / (0.1875 × 1.5) = 14,222 psi. The safety factors are 4.38 in shear and 3.80 in bearing, so the lowest is 3.80, and a key of 0.79 in would give a factor of 2.

Why it matters

Key sizing is a standard problem in machine design. A quick check shows whether the standard key is enough for the torque, whether a longer key or a harder material is better than a wider one, and which of the shear and the bearing stress governs your case.

Good to know

The calculator assumes a uniform load along the key and a key that is free to bear on the full half-height. Real keys have stress peaks at the ends, fits that are not perfect, shock and reversing loads, which call for a larger safety factor. It does not check the shaft or the hub. Use the standards and a larger factor for shock loads.

The shaft torsion calculator checks the twist and the stress in the shaft, the bolt circle calculator finds hole positions, the bolt torque calculator sets bolt tightening, and the section modulus calculator gives the bending capacity.

Frequently asked questions

What does a shaft key do?

A key sits in matching grooves of the shaft and the hub, and it transmits torque between them while stopping the hub from turning on the shaft. It is used for gears, pulleys, couplings and sprockets. The key is often the weak link on purpose, a part that is cheap to replace if the machine jams.

How can a key fail?

It can shear across its width, along the plane between the shaft and the hub, or it can be crushed on the side that bears on the keyway. For a square key, the bearing stress is twice the shear stress, so crushing usually governs. The groove in the shaft also weakens the shaft, which must be checked for fatigue.

How do I choose the key size?

Standards such as ASME B17.1 and DIN 6885 give a width and height for each range of shaft diameters, so that the key is about a quarter of the diameter wide. The length is then chosen from the torque, usually about 1 to 1.5 times the shaft diameter. A longer key is not always better, since the load is uneven along it.

Why is the shear strength taken as 0.577 of the yield?

The distortion energy theory says that a ductile material yields in pure shear at 0.577 times its tensile yield strength. It is the standard assumption for steel. For a brittle key material, use the ultimate strength and a larger factor of safety. The value of Sy used here must be that of the key and not of the shaft.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.