Keyway Calculator
Precision Engineering Tool for Shaft and Hub Keyseat Dimensions
Shaft Measurement Over Key (M)
Distance from bottom of shaft to bottom of keyway
0.125
0.125
0.016
Keyway Cross-Section Visualization
Figure 1: Simplified diagram of a shaft with a seated keyway. Green area represents the key profile.
What is a Keyway Calculator?
A keyway calculator is an essential tool used by mechanical engineers, machinists, and designers to determine the precise dimensions required to cut a slot in a shaft (keyseat) and a matching slot in a hub (keyway). These components work together with a metal key to transmit torque between a shaft and a rotating element like a gear, pulley, or sprocket.
Using a keyway calculator ensures that the fit between the key and the seats is tight enough to prevent slippage but loose enough to allow assembly. Common misconceptions often involve ignoring the “chordal height,” which is the small segment of the shaft diameter lost due to the flat cut of the keyway. Failing to account for this can lead to weakened shafts or improper key seating.
Keyway Calculator Formula and Mathematical Explanation
The math behind a keyway calculator involves geometry and trigonometry to account for the curved surface of the shaft. To calculate the depth of the cut and the measurement across the shaft, we use the following step-by-step derivation:
1. Chordal Height (C): This is the distance from the top of the shaft arc to the flat line formed by the key width.
Formula: C = (D - sqrt(D² - W²)) / 2
2. Shaft Keyseat Depth (T1): Usually half the key height (H/2) for square keys.
3. Hub Keyseat Depth (T2): Usually half the key height plus a small clearance.
4. Measurement (M): The caliper measurement from the bottom of the shaft to the bottom of the keyway.
Formula: M = D - C - T1
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| D | Shaft Diameter | In / mm | 0.125″ – 12.00″ |
| W | Key Width | In / mm | 1/16″ – 3″ |
| H | Key Height | In / mm | 1/16″ – 2″ |
| T1 | Shaft Keyseat Depth | In / mm | H / 2 |
| C | Chordal Height | In / mm | Calculated |
Practical Examples (Real-World Use Cases)
Example 1: Standard 1-inch Steel Shaft
If you are using a 1.000″ shaft with a standard 1/4″ square key, the keyway calculator would perform the following:
- Inputs: D = 1.000, W = 0.250, H = 0.250
- Chordal Height: (1 – sqrt(1² – 0.25²)) / 2 = 0.0158″
- Shaft Depth (T1): 0.250 / 2 = 0.125″
- Measurement (M): 1.000 – 0.0158 – 0.125 = 0.8592″
The machinist would measure 0.859″ from the bottom of the shaft to the bottom of the cut.
Example 2: Heavy Duty 50mm Shaft
For a 50mm shaft using a 14mm wide by 9mm high key:
- Inputs: D = 50, W = 14, H = 9
- T1 (Shaft Depth): 4.5mm
- Chordal Height: ~1.0mm
- Result: This ensures maximum torque transmission without compromising shaft integrity.
How to Use This Keyway Calculator
- Input Shaft Diameter: Enter the nominal diameter of your shaft.
- Select Key Size: Input the width and height of the key you intend to use. Refer to engineering standards if unsure.
- Review Results: The tool instantly calculates the Chordal Height and the Measurement (M).
- Verify Fit: Ensure the T1 and T2 depths meet your specific mechanical tolerances.
Key Factors That Affect Keyway Calculator Results
- Material Strength: Harder materials may require shallower keyways to prevent stress risers.
- Torque Requirements: High-torque applications often use multiple keys or deeper keyways.
- Fit Class: Whether you need a clearance fit, transition fit, or interference fit affects depth.
- Radius at Corners: Sharp corners increase stress; the keyway calculator assumes a standardized radius.
- Tapered Keys: Tapered keys change the depth calculation across the length of the seat.
- Shaft Speed: High-speed rotation requires perfect balance, which can be affected by keyway depth.
Typically, a keyway is cut to a depth equal to half of the key’s height measured at the side (T1 = H/2).
It is the distance between the center of the keyway top and the arc of the shaft’s outer circumference.
Yes, as long as all inputs (D, W, H) are in the same unit (mm), the output will be in mm.
Because the measurement M must subtract the Chordal Height (C) to account for the curvature of the shaft.
A keyway that is too deep significantly reduces the cross-sectional area of the shaft, leading to potential fatigue failure.
For a 2″ shaft, a 1/2″ x 1/2″ square key is standard according to ANSI. Use the keyway calculator to find the M value.
Higher torque requires larger keys. Consult a torque transmission guide for sizing.
Usually, they are equal, but the hub keyway (T2) often has a small added clearance to ensure the key doesn’t bottom out.
Related Tools and Internal Resources
- Shaft Design Tools – Complete suite for shaft diameter and stress analysis.
- Mechanical Tolerances – Understanding ISO and ANSI fit classes for keys.
- Gear Design Calculator – Calculate gears that interface with these keyways.
- Torque Transmission Guide – Learn how to calculate the power capacity of a key.
- Engineering Standards – Reference charts for standard key dimensions.
- Machining Formulas – Speeds and feeds for cutting keyways.