EngivonMechanical

Keyway Depth Calculator

Determine standard key sizes, shaft depths (t₁), and hub depths (t₂) per DIN 6885-1 and ANSI B17.1.

Keyway & Key Size Standards Calculator

Standard Shafts:
mm
DIN 6885-1 Specification: Standard parallel keys with rectangular/square cross-section (b × h). Shaft depth t₁ and hub depth t₂ are tabulated standards with h9 / D10 tolerance fits.
RECOMMENDED STANDARD KEY (DIN 6885-1)
8 × 7mm(0.315 × 0.276 in • t₁ = 0.1575 in)Shaft: Ø25.0 mm (0.984 in)
Shaft Keyway Depth (t₁)4.0 mm (0.1575 in)
Hub Keyway Depth (t₂)3.3 mm (0.1299 in)
Remaining Shaft Thicknessd − t₁ = 21.0 mm
Total Key Height (h)7.0 mm (b = 8.0)
Share Calculation:
Hubdbt₁t₂hKEYSHAFTSimplified cross-section — dimensions per selected standard
KEYSHAFTHUBt₁t₂hkey lengthAssembly side view — shaft, key, and hub
Table of Contents10 Topics • Click to expand

What Is a Keyway & Joint Mechanics?

A keyway is a precision axial slot machined into a shaft and its mating hub bore to accommodate a machine key (Wikipedia). The key is a standardized metallic component—typically a square or rectangular steel bar—that mechanically locks the rotating assembly, transmitting drive torque while preventing relative rotation between components such as pulleys and belt drives, gears, sprockets, and couplings.

The slot machined into the outer diameter of the shaft is technically designated the keyseat, while the mating internal slot in the hub bore is the hub keyway. Torque transmission creates a tangential force F = 2T / d across the shaft radius, generating simultaneous horizontal shear stress across the key's interface cross-section and compressive bearing (crushing) stress against the vertical keyway sidewalls.

Keyed Joint Failure Modes: Direct Shear vs. Compressive Bearing Crushing
FAILURE MODE 1: DIRECT KEY SHEAR (τ)Hub PortionF (Hub)Shear PlaneShaft PortionF (Shaft)Shear Stress Formula (Shigley Ch. 7):τ = F / (b · L) = 2T / (d · b · L) ≤ τ_allow• F = 2T/d is the transmitted tangential driving force.• A_shear = b · L (Key width b × engaged key length L).• τ_allow = 0.577 · S_y / n (Distortion Energy Theory).FAILURE MODE 2: BEARING CRUSHING (σ_b)σ_b (Hub)σ_b (Shaft)Compressive Bearing Stress Formula:σ_b = F / (t · L) = 2T / (d · t · L) ≤ σ_allow• Shaft Flank Area = t₁ · L (Shaft keyway depth × length L).• Hub Flank Area = t₂ · L (Hub keyway depth × length L).• σ_allow = S_y / n (Governs key sizing for ductile steels).

Figure 2: Keyed shaft joint stress analysis per Shigley's Mechanical Engineering Design. Sunk keys are subjected to simultaneous horizontal shear across the shaft/hub interface plane (b × L) and lateral compressive bearing stress across the side flanks (t₁ × L and t₂ × L).

How Keyway Depth Is Determined

In modern machine design, keyway dimensions are governed by empirical and standardized lookups rather than arbitrary formulas. International standards—such as DIN 6885-1 / ISO 773:1978 for metric shafts and ANSI/ASME B17.1-1967 (R2013) for imperial shafts—assign optimal key dimensions and keyway depths to specific shaft diameter ranges.

The standard engineering workflow consists of:

  1. Measuring the nominal shaft diameter d (or evaluating shaft sizing from our Shaft Critical Speed Calculator).
  2. Selecting the applicable standard system (Metric DIN 6885-1 or Imperial ANSI B17.1).
  3. Matching d to the standardized diameter bracket.
  4. Extracting the standardized key width (b or W), key height (h or H), shaft keyway depth (t₁), and hub keyway depth (t₂).

