BlogEngineering
Shaft and key checks every gearbox needs, with worked numbers
Worked shaft and key calculations for a small gearbox: torsion, bending, fatigue at a keyway, key shear and crushing, and bearing life, with real numbers.

Swapping a motor is one of the most common ways to break a gearbox. The new motor’s peak torque, multiplied by the ratio, lands on shafts and keys that were sized for something gentler. Here is the check, worked for a two-stage 7:1 reducer moving from a stepper to a 400 W servo with 3.8 N·m peak torque.
Torque at each shaft
T2 = T1 × (42 / 18) × η = 3.8 × 2.333 × 0.98 = 8.69 N·m T3 = T2 × (48 / 16) × η = 8.69 × 3 × 0.98 = 25.6 N·m
Torsion on the output end
τ = 16T / (π d³) τ = 16 × 25,550 / (π × 10³) = 130 MPa
The output end is Ø10 mm. At peak torque it sees 130 MPa in shear. For C45 steel with a yield strength around 370 MPa, the static safety factor is about 1.6. That looks survivable until you add the keyway.
Fatigue at the keyway
Se = 0.5 × Sut × ka × kb = 0.5 × 650 × 0.88 × 0.92 = 263 MPa SF = 0.577 × Se / (Kts × τ) = 0.577 × 263 / (2.0 × 130) = 0.58
With a torsional stress concentration of 2.0 at the keyway, the fatigue safety factor is 0.58. The shaft would fail in service. A more conservative keyway factor makes it worse, not better.
The key itself
F = 2T / d = 2 × 25,550 / 10 = 5,110 N shear = F / (w × L) = 5,110 / (4 × 24) = 53 MPa crushing = F / ((h / 2) × L) = 5,110 / (1.5 × 24) = 142 MPa
The fix
Growing the output end to Ø16 mm with a 5 × 5 key cuts the torsional stress to 32 MPa and lifts the fatigue safety factor to about 2.4. It also changes the coupling bore, which is why it’s a decision for the engineer, not a silent edit.
Bearings
L10 = (C / P)³ × 10⁶ / (60 × n) hours
At rated torque, the 6200 bearings on the intermediate shaft carry about 116 N at 1,286 rpm. With C = 5.4 kN, L10 is about 1.3 million hours. Bearings are rarely the weak link in a lightly loaded reducer; shafts and keys are.
Doing it with Vector
Vector reads the gear, shaft, key, and bearing geometry from the assembly, runs these calculations in Python, and reports which parts won’t survive the change, then asks before changing interfaces like a shaft diameter. See the full example.
Questions
- Why check fatigue and not just yield?
- Shafts see reversing stress every revolution. A shaft with a comfortable static safety factor can still fail in fatigue, especially at a keyway where stress concentrates.
- What stress concentration should I use for a keyway?
- It depends on the keyway shape and the source. Values around 2 to 3 in torsion are common first estimates; check a reference such as Shigley or Peterson for your geometry.

Check a gearbox against a new motor’s peak torque
Vector reads the gear, shaft, and bearing geometry from the assembly, runs the stress and life calculations in Python, and tells you which parts won’t survive the change.
Watch it in Vector

