Quick Answer: What Key Size Do I Use for My Shaft?
A keyway is a rectangular slot machined into a shaft and its mating hub so a key can transmit torque without slipping. Key size is set by shaft diameter, not chosen freely. Under ANSI B17.1, a 1″ shaft uses a 1/4″ × 1/4″ square key with a shaft keyseat depth of about 1/8″. The key sits roughly half in the shaft and half in the hub.
This calculator returns key width, key height, shaft keyway depth, hub keyway depth and recommended key length for any shaft diameter per ANSI B17.1 and ISO 773. Inputs are shaft diameter, unit (inch or mm) and standard. Recommended key length is about 1.5 × shaft diameter, and a Class 2 (normal) fit uses a keyway width tolerance near +0.002″/-0.000″.
Common ANSI key sizes (width × height): 1/2″ shaft → 1/8″ × 3/32″ key | 1″ shaft → 1/4″ × 1/4″ key | 1-1/2″ shaft → 3/8″ × 1/4″ key | 2″ shaft → 1/2″ × 3/8″ key | shaft keyseat depth ≈ H/2 | typical width tolerance +0.002″ – +0.003″.
Standard Keyway Sizes (ANSI B17.1)
The table below shows standard key and keyway dimensions for common shaft diameters per ANSI B17.1. All dimensions in inches.
| Shaft Dia. Range | Key Width | Key Height | Shaft Depth | Hub Depth |
|---|
How Keyway Sizing Works
Key size is standardized based on the shaft diameter. The key width equals approximately one-quarter of the shaft diameter for most sizes. The key sits half in the shaft and half in the hub, with slight differences in depth to ensure proper seating and clearance.
Key Fit Classes
ANSI B17.1 defines three fit classes for keys and keyways:
- Class 1 (Tight Fit): Used when the key must not move. Interference fit between key and keyway. Common in high-torque applications.
- Class 2 (Normal Fit): The most common fit. Allows easy assembly with minimal play. Suitable for most power transmission applications.
- Class 3 (Loose Fit): Used when the key must slide axially. Common in adjustable mechanisms and light-duty applications.
Pro tip: For keyways in hardened shafts, wire EDM produces the cleanest slot with no burrs and excellent dimensional accuracy. For soft materials, CNC end milling is faster and more cost-effective.