Technical memo Machine elements ~8 min read
Shaft-hub connections

Shaft key calculation: shear stress, crushing stress and minimum key length

Published November 23, 2026 — the force on the key, shear stress, crushing (bearing) stress in the shaft and in the hub, the effective length for form A, B or C keys, the minimum key length, a worked example, Excel formulas and a free calculator for DIN 6885 parallel keys.

F = 2T/d Force on the key, at the shaft surface
F/((h − t₁)·lₚ) Crushing stress in the hub, often the critical one
lₚ = l − b Effective length of a form A key

In short: the torque T carried by a shaft of diameter d pushes the key with a force F = 2·T/d. The key is checked in shear, τ = F/(b·lₚ), and in crushing (bearing) on its sides: p = F/((h − t₁)·lₚ) in the hub and F/(t₁·lₚ) in the shaft, lₚ being the effective length (l − b for a key with rounded ends). With equal materials, crushing in the hub nearly always sets the length: for d = 40 mm, T = 200 N·m and an S235 hub with a safety factor of 2, a 12 × 8 key needs at least 40.4 mm, i.e. 45 mm as a standard length.

1. Shaft key calculation formulas

Notation: d shaft diameter, T transmitted torque, b key width and h key height, t₁ shaft keyway depth, l key length, lₚ effective length, Re yield strength, S safety factor. Dimensions b, h and t₁ come from the DIN 6885 key size chart.

bFFhh − t₁t₁hubshaftcrushing in the hubshear planecrushing in the shaftkey b × h
The torque makes the shaft push on one side of the key (lower part, height t₁) and the hub on the other (upper part, height h − t₁). The key is sheared in the plane of the shaft surface; its sides bear on the shaft and on the hub.
QuantityFormulaAllowable (classical method)
Force on the keyF = 2·T / d—
Effective lengthlₚ = l − b (form A); l − b/2 (form C); l (form B)—
Key shear stressτ = F / (b·lₚ)τ ≤ 0.577·Re clavette / S
Crushing stress in the hubpm = F / ((h − t₁)·lₚ)pm ≤ Re / S
Crushing stress in the shaftpa = F / (t₁·lₚ)pa ≤ Re / S
Minimum effective lengthlₚ ≥ F·S / min(0.577·Re key·b; Re hub·(h − t₁); Re shaft·t₁)—

For crushing, Re is that of the weaker of the two parts in contact: the key and the hub at the top, the key and the shaft at the bottom. The factor 0.577 = 1/√3 relates shear yield strength to tensile yield strength (von Mises criterion): it is the method of machine design textbooks such as Shigley. Many textbooks simplify the bearing height to h/2 on each side; using h − t₁ for the hub is more conservative, because the key protrudes from the shaft by less than half its height (3 mm out of 8 for a 12 × 8 key).

lₚ = l − blₚ = lllform A, round endsform B, square ends
The rounded ends of a form A key do not bear on the straight sides of the keyway: only its straight part, of length l − b, carries the force. Form C (one rounded end, one square end) bears over l − b/2.

2. Shaft key calculator

Enter the shaft diameter (6 to 110 mm), the torque, the key length and form, the yield strengths of the three parts and the required safety factor. Key size b × h and depth t₁ are taken from the DIN 6885 table for that diameter.

DIN 6885 key (b × h; t₁; h − t₁)
—
Force F; effective length lₚ
—
Shear stress τ (safety)
—
Crushing in the hub (safety)
—
Crushing in the shaft (safety)
—
Minimum length → standard length
—

Default values: the example in section 3, with an S355 key and shaft and an S235 hub (yield strengths from the S235, S275 and S355 steels page, for thicknesses up to 16 mm). Replace them with your own materials. A diameter on a range boundary (38 mm for instance) takes the key of the lower range, as in the standard.

3. Worked example: Ø 40 shaft, 200 N·m

Ø 40 mm shaft in S355, S235 hub, 200 N·m torque, 40 mm form A key, required safety factor: 2. For 38 < d ≤ 44 mm, the DIN 6885 key is a 12 × 8, with t₁ = 5.0 mm, so h − t₁ = 3.0 mm.

QuantityCalculationResult
Force F2 × 200,000 N·mm / 40 mm10,000 N
Effective length lₚ40 − 1228 mm
Shear stress τ10,000 / (12 × 28)29.8 MPa (S = 6.9)
Crushing in the hub10,000 / (3 × 28)119.0 MPa (S = 1.97)
Crushing in the shaft10,000 / (5 × 28)71.4 MPa (S = 4.97)
Minimum length12 + 10,000 × 2 / (235 × 3)40.4 mm → 45 mm
With l = 45 mm (lₚ = 33)10,000 / (3 × 33)101.0 MPa (S = 2.33)

The 40 mm key passes easily in shear and in shaft crushing, but not quite in hub crushing (S = 1.97 for 2 required): the S235 hub and the small height h − t₁ are the limit. The next standard length, 45 mm, gives S = 2.33, provided the hub is at least 45 mm long. With the textbook simplification h/2, the result would have been 89.3 MPa instead of 119 MPa, wrongly concluding that 40 mm was enough.

4. Table: transmissible force by key size

