Keyway Calculator
Find standard keyway dimensions for any shaft diameter in seconds. This free calculator covers both DIN 6885 (metric) and ANSI B17.1 (imperial) standards, with shaft keyseat depth, hub keyway depth, minimum key length, and stress verification β no Machinery's Handbook required.
Interactive Keyway Calculator
Enter a shaft diameter to look up the standard key and keyseat dimensions.
DIN 6885-A β shaft diameter 22β30 mm β key 10 Γ 8 mm
How to Use This Keyway Calculator
Enter your shaft diameter for an instant standard key size lookup. Add torque β or horsepower and RPM β with a key material and service factor to run a full shear and bearing stress check. Leave torque blank for dimensions only.
DIN 6885-A lookup β d = 30 mm β key 8 Γ 7 mm, T1 = h/2 + 0.1 mm, T2 = h β T1 + 0.2 mm
Keyway Stress Analysis Explained
When a key transmits torque between a shaft and hub, it experiences two failure modes: shear across its cross-section and compressive (bearing) stress on its contact faces. Both must be checked β in practice, bearing failure is more common.
Worked Example
A 30 mm shaft with a standard 10 Γ 8 mm DIN 6885 key, 45 mm long, transmits 200 NΒ·m of torque. Shear stress is 2 Γ 200,000 NΒ·mm Γ· (30 mm Γ 10 mm Γ 45 mm).
The Three Design Checks
Shear Check
Shear stress acts across the key's cross-section at the shaft-hub interface and must stay below the material's allowable shear stress, divided by the service factor.
Ο = 2T / (d Γ W Γ L)Bearing Check
Bearing stress acts on the key's contact faces. It is inherently higher than shear β key roll-over at the contact surface is the most common field failure.
Ο = 4T / (d Γ H Γ L)Minimum Key Length
Required length is governed by whichever stress reaches its allowable limit first. Keys longer than ~1.5 Γ shaft diameter give diminishing returns.
L = max(2T/dWΟ, 4T/dHΟ)Allowable Stress Reference Values
Allowable shear 60 MPa, bearing 120 MPa. Standard choice for general industrial applications (yield 350β400 MPa).
Allowable shear 35β40 MPa, bearing 70β80 MPa. For corrosive environments β note the lower strength requires a longer key.
Allowable shear 110 MPa, bearing 220 MPa. For high-performance applications. Values assume a safety factor of 2.0 against yield.
Standard Keyway Size Reference Tables
Standard parallel key dimensions by shaft diameter per DIN 6885-A (metric) and ANSI B17.1 (imperial). For shafts up to 22 mm the key is square; above that, keys become rectangular with height less than width.
Metric β DIN 6885-A (ISO R773)
Parallel keys for metric shafts from 6 mm to 230 mm diameter.
| Shaft Γ (mm) | Key W Γ H (mm) | T1 (mm) | T2 (mm) |
|---|---|---|---|
| 6β8 | 2 Γ 2 | 1.1 | 1.0 |
| 8β10 | 3 Γ 3 | 1.6 | 1.5 |
| 10β12 | 4 Γ 4 | 2.1 | 2.0 |
| 12β17 | 5 Γ 5 | 2.6 | 2.5 |
| 17β22 | 6 Γ 6 | 3.1 | 3.0 |
| 22β30 | 8 Γ 7 | 3.6 | 3.5 |
| 30β38 | 10 Γ 8 | 4.1 | 4.0 |
| 38β44 | 12 Γ 8 | 4.1 | 4.0 |
| 44β50 | 14 Γ 9 | 4.6 | 4.5 |
| 50β58 | 16 Γ 10 | 5.1 | 5.0 |
| 58β65 | 18 Γ 11 | 5.6 | 5.5 |
| 65β75 | 20 Γ 12 | 6.1 | 6.0 |
| 75β85 | 22 Γ 14 | 7.1 | 7.0 |
| 85β95 | 25 Γ 14 | 7.1 | 7.0 |
| 95β110 | 28 Γ 16 | 8.1 | 8.0 |
| 110β130 | 32 Γ 18 | 9.1 | 9.0 |
| 130β150 | 36 Γ 20 | 10.1 | 10.0 |
| 150β170 | 40 Γ 22 | 11.1 | 11.0 |
| 170β200 | 45 Γ 25 | 12.6 | 12.5 |
| 200β230 | 50 Γ 28 | 14.1 | 14.0 |
DIN 6885 extends to 500 mm. For diameters not listed, the calculator interpolates using the standard size bands.
Imperial β ANSI B17.1
Square keys are standard for shafts up to ~6.5 inches; rectangular keys for larger diameters. Per ANSI B17.1-1967 (R2013).
| Shaft Γ (in) | Key W Γ H (in) | Keyseat Depth (in) |
|---|---|---|
| 0.500β0.562 | 1/8 Γ 1/8 | 0.0625 |
| 0.562β0.875 | 3/16 Γ 3/16 | 0.0938 |
| 0.875β1.250 | 1/4 Γ 1/4 | 0.1250 |
| 1.250β1.375 | 5/16 Γ 5/16 | 0.1563 |
| 1.375β1.750 | 3/8 Γ 3/8 | 0.1875 |
| 1.750β2.250 | 1/2 Γ 1/2 | 0.2500 |
| 2.250β2.750 | 5/8 Γ 7/16 | 0.2188 |
| 2.750β3.250 | 3/4 Γ 1/2 | 0.2500 |
| 3.250β3.750 | 7/8 Γ 5/8 | 0.3125 |
| 3.750β4.500 | 1 Γ 3/4 | 0.3750 |
| 4.500β5.500 | 1-1/4 Γ 7/8 | 0.4375 |
| 5.500β6.500 | 1-1/2 Γ 1 | 0.5000 |
For square keys on shafts up to ~4.5 inches, shaft keyseat depth equals half the key height. Hub keyway depth matches the shaft keyseat depth.
Keyway Tolerance & Fit Class Guide
Tolerance selection is critical to keyway function. Too tight and assembly becomes difficult; too loose and the key rocks in service, accelerating wear and risking failure.
DIN 6885 Tolerance System
Three standard fit classes for parallel keys, controlled through the keyway width tolerance. For most industrial applications β gearboxes, pump shafts, conveyor drives β specify N9/Js9 (normal fit).
| Fit Type | Shaft | Hub | Application |
|---|---|---|---|
| Free / Slide | H9 | D10 | Keys that must slide axially; low-torque applications |
| Normal | N9 | Js9 | General industrial use; most common for fixed hubs |
| Tight / Press | P9 | P9 | High-precision assemblies; no key movement permitted |
Example Values β 25 mm Shaft, 8 mm Key Width
| Fit Class | Shaft Keyseat Width (mm) | Hub Keyway Width (mm) |
|---|---|---|
| Free (H9/D10) | 8.000β8.036 | 8.040β8.098 |
| Normal (N9/Js9) | 7.964β8.000 | 7.991β8.027 |
| Tight (P9/P9) | 7.942β7.978 | 7.942β7.978 |
ANSI B17.1 Fit Classes
Three classes for inch-dimensioned keyways:
Class 1 β Clearance / Light Fit
Key slides freely in the keyseat. Used for interchangeable assembly where the key is installed after the hub is positioned.
Class 2 β Tight Fit
Minimal clearance; the key requires light tapping to assemble. Standard for most fixed-hub applications.
Class 3 β Interference Fit
Key must be pressed into the keyseat. Used when the key must not move under reversing or impact loads.
How Keyways Are Machined
Understanding how keyways are cut helps you specify realistic tolerances, understand cost drivers, and communicate effectively with your machine shop. Three primary methods are used, each with distinct advantages.
Broaching
A multi-tooth tool pulled or pushed through a pre-drilled hole cuts an internal keyway in a single pass β the fastest method for hubs, gears, and pulleys.
- Tolerance capability: Β±0.0005 in on keyway width
- Best for production quantities of identical hubs
- High tooling cost ($200β500 per broach size)
- Blind holes require a relief groove
End Milling (CNC)
A standard or keyseat end mill traverses along the shaft or bore. The most flexible method, used for most CNC machined shafts and low-to-mid volume work.
- Tolerance capability: Β±0.001 in standard
- Best for external keyways and non-standard widths
- No dedicated tooling required
- Small internal bores need specialized tooling
Keyseating (Vertical Slotting)
A reciprocating single-point tool cuts internal keyways with no dedicated tooling β and it can cut blind keyways.
- Tolerance capability: Β±0.0015 in
- Best for large bores (2+ in) and repair work
- Handles materials too hard for broaching
- Slower than broaching for production runs
Keyway Depth Measurement
When a flat-bottom keyway is cut into a round shaft, the chord height effect must be accounted for. In practice, machinists measure from the keyway bottom to the opposite side of the shaft with a micrometer β more reliable than depth micrometers for external keyseats.
Industry Applications
Keyways are found in virtually every rotating machine. Here is where keyed shaft assemblies are most frequently used.
From automotive powertrains to marine propulsion, parallel keys per DIN 6885 and ANSI B17.1 remain the most common torque-transmission method between shafts and hubs.
Automotive & Powertrain
Transmission shafts, driveshaft couplings, differential pinion gears, and camshaft sprockets rely on keyed connections. DIN 6885 dominates European design; ANSI B17.1 is standard in North America.
Industrial Gearboxes
Parallel keys are the most common torque-transmission method in gear reducers, conveyor drives, and coupling hubs β typically 25β150 mm shafts. Reversing applications sometimes use two keys at 180Β°.
Pump & Compressor Shafts
Centrifugal impellers, pump rotors, and compressor crankshafts use keyed connections. Stainless 304/316 keys prevent galvanic corrosion in chemical and food-processing pumps.
Aerospace Actuators
Keyed splines and parallel keys transmit torque in flight control actuators and rotor masts. AS9100-certified machining is mandatory, with 4140 or 17-4 PH keys and full CMM reporting on every part.
Material Handling
Drive pulleys, head/tail shafts, and take-up assemblies use keyed hubs for positive drive. Service factors of 1.5β2.0 are standard; shafts typically run 30β120 mm.
Marine Propulsion
Propeller shafts and reduction gear pinions require 316 stainless or Monel keys for seawater resistance, with extra-deep keyways for high torques at low RPM.
Frequently Asked Questions
Keyway size is determined by shaft diameter, not chosen arbitrarily. For metric shafts, consult the DIN 6885-A table; for inch-dimensioned shafts, use ANSI B17.1. Quick reference: a 25 mm shaft takes an 8 Γ 7 mm key; a 1-inch shaft takes a 1/4 Γ 1/4 inch key. Use the calculator at the top of this page for instant lookup.
A keyseat is the slot cut into the shaft; a keyway is the slot cut into the hub (gear, pulley, sprocket, or coupling bore). The key is the removable piece that sits in both slots and transmits torque. Shaft keyseat depth (T1) and hub keyway depth (T2) are different values, as shown in the reference tables.
For most industrial applications, specify shaft keyseat width tolerance N9 and hub keyway width tolerance Js9 per DIN 6885 (normal fit). For ANSI B17.1, Class 2 (tight fit) is the standard recommendation. If the hub must slide on the shaft, loosen to H9/D10 (DIN) or Class 1 (ANSI).
For DIN 6885, shaft keyseat depth T1 = h/2 + 0.1 mm, where h is the key height. For ANSI B17.1 square keys, T1 = H/2. When cutting the keyseat, machinists use a chord height formula to convert flat depth to a micrometer measurement across the shaft β the calculator above handles both calculations.
Standard industrial keys are cold-drawn carbon steel β C45 (DIN) or 1045 (AISI) β with ~60 MPa allowable shear. For corrosive environments use 304 or 316 stainless, noting the lower strength requires a longer key. For high-performance applications use 4140 Q&T at 32β38 HRC, or 17-4 PH stainless.
Minimum key length is set by the greater of the shear and bearing stress requirements. As a guideline, key length should be 1.0β1.5 Γ shaft diameter: below 1.0Γ the end stress concentrations overlap; above 1.5Γ, shaft torsional wind-up prevents the full length from bearing effectively.
An over-deep keyway reduces the shaft's effective cross-section, raising bending stress and fatigue risk β every 10% of extra depth can cut fatigue life by 25β40%. If you need more torque capacity, increase the shaft diameter or use two keys at 90Β° or 180Β° rather than deepening a single keyway.
Get Your Keyways Precision-Machined
You have the dimensions. Now get the parts. Baetro machines shafts, keyways, and complete rotating assemblies from your CAD files β with tolerances held to Β±0.001 inches, full CMM inspection reports, material certifications, and free DFM review on every order. Parts ship in 3β7 days with no minimum quantity.
Β±0.001 in keyway tolerances
Free DFM review on every quote
Full inspection reports, 3β7 day lead time