These standardized depth allocations are engineered to optimize the balance between shaft torsional fatigue strength and key bearing load capacity, incorporating built-in radial clearances.

Shaft Keyway Depth vs. Hub Keyway Depth

Shaft keyway depth (t₁) and hub keyway depth (t₂) are distinct geometric dimensions. In metric engineering per DIN 6885-1, the key is not split symmetrically in half:

DIN 6885 / ANSI B17.1 Keyway Dimensioning & Caliper Inspection Blueprint
Hub BoreKEYb (Width)t₂ (Hub)t₁ (Shaft)h (Height)d − t₁ (Caliper)Standard Keyway DimensionsShaft Keyway Depth (t₁):DIN 6885 Tabulated • ANSI B17.1 = H / 2Hub Keyway Depth (t₂):DIN 6885 Tabulated • ANSI B17.1 = H / 2Top Radial Clearance (c):c = (t₁ + t₂) − h > 0 (Clearance Built-in)Shop Caliper Inspection Dimension:Shaft Bottom Check = d − t₁

Figure 1: Parallel keyway dimensioning cross-section per DIN 6885-1 and ANSI B17.1. For metric keys, the sum of shaft depth (t₁) and hub depth (t₂) exceeds key height (h) to provide standardized radial clearance, ensuring torque is transmitted purely through tangential key flanks.

Parameter / FeatureMetric (DIN 6885-1 / ISO 773)Imperial (ANSI/ASME B17.1)
Shaft Keyway Depth (t₁)Tabulated per standard diameter rangeNominally H / 2 for square keys
Hub Keyway Depth (t₂)Tabulated per standard diameter rangeNominally H / 2 for square keys
Depth Symmetry (t₁ = t₂)Asymmetric (t₁ > t₂ for virtually all sizes)Symmetric for square keys (t₁ = t₂ = H/2)
Top Radial Clearance (c)Built-in: c = (t₁ + t₂) − h > 0 (e.g. +0.2 to +0.4 mm)Nominally zero on basic size; controlled via fit class
Workshop Caliper InspectionDirect depth check: d − t₁Chordal depth check: S = D − Y − H/2

The intentional excess in metric clearance (t₁ + t₂ > h) guarantees that radial thermal expansion or slight misalignment never causes top-of-key jamming, ensuring pure tangential torque transmission across key flanks.

Key Width, Height, Depth & Standard Key Styles

Key dimensions are defined along distinct geometric axes:

  • Key Width (b or W): Tangential dimension parallel to the shaft circumference. Dictates the direct shear plane area A_s = b × L.
  • Key Height (h or H): Radial thickness dimension from shaft core toward hub. Dictates the side flank bearing contact areas t₁ × L and t₂ × L.
  • Keyway Depth (t₁, t₂): Machine cut depth measured radially from the shaft or hub circumference.

Depending on assembly requirements, shock loading, and shaft taper, engineers choose between three primary key styles:

Key Types Compared: Parallel Sunk Key vs. Woodruff Key vs. Tapered Key
PARALLEL KEY (DIN 6885)Form A (Rounded)• Geometry: Rectangular/Square• Pure tangential torque drive• No axial wedging force• Standard on motors, gearboxes• Form A (round) & Form B (square)Standard: DIN 6885 / ANSI B17.1WOODRUFF KEY (DIN 6888)Semicircular• Geometry: Semi-circular Disc• Self-aligning key seat• Fits tapered shaft extensions• Deeper seat reduces shaft fatigue strength• Common in automotive crankshaftsStandard: DIN 6888 / ANSI B17.2TAPER GIB KEY (DIN 6887)1:100 SlopeGib• Geometry: 1:100 Tapered Wedge• Driven tight for axial locking• Resists severe shock/vibrations• Causes shaft runout/eccentricity• Gib head allows easy removalStandard: DIN 6886 / DIN 6887

