Mechanical · Free · Instant results

Key Size Calculator

Calculate Smarter. Work Faster.

Standard key width and height by shaft diameter, plus required key length from shear and crushing strength checks against the transmitted torque.

Shaft & Torque Inputs

Auto-filled from standard IS 2048 proportions for the shaft diameter — edit if using a non-standard key.

Recommended Key Length
Governing = max(L_shear, L_crush)
Shear Length
Crushing Length
Calculation Breakdown
Did this solve your problem?

Created by Umasankar Maity — B.Tech in Electrical Engineering, with 11+ years of industrial maintenance experience.

Reviewed by the ElectroMechCalc editorial team.

Last reviewed: August 2026  |  Standards referenced: IS 2048 (parallel keys and keyways), general machine design practice

How it works

Machine key sizing, explained

A machine key transmits torque between a shaft and a hub (a pulley, gear, or coupling) by sitting in matching keyways cut into both parts. Sizing a key correctly means two separate steps: first selecting the key's cross-section (width and height) based on the shaft diameter using a recognized standard, and second calculating the minimum key length needed to safely carry the actual transmitted torque without failing.

Step 1 — Standard cross-section: key width and height are not arbitrary; they follow standard proportions (this calculator uses IS 2048-style parallel key sizing) tied directly to shaft diameter, since the key must fit a keyway of a size the hub manufacturer will also expect. Picking the standard size for a given shaft diameter ensures compatibility with off-the-shelf pulleys, gears and couplings.

Step 2 — Required length, from two independent strength checks: once width and height are fixed, the key's length must be long enough to survive two different failure modes, and the longer of the two results governs:

Shear failure: L = 2T / (τ × W × D)

The shear check considers the key failing by shearing straight across its width, along the shaft's outer surface. The torque T is resisted by the shear stress τ acting over the key's shear area (width W × length L), at the shaft's radius (D/2) as the moment arm — rearranging that torque balance for length gives the formula above.

Crushing failure: L = 4T / (σc × H × D)

The crushing (bearing) check considers a different failure mode — the sides of the key being crushed by the contact pressure against the keyway walls. Only half the key's height (H/2) is in bearing contact on each side, and the allowable bearing (compressive) stress σc is normally taken as roughly twice the allowable shear stress τ for the same key material, since materials generally tolerate more compressive stress than shear stress before yielding.

Whichever of the two calculated lengths is larger is the governing case — the key must be at least that long to avoid failing in that mode. A practical design then adds a margin (this calculator applies 15%) on top of the governing theoretical length, both for a safety margin and because standard key stock is typically only available in fixed length increments.

Worked Example

A 55 mm shaft uses a standard 16×10 mm key to transmit 200 N·m of torque, with allowable shear stress 42 MPa and allowable bearing stress 84 MPa.

  • T = 200 N·m = 200,000 N·mm
  • Shear length: L = (2×200,000) / (42×16×55) = 400,000 / 36,960 = 10.82 mm
  • Crushing length: L = (4×200,000) / (84×10×55) = 800,000 / 46,200 = 17.32 mm
  • Governing case: Crushing (17.32 mm > 10.82 mm)
  • Recommended length with 15% margin = 17.32 × 1.15 ≈ 19.9 mm — typically rounded up to a standard 20 or 22 mm key length

Standard key width/height by shaft diameter follows common IS 2048-style proportions; always confirm against the specific coupling, pulley or gear hub's keyway if it's a purchased component, since hub keyways are sized to match the mating shaft standard in use.

Reference table

Standard parallel key sizes by shaft diameter

Shaft diameter range (mm)Key width, W (mm)Key height, H (mm)
12 – 1755
17 – 2266
22 – 3087
30 – 38108
38 – 44128
44 – 50149
50 – 581610
58 – 651811
65 – 752012
75 – 852214

This calculator auto-fills width and height from a table like this one when you enter a shaft diameter, but always confirm the exact width and height against the specific hub component's keyway (pulley, coupling, or gear) if you're mating with a purchased part, since the hub's keyway is what your key actually has to fit — the shaft-diameter table gives the expected standard, not a guarantee of what a specific part was actually made to.

Common Mistakes

Common mistakes when sizing a key