As hub crushing usually governs, this table gives, for each DIN 6885 key size, the force carried per millimetre of effective length when the hub pressure is 100 MPa, and the matching torque for 10 mm of effective length at the largest diameter of the range. Everything is proportional: for 150 MPa allowable, multiply by 1.5; for 30 mm of effective length, by 3.

Shaft Ø (mm)b × ht₁h − t₁Force per mm at 100 MPa (N/mm)Torque for 10 mm, max Ø (N·m)Shear / crushing ratio
6 to 82 × 21.20.8803.21.44
8 to 103 × 31.81.21206.01.44
10 to 124 × 42.51.51509.01.54
12 to 175 × 53.02.0200171.44
17 to 226 × 63.52.525027.51.38
22 to 308 × 74.03.0300451.54
30 to 3810 × 85.03.0300571.92
38 to 4412 × 85.03.0300662.31
44 to 5014 × 95.53.535087.52.31
50 to 5816 × 106.04.04001162.31
58 to 6518 × 117.04.04001302.60
65 to 7520 × 127.54.5450168.82.56
75 to 8522 × 149.05.0500212.52.54
85 to 9525 × 149.05.0500237.52.89
95 to 11028 × 1610.06.06003302.69

Dimensions b, h and t₁ in mm, from the DIN 6885 chart. The last column compares the key's shear capacity (0.577·b) with the hub crushing capacity (h − t₁), for the same Re: it is above 1 over the whole range. With equal materials, the key crushes the hub before it shears, so a shear-only check is never enough.

5. Assumptions and limits

  • Uniform pressure: the calculation assumes pressure spread over the whole effective length. In reality, it is higher on the side where torque enters the hub; a key much longer than needed therefore does not gain in proportion to its length.
  • Chamfers: chamfered key and keyway edges slightly reduce the real bearing height. On small sizes, where h − t₁ is only 1 to 2 mm, keep a margin.
  • Shocks and reversing loads: use the peak torque, including shocks and starts. Reversing torque loads both sides in turn and wears the connection: the key fit in the keyways then matters as much as the calculation.
  • The shaft: the keyway weakens the shaft and concentrates stress at its corners; also check the shaft in torsion, with a reduced diameter or a stress concentration factor (see shaft torsion calculation).
  • Two keys: two keys at 180° do not carry twice the torque, because the load does not split evenly between them. When one key is not enough, an interference or shrink fit or splines are often better solutions.

6. Shaft key calculation in Excel

With, in row 2: d in A (mm), T in B (N·m), l in C (mm), b, h and t₁ in D, E and F (mm), key, shaft and hub Re in G, H and I (MPa), S in J. Example values: 40, 200, 40, 12, 8, 5, 355, 355, 235, 2.

ResultExcel or LibreOfficeValue
K2: force F (N)=2000*B2/A210,000
L2: effective length, form A=C2-D228
M2: shear stress τ (MPa)=K2/(D2*L2)29.76
N2: hub crushing stress (MPa)=K2/((E2-F2)*L2)119.05
O2: shaft crushing stress (MPa)=K2/(F2*L2)71.43
P2: minimum safety factor=MIN(0.577*G2/M2,I2/N2,H2/O2)1.97
Q2: minimum length, form A (mm)=D2+K2*J2/MIN(0.577*G2*D2,I2*(E2-F2),H2*F2)40.37

For a form B key, replace L2 with =C2 and remove "D2+" from Q2; for form C, use =C2-D2/2 and "D2/2+". In French-language Excel, MIN keeps its name, but argument separators are semicolons and the decimal mark is a comma: =MIN(0,577*G2/M2;I2/N2;H2/O2). These formulas were checked in LibreOffice Calc on the example: the values are those in the table.

Printable version: the formula sheet as a PDF (A4, no sign-up): formulas, example, table by key size and Excel formulas.

7. FAQ

How do you calculate a shaft key?

Calculate the force F = 2·T/d at the shaft surface, then the shear stress τ = F/(b·lₚ) and the crushing stresses F/((h − t₁)·lₚ) in the hub and F/(t₁·lₚ) in the shaft, lₚ being the effective length. Compare τ with 0.577·Re/S and the crushing stresses with Re/S, using the Re of the weaker part in contact.

How do you calculate key length?

The minimum effective length is lₚ = F·S / min(0.577·Re key·b; Re hub·(h − t₁); Re shaft·t₁). Add b for a form A key (b/2 for form C), then take the next standard length, without exceeding the hub length. For d = 40 mm, T = 200 N·m, an S235 hub and S = 2: 40.4 mm, i.e. 45 mm.

Should a key be checked in shear or in crushing?

Both, but with DIN 6885 keys and materials of equal strength, crushing in the hub governs: the part of the key that protrudes from the shaft (h − t₁) is much lower than the key is wide. The ratio between shear capacity and crushing capacity ranges from 1.38 to 2.89 depending on the key size.

What crushing stress is allowable?

The classical method compares the pressure with the yield strength of the weaker part, divided by a safety factor chosen from how well the loads are known and how serious a failure would be. Published allowable values vary between references, materials (cast iron allows less than steel) and load types: use those of your own design standard.

What if the key does not pass?

In order: lengthen the key up to the hub length, lengthen the hub, choose a stronger hub material, then change the type of connection: interference or shrink fit, splines, shrink disc. A second key does not double the transmissible torque.

Read next