Figure 3: Cross-sectional comparison of machine key styles. Parallel keys transmit torque through purely tangential forces with no axial thrust. Woodruff keys self-align in circular milled pockets for tapered shafts. Tapered keys wedge at a 1:100 slope to provide axial lockup under heavy reversing shock loads.

While parallel keys remain the universal standard for continuous power transmission, Woodruff keys (Wikipedia) provide self-aligning seating on tapered shafts, and tapered gib-head keys deliver positive axial lockup under violent reversing shock loads.

Keyway Fit Classes & Tolerances (ISO / DIN 6885)

Keyway slot widths are machined to standardized ISO tolerance classes (Wikipedia) depending on the operating dynamics of the driven assembly:

ISO / DIN 6885 Keyway Width Tolerance Classes & Fits
FREE / SLIDING FITD10 / h9Application: Sliding gears, dog clutches, axial expansion couplings• Large clearance allows free axial motion along the shaft without binding.+ClearanceNORMAL / STANDARDJS9 / N9 (Shaft) • JS9 (Hub)Application: Standard pulleys, sprockets, rigid & flexible couplings, gearboxes• Light tap fit into shaft keyway; snug sliding fit into hub bore for easy assembly.Standard FitCLOSE / PRESS FITP9 (Shaft) • P9 (Hub)Application: Reversing drives, severe shock/vibrations, heavy industrial machinery• Zero backlash interference fit; prevents key fretting corrosion and chatter.Interference

Figure 4: Standard ISO keyway tolerance classes per DIN 6885-1. Normal fit (JS9/N9) is the industry standard for general mechanical assemblies. Close fit (P9) eliminates rotational backlash under alternating shock torque, while free fit (D10) allows axial displacement.

  • Normal / Standard Fit (JS9 / N9 for Shaft, JS9 for Hub): The universal default for gearboxes, bearing-supported shafts, and industrial pumps. Allows light mallet tap assembly into the shaft and smooth sliding onto the hub.
  • Close / Press Fit (P9 for Shaft and Hub): Interference fit eliminating rotational backlash under reversing rotational shock loads.
  • Free / Sliding Fit (D10 for Shaft and Hub): Clearance fit allowing smooth axial translation under load (e.g. dog clutches, gear shifter sleeves).

Worked Example — Metric (DIN 6885-1)

Scenario: A motor drive shaft has a nominal diameter of d = 30.0 mm. Determine the standard parallel key and keyway dimensions per DIN 6885-1.

  1. Shaft Diameter: d = 30.0 mm.
  2. Diameter Bracket: The standard DIN 6885-1 table specifies bracket >22 to 30 mm.
  3. Standard Key Size: 8 × 7 mm (Width b = 8 mm, Height h = 7 mm).
  4. Shaft Keyway Depth: t₁ = 4.0 mm.
  5. Hub Keyway Depth: t₂ = 3.3 mm.
  6. Clearance Verification: t₁ + t₂ = 4.0 + 3.3 = 7.3 mm > h = 7.0 mm (+0.3 mm radial clearance).
  7. Workshop Caliper Inspection: Shaft depth check d − t₁ = 30.0 − 4.0 = 26.0 mm.

Worked Example — Imperial (ANSI B17.1)

Scenario: An industrial drive shaft has a nominal diameter of d = 1.000 in. Determine standard key and keyseat dimensions per ANSI/ASME B17.1.

  1. Shaft Diameter: d = 1.000 in.
  2. Diameter Range: The ANSI B17.1 standard assigns shaft range 7/8" to 1-1/4".
  3. Standard Key Size: 1/4 in Square (W = H = 0.2500 in).
  4. Shaft Keyseat Depth: t₁ = H / 2 = 0.1250 in (1/8 in).
  5. Hub Keyway Depth: t₂ = H / 2 = 0.1250 in (1/8 in).
  6. Direct Caliper Inspection: Shaft bottom dimension d − t₁ = 1.0000 − 0.1250 = 0.8750 in (7/8 in).

Design Limitations & Stress Verification

