ENGINEERING CALCULATOR

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.

βœ“ Free Online Tool
βœ“ DIN 6885 & ANSI B17.1
βœ“ Stress Verification

Interactive Keyway Calculator

Enter a shaft diameter to look up the standard key and keyseat dimensions.

Key Size W Γ— H 10 Γ— 8 mm
Shaft Keyseat Depth T1 4.1 mm
Hub Keyway Depth T2 4.0 mm
Standard

DIN 6885-A β€” shaft diameter 22–30 mm β†’ key 10 Γ— 8 mm

ONLINE ENGINEERING TOOL

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.

Key Size W Γ— H 8 Γ— 7 mm
Shaft Keyseat Depth T1 3.6 mm
Hub Keyway Depth T2 3.5 mm
Formula Used

DIN 6885-A lookup β€” d = 30 mm β†’ key 8 Γ— 7 mm, T1 = h/2 + 0.1 mm, T2 = h βˆ’ T1 + 0.2 mm

HOW IT WORKS

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.

Shear Stress Formula
Ο„ = 2T Γ· (d Γ— W Γ— L)
T = torque, d = shaft diameter W = key width, L = key length
Bearing (Compressive) Stress Formula
Οƒ = 4T Γ· (d Γ— H Γ— L)
H = key height Key bears on only half its height

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).

400,000 2T (NΒ·mm)
Γ·
13,500 d Γ— W Γ— L (mmΒ³)
=
29.6 MPa Shear Stress Ο„
Shear Stress (allowable 60 MPa) 29.6 MPa β€” Pass
Bearing Stress (allowable 120 MPa) 74.1 MPa β€” Pass
Safety Factor (C45 / 1045 key) 1.62

The Three Design Checks

01

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)
02

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)
03

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

C45 / 1045 Steel

Allowable shear 60 MPa, bearing 120 MPa. Standard choice for general industrial applications (yield 350–400 MPa).

304 / 316 Stainless

Allowable shear 35–40 MPa, bearing 70–80 MPa. For corrosive environments β€” note the lower strength requires a longer key.

4140 Alloy Steel (Q&T)

Allowable shear 110 MPa, bearing 220 MPa. For high-performance applications. Values assume a safety factor of 2.0 against yield.

STANDARD REFERENCE DATA

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–82 Γ— 21.11.0
8–103 Γ— 31.61.5
10–124 Γ— 42.12.0
12–175 Γ— 52.62.5
17–226 Γ— 63.13.0
22–308 Γ— 73.63.5
30–3810 Γ— 84.14.0
38–4412 Γ— 84.14.0
44–5014 Γ— 94.64.5
50–5816 Γ— 105.15.0
58–6518 Γ— 115.65.5
65–7520 Γ— 126.16.0
75–8522 Γ— 147.17.0
85–9525 Γ— 147.17.0
95–11028 Γ— 168.18.0
110–13032 Γ— 189.19.0
130–15036 Γ— 2010.110.0
150–17040 Γ— 2211.111.0
170–20045 Γ— 2512.612.5
200–23050 Γ— 2814.114.0
Key formulas: shaft depth T1 = h/2 + 0.1 mm; hub depth T2 = h βˆ’ T1 + 0.2 mm (running clearance at the top of the key).

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.5621/8 Γ— 1/80.0625
0.562–0.8753/16 Γ— 3/160.0938
0.875–1.2501/4 Γ— 1/40.1250
1.250–1.3755/16 Γ— 5/160.1563
1.375–1.7503/8 Γ— 3/80.1875
1.750–2.2501/2 Γ— 1/20.2500
2.250–2.7505/8 Γ— 7/160.2188
2.750–3.2503/4 Γ— 1/20.2500
3.250–3.7507/8 Γ— 5/80.3125
3.750–4.5001 Γ— 3/40.3750
4.500–5.5001-1/4 Γ— 7/80.4375
5.500–6.5001-1/2 Γ— 10.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.

TOLERANCES & FITS

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.0368.040–8.098
Normal (N9/Js9)7.964–8.0007.991–8.027
Tight (P9/P9)7.942–7.9787.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.

Machining requirement: for any fit class, the keyway must be cut parallel to the shaft axis within 0.002 in per inch of length, with a smooth radius at the bottom corners β€” sharp corners concentrate stress and start fatigue cracks. Baetro's precision CNC machining holds Β±0.001 in on shaft keyseats and hub keyways, with full inspection reports.
MANUFACTURING METHODS

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.

01

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
02

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
03

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.

Chord Height = (D βˆ’ √(DΒ² βˆ’ WΒ²)) Γ· 2
Total Depth = Chord Height + Key Height Γ· 2
DFM Tip: avoid placing a keyway at the same axial location as a diameter change, snap ring groove, or thread relief β€” stacking stress concentrations is the most common cause of fatigue failure in keyed shafts. Our engineers provide free DFM feedback on every quote and flag these issues before machining begins.
INDUSTRY APPLICATIONS

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.

Keyway Questions

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.

PRECISION MANUFACTURING SUPPORT

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