Key Design Calculator
Free online key design calculator for mechanical engineering. Compute key shear stress τ=2T/(w·L·d), crushing stress σ_c=4T/(h·L·d), safety factors and required key length for shaft-hub torque transmission. Includes DIN 6885 sizing and material strength analysis.
Key Design Calculator
Key & Shaft Details
Torque transmitted through the key joint
Engaged length of the key in the hub
Yield strength of the key material
Typically 2–4 for steady, 3–4 for shock duty
Required Key Length
39.5mm
Minimum key length to meet the target safety factor of 2. Current entry: 70 mm.
Design is SAFE — adequate margins20.41MPa
63.49MPa
3.31
1.77
885.9Nm
39.5mm
20.41MPa
Actual shear stress in the key
63.49MPa
Actual crushing stress in the key
3.31
τ_allowable / τ_actual
1.77
σ_c,allowable / σ_c,actual
885.9Nm
min(T_shear, T_crush)
39.5mm
To meet target safety factor
Result Summary
| Shaft Diameter | 50 mm |
| Key w × h | 14 × 9 mm |
| Applied Torque | 500 Nm |
| Shear Stress (τ) | 20.41 MPa |
| Crushing Stress (σ_c) | 63.49 MPa |
| Shear FS | 3.31 |
| Crush FS | 1.77 |
| Verdict | SAFE — adequate margins |
Interactive Diagram
Diagram updates live with your inputs — the SAFE/UNSAFE badge and arrow colours reflect whether the actual stresses stay within the allowable limits.
Visualizations
Stresses vs Allowable (MPa)
Governing Utilization
Formula
A key transmits torque through two parallel failure modes: shear across the key cross-section at the shaft-hub interface, and crushing (bearing) on the key side faces. The lower of the two governing capacities sets the torque the joint can carry.
Alternative Form
Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| T | Applied torque | Nm | Torque transmitted through the key joint |
| w | Key width | mm | Width of the key in the axial-radial plane |
| h | Key height | mm | Total height of the key (half in shaft, half in hub) |
| L | Key length | mm | Engaged length of the key in the hub |
| d | Shaft diameter | mm | Diameter of the shaft at the keyway |
| τ | Shear stress | MPa | Actual shear stress in the key |
| σ_c | Crushing stress | MPa | Actual bearing (crushing) stress on the key faces |
| FS | Factor of safety | — | Allowable stress divided by actual stress (both modes) |
Explanation
The shear formula τ = 2T/(w·L·d) arises because the torque T produces a tangential force F = T/(d/2) at the shaft surface; this force is resisted by two shear planes of area w·L, giving τ = F/(2·w·L) = 2T/(w·L·d) after converting torque units. The crushing formula σ_c = 4T/(h·L·d) uses the projected bearing area h·L on each of the two key faces (effective height h/2 each). Comparing each actual stress to its allowable value gives the two safety factors; the joint is safe only when both exceed the target.
Derivation
Force at key interface: F = T / (d/2). Shear area = 2·w·L → τ = F/(2·w·L) = (2T/d)/(2·w·L) = 2T/(w·L·d). Bearing area = 2·(h/2)·L = h·L → σ_c = F/(h·L) = (2T/d)/(h·L) = 2T/(h·L·d)·1000 in consistent units, equivalently 4T/(h·L·d) when T is in N·m. Rearranging for capacity: T_shear = w·L·d·τ_all/2 and T_crush = h·L·d·σ_c,allow/4.
Step-by-Step Calculation
Follow each step to understand how the result is calculated from your inputs.
Read the input geometry, material and target safety factor.
Compute allowable stresses from yield strength and target safety factor.
Compute the actual shear stress in the key.
Compute the actual crushing (bearing) stress in the key.
Evaluate the safety factors for both failure modes.
Determine torque capacity and the required key length; compare against the standard.
Worked Examples
See how the calculator works with different scenarios.
Scenario
A 50 mm shaft carries a 500 Nm gear load using a 14 × 9 key, 70 mm long, in AISI 1045 steel.
Inputs
Calculation
τ = 2·500/(14·70·50)·1000 = 20.4 MPa; σ_c = 4·500/(9·70·50)·1000 = 63.5 MPa; τ_all = 0.3·450/2 = 67.5 MPa; σ_c,all = 0.5·450/2 = 112.5 MPa
Result
SF_shear = 3.31, SF_crush = 1.77 — design SAFE
Interpretation
Both safety factors exceed 1 with comfortable margins; the key is well sized for the load.
Understanding Your Result
Your Result: 39.5 mm
Typical range: Practical key designs run safety factors of 1.5–4. Yours: shear FS 3.31, crushing FS 1.77.
What This Means
Your key sees a shear stress of 20.41 MPa and a crushing stress of 63.49 MPa. The governing safety factor is 1.77, so the joint is safe at the target SF of 2. The required key length to meet that target is 39.5 mm.
Why It Matters
Keys are the most common shaft-hub torque connection. Undersized keys fail by shear or by crushing the keyway walls, often with little warning. Checking both modes against allowables is essential to reliable power-transmission design.
Professional Interpretation
The key is adequately sized with margin to spare — confirm the keyway does not over-stress the shaft.
Shear vs Crushing
Shear stress is 20.41 MPa against an allowable 67.50 MPa; crushing is 63.49 MPa against 112.50 MPa.
Torque Capacity
Governing capacity is min(T_shear=1,654 Nm, T_crush=885.9 Nm) = 885.9 Nm.
Standard Match
For a 50 mm shaft, DIN 6885 suggests a 14 × 9 key. Compare with your 14×9 selection.
Recommendations
- •Size the key to the DIN 6885 standard for the given shaft diameter, then verify length for your torque.
- •Watch crushing first — for rectangular keys it usually governs before shear.
- •Crushing governs; a taller key (larger h) helps more than extra length.
- •Account for the shaft keyway stress concentration separately — it can reduce shaft fatigue strength by 25% or more.
- •Keep engaged key length within roughly 1.5·d for uniform load distribution.
Educational Content
Introduction
Keys are the humble workhorses of mechanical power transmission — almost every gear, pulley, sprocket and coupling that turns a shaft relies on one. A key is a small prism fitted into matching keyways in the shaft and hub; it locks the two parts together so torque transfers without slipping. Understanding how a key carries load, and how to size it so it neither shears nor crushes, is core machine-design knowledge, and this key design calculator turns the classical formulas into instant answers.
Concept Explanation
Torque T on a shaft produces a tangential force F = T/(d/2) at the key interface. That force attempts to shear the key across two planes (each of area w·L) and to crush the key against the side walls of the keyway (projected bearing area h·L). The resulting stresses are τ = 2T/(w·L·d) for shear and σ_c = 4T/(h·L·d) for crushing. Each is compared with an allowable value derived from the material yield (typically 0.3·S_y for shear, 0.5·S_y for crushing) divided by the chosen safety factor. The joint is safe only when both ratios exceed 1; the weaker mode governs the torque capacity.
Applications
Benefits
- •Instant shear and crushing checks without hand derivation
- •Both failure modes evaluated and the weaker one identified
- •Required key length solved directly for a target safety factor
- •DIN 6885 standard cross-section suggestions built in
- •Live diagram and charts that build intuition about stress state
Limitations
- •Assumes uniform stress along the full key length (no end effects)
- •Excludes shaft keyway stress concentration and fatigue
- •Allowable stresses are simple fractions of yield, not code-based
- •No account of fit tolerances, fretting or dynamic/shock loads
- •Single parallel key only — not splines or multiple-key layouts
Best Practices
- •Start from the DIN 6885 standard key for the shaft diameter
- •Keep engaged length ≤ 1.5·d to avoid non-uniform loading
- •Use a taller key or stronger material when crushing governs
- •Verify the shaft itself (with keyway) separately for strength
- •Apply a safety factor of 2–4 for steady, 3–4 for shock duty
Common Misconceptions
Practical Tips
- •Your governing safety factor is 1.77. Aim for 2–3 in final designs to absorb shock and misalignment.
- •For rectangular keys, crushing usually governs — prefer a taller section before adding length.
- •Match the key to the DIN 6885 standard for the shaft diameter; off-standard sizes are harder to source.
- •Remember the keyway cuts the shaft: de-rate shaft allowable stress by ~25% for fatigue.
- •Keep engaged key length under 1.5·d for even load share.
Common Mistakes
Assumptions
This calculator makes the following assumptions to provide estimates:
Limitations
Be aware of these limitations when using this calculator:
Frequently Asked Questions
Answers to common questions about this calculator.
What is a key in mechanical design?
How does a key transmit torque?
What are the common types of keys?
How is key shear stress calculated?
How is key crushing stress calculated?
What is the factor of safety for key design?
What materials are used for keys?
What is standard key sizing?
What is the difference between a key and a spline?
How do I select key length?
What is a Woodruff key?
What is a gib-head key?
What is the keyway depth?
How does keyway affect shaft strength?
What is the standard key taper?
What are DIN 6885 key sizes?
What is a feather key?
How do I install a key?
What causes key failure?
What is the torque capacity of a key?
How does multiple key design work?
What is the difference between parallel and taper keys?
How is key material selected?
What is a keyway broach?
What is the standard keyway tolerance?
What is a splined shaft?
How do I calculate key length for a given torque?
What is the advantage of square keys?
What is the contact pressure in a key joint?
How does key length affect stress distribution?
What is a set screw with key?
What is the fatigue life of a key joint?
What is key rolling or key fretting?
Can I use this calculator for spline design?
Related Calculators
Explore more calculators related to this topic.
Next Logical Steps
Explore more calculators related to this topic.
Related Guides
Deepen your understanding with these educational resources.
Glossary
Technical terms used in mortgage calculations explained in plain language.
- Shear Stress
- Stress that occurs when forces are applied parallel to a surface, causing layers to slide past each other.
- Crushing Stress
- Also known as bearing stress, it occurs when compressive loads are applied over a small area, causing deformation or failure of the material.
- Factor of Safety
- A design parameter that provides a margin of safety by dividing the material strength by the expected stress.
- Torque
- A measure of rotational force that causes an object to rotate about an axis.
- Keyway
- A groove machined into a shaft and hub to accommodate a key for torque transmission.
- DIN 6885
- German standard that specifies dimensions and tolerances for metric keys and keyways.
Authoritative References
Trusted sources and standards referenced by this calculator.
Applicable Standards
Was This Calculator Helpful?
Page Information
August 2026
2.1.0
Free to use for educational and professional purposes.