1. Checking only shear or only crushing, not both. The two failure modes are independent and depend differently on key width versus height — skipping one check can miss the actual governing (weaker) failure mode, especially since crushing often governs for wider, shorter keys and shear can govern for narrower, taller ones.

2. Using the shaft diameter as the moment arm without dividing by 2. Torque acts at the shaft's radius, not its full diameter — using diameter directly instead of radius in the torque balance halves the calculated stress (or doubles the calculated required length), a common algebra slip when rearranging the torque equations.

3. Assuming full key height is in bearing contact for the crushing check. Only half the key height (H/2) is engaged in bearing contact on each side of a standard sunk key — using the full height H instead of H/2 in the crushing formula understates the actual bearing stress (or overstates the safe length).

4. Using a non-standard width/height without checking hub compatibility. A calculated "ideal" cross-section that doesn't match the shaft diameter's standard key size may not fit a purchased pulley, gear, or coupling's factory-cut keyway — stick to the standard size for the shaft diameter unless the mating hub is also custom-made.

5. Ignoring stress concentration at the keyway. Cutting a keyway into a shaft removes material and creates a stress concentration that reduces the shaft's own torque capacity below that of a plain round shaft of the same diameter — this calculator sizes the key itself, but shaft strength with the keyway factored in needs its own separate check.

6. Not adding a design margin over the bare calculated minimum length. The theoretical minimum length from the shear/crushing checks is a bare limit, not a design length — applying a margin (commonly 15–25%) accounts for uncertainties in actual load, minor misalignment, and rounds up to commercially available key stock lengths.

FAQ

Frequently Asked Questions

Straight answers on key width/height selection, shear check, and crushing check.

How is key length calculated from transmitted torque?+

Two independent checks are calculated: a shear length from the key's width and the shaft's shear stress limit, and a crushing (bearing) length from the key's height and the material's bearing stress limit. The larger of the two results is the governing minimum length, since the key must survive both failure modes.

Why are there two different formulas, one for shear and one for crushing?+

A key can fail in two different ways: by shearing straight across along the shaft surface, or by the key's sides being crushed against the keyway walls under bearing pressure. These are independent failure modes governed by different stress limits and different effective areas, so both must be checked and the weaker (longer required length) case governs the design.

Why is allowable bearing stress usually about twice the allowable shear stress for the same material?+

Most ductile materials can tolerate meaningfully higher compressive (bearing) stress than shear stress before yielding, based on general material yield behavior. A commonly used approximate relationship takes allowable bearing stress as roughly double the allowable shear stress for the same key material, though the exact ratio depends on the specific material and applicable design code.

How do I choose the standard key width and height for a given shaft diameter?+

Standard parallel key sizing tables (such as IS 2048) specify a width and height for each shaft diameter range, based on common industry practice — this calculator auto-fills those standard values when you enter a shaft diameter, though you should always confirm against the specific hub component's actual keyway if mating with a purchased part.

Why does the crushing check use half the key height instead of the full height?+

In a standard sunk key, half of the key's height sits above the shaft's keyway and half sits below it, with only the portion protruding into the hub's keyway actually bearing against the hub material under torque. This effective bearing height is taken as H/2 in the standard crushing check formula.

Does cutting a keyway weaken the shaft itself?+

Yes — removing material for a keyway reduces the shaft's cross-section and creates a stress concentration at the corners of the slot, both of which reduce the shaft's torque capacity compared to an equivalent plain round shaft. This calculator sizes the key only; shaft strength with the keyway accounted for needs a separate check, often using a reduced effective shaft diameter or a stress concentration factor.

How much margin should I add over the calculated minimum key length?+

A commonly used margin is around 15 to 25 percent over the governing calculated length, both to provide a safety margin for load variation and misalignment, and because standard key stock is only available in fixed length increments, so the actual length used is typically rounded up from the calculated figure anyway.

Can key length exceed the hub length it's fitted into?+

No — the calculated key length must physically fit within the length of the hub (pulley, gear, or coupling) it engages. If the calculated required length exceeds the available hub length, options include increasing key width or height (if the shaft and hub allow it), using two keys, or selecting a different connection method such as a shrink fit or spline.

Explore More Categories