Structural & Fatigue Design Scope

This calculator determines standardized geometric dimensions per DIN 6885-1 and ANSI B17.1. A complete mechanical joint verification must include:

  • Key Shear Stress: τ = 2T / (d · b · L) ≤ 0.577 · S_y / n per Distortion Energy Theory.
  • Compressive Bearing Stress: σ_b = 2T / (d · t₁ · L) ≤ S_y / n (commonly governs key length L).
  • Shaft Keyway Stress Concentration: Sharp keyseat corners introduce stress concentration factors (K_t ≈ 2.0 to 3.0). Always specify corner fillet radius r to prevent rotational fatigue fractures per Peterson (1932).
  • Shaft Critical Speeds: Keyways slightly reduce shaft moment of inertia; evaluate torsional and lateral dynamics using our Shaft Critical Speed Calculator.
  • Pre-Tapped Fasteners: Ensure set screw holes over the keyseat are drilled with proper tap pre-holes using our Tap Drill Calculator.

Frequently Asked Questions

What is the difference between a keyseat and a keyway?

In engineering terminology, the slot machined into the cylindrical shaft surface is called the keyseat, whereas the matching internal groove broached or slotted through the hub bore is termed the keyway. In casual shop practice, “keyway” is often used interchangeably for both.

Why is the sum of metric keyway depths (t₁ + t₂) greater than key height (h)?

Under DIN 6885-1 and ISO 773, the sum t₁ + t₂ is intentionally larger than h (typically by 0.1 to 0.5 mm) to provide standardized radial clearance at the top of the key. This ensures the key never bottoms out vertically, forcing torque to be transmitted strictly through the vertical side flanks.

How do I inspect shaft keyway depth on the shop floor?

Machinists measure from the bottom floor of the keyseat directly across to the opposite outer diameter of the shaft using a vernier caliper or micrometer. The target caliper reading is d − t₁.

Can I use this calculator for Woodruff keys or spline shafts?

This calculator is specifically calibrated for parallel metric (DIN 6885-1) and imperial (ANSI B17.1) keys. For semi-circular Woodruff keys, refer to DIN 6888 or ANSI B17.2; for splined shafts, refer to ISO 4156 or ANSI B92.1.

References & Academic Literature

Authoritative Standards

  1. ISO/R 773:1969 / ISO 773:1978. Rectangular or square parallel keys and their keyways (Dimensions in millimetres). International Organization for Standardization. [ISO 773 Standard Specification]
  2. ANSI/ASME B17.1-1967 (R2013). Keys and Keyseats. American Society of Mechanical Engineers. [ASME B17.1 Standard]
  3. Oberg, E., Jones, F. D., Horton, H. L., & Ryffel, H. H. (2020). Machinery's Handbook (31st ed.). Industrial Press. Keys, Keyseats, and Power Transmission.
  4. Budynas, R. G., & Nisbett, J. K. (2020). Shigley's Mechanical Engineering Design (11th ed., Ch. 7: Shafts and Shaft Components). McGraw-Hill Education.

Peer-Reviewed Research Papers

  1. Peterson, R. E. (1932). Fatigue of shafts with keyways. Proceedings of the American Society for Testing and Materials (ASTM), 32(2), 413–420.
  2. Fessler, H. (1957). Photoelastic determination of stresses in keyed shaft connections. Proceedings of the Institution of Mechanical Engineers, 171(1), 633–646. [DOI: 10.1243/PIME_PROC_1957_171_056_02]
  3. Orthwein, W. C. (1979). Shaft keyway stress concentration factors under torsional and bending fatigue. ASME Journal of Mechanical Design, 101(2), 248–254. [DOI: 10.1115/1.3454058]

Engineering Disclaimer

This calculator provides standard-based dimensional lookups for parallel key and keyway selection. It does not replace a comprehensive finite element or fatigue stress verification of shaft, key, and hub assemblies under dynamic shock loads. Always verify allowable shearing and bearing limits against material specifications.