This keyway and key sizing calculator helps engineers determine the proper dimensions and length for keys used in shaft-hub connections. By inputting shaft diameter, torque requirements, and key material properties, you can ensure your key design meets both geometric and strength requirements for safe power transmission.
π Browse all 322 free engineering calculators
Table of Contents
Key and Keyway System Diagram
Keyway Key Size Calculator
Mathematical Equations
The keyway key size calculator uses two fundamental stress equations to ensure safe design:
Shear Stress in Key:
Ο = 2T/(dWL)
Where:
- Ο = Shear stress (MPa)
- T = Applied torque (Nβ m)
- d = Shaft diameter (m)
- W = Key width (m)
- L = Key length (m)
Compressive Stress in Key:
Ο = 4T/(dHL)
Where:
- Ο = Compressive stress (MPa)
- T = Applied torque (Nβ m)
- d = Shaft diameter (m)
- H = Key height (m)
- L = Key length (m)
Complete Technical Guide to Keyway and Key Design
Understanding Keys and Keyways
Keys and keyways are fundamental mechanical components used to create a positive connection between shafts and hubs, preventing relative rotation while allowing axial movement. This connection method is critical in power transmission systems, from small machinery to large industrial equipment. The keyway key size calculator ensures these connections are properly sized for safe operation under specified loads.
The key sits in matching keyways cut into both the shaft and hub, creating a mechanical lock that transfers torque through shear and bearing forces. Unlike other connection methods such as splines or interference fits, keys provide a simple, cost-effective solution that allows for easy assembly and disassembly of components.
Types of Keys and Applications
Square and rectangular parallel keys are the most common types, with dimensions standardized according to ISO 2491. Square keys are typically used for smaller shafts (up to about 22mm diameter), while rectangular keys are preferred for larger shafts where the additional width provides better torque capacity without excessive weakening of the shaft.
In automation systems, particularly those using FIRGELLI linear actuators, keys are often found in gearbox output shafts, motor couplings, and drive mechanisms. The precise sizing provided by our keyway key size calculator ensures these critical connections can handle the loads encountered in automated positioning systems.
Design Theory and Stress Analysis
The design of keys involves two primary failure modes: shear failure across the key cross-section and compressive (bearing) failure where the key contacts the keyway sides. Our calculator addresses both failure modes using established mechanical engineering principles.
Shear failure occurs when the applied torque creates sufficient shear stress to cause the key material to fail across its cross-sectional area. The shear stress formula Ο = 2T/(dWL) assumes uniform stress distribution across the key width and length. The factor of 2 in the numerator accounts for the torque arm (d/2) and unit conversions.
Compressive failure happens when the key bears against the keyway wall with excessive force, causing crushing or deformation. The compressive stress formula Ο = 4T/(dHL) considers the projected contact area between the key and keyway. The factor of 4 results from the torque arm and the assumption that load is distributed over the key height and length.
Material Selection and Allowable Stresses
Key material selection significantly impacts the allowable stresses used in the keyway key size calculator. Mild steel keys (allowable stress ~40 MPa) are suitable for light-duty applications with occasional loading. Medium carbon steel keys (60 MPa) handle moderate continuous loads, while high carbon and alloy steel keys (80-120 MPa) are necessary for high-performance applications.
The calculator incorporates a safety factor of 2.0, meaning actual stresses should not exceed half the material's allowable stress. This conservative approach accounts for stress concentrations, dynamic loading, and manufacturing tolerances that aren't captured in the simplified stress equations.
Worked Design Example
Consider designing a key for a 30mm diameter shaft transmitting 150 Nβ m of torque, using medium carbon steel (60 MPa allowable stress):
Step 1: From ISO 2491 standards, a 30mm shaft requires an 8Γ7mm key (W=8mm, H=7mm).
Step 2: Calculate required length for shear stress:
L = 2T/(Ο_allow Γ d Γ W) = (2 Γ 150)/(60Γ10βΆ Γ 0.030 Γ 0.008) = 0.0208m = 20.8mm
Step 3: Calculate required length for compressive stress:
L = 4T/(Ο_allow Γ d Γ H) = (4 Γ 150)/(60Γ10βΆ Γ 0.030 Γ 0.007) = 0.0476m = 47.6mm
Step 4: The required length is 47.6mm (the larger value). With a 2.0 safety factor, use a minimum 50mm key length.
This example demonstrates why the keyway key size calculator considers both failure modes β compression often governs the design for standard key proportions.
Manufacturing and Installation Considerations
Proper keyway machining is crucial for the stress assumptions in our calculator to remain valid. Keyways should be cut with sharp corners and smooth surfaces to minimize stress concentrations. The fit between key and keyway should be snug but not require excessive force for installation.
Standard tolerances call for keyway width tolerance of H9 and key width tolerance of h9, providing a clearance fit that accommodates manufacturing variations while maintaining good contact. Key length should be 2-5mm less than hub length to prevent binding during assembly.
In applications involving FIRGELLI electric linear actuators, proper key installation ensures reliable torque transmission in servo systems, automated positioning equipment, and robotic mechanisms where precision and reliability are paramount.
Advanced Design Considerations
The basic stress equations used in our keyway key size calculator assume static loading and uniform stress distribution. Real-world applications may involve additional considerations:
Dynamic Loading: Applications with shock loads, reversing torque, or high-frequency cycling may require larger safety factors or fatigue analysis. Consider using higher-strength materials or alternative connection methods for severe duty cycles.
Stress Concentrations: Sharp keyway corners create stress concentrations that can be 2-3 times higher than calculated average stresses. Radius corners where possible, or account for this effect in material selection.
Multiple Keys: Large diameter shafts sometimes use multiple keys spaced around the circumference. Load distribution among multiple keys is often uneven, requiring careful analysis or conservative design approaches.
Integration with Related Engineering Calculations
Key design often intersects with other mechanical design calculations. Shaft sizing must account for the stress concentrations introduced by keyways, typically requiring 25-50% increase in shaft diameter compared to a plain shaft. Our engineering calculators section includes complementary tools for shaft design, bearing selection, and coupling analysis that work together with the keyway key size calculator for complete drivetrain design.
For applications involving linear motion systems, the relationship between rotary drive components (where keys are used) and linear actuators becomes critical. Understanding these interactions helps optimize complete automation systems for performance and reliability.
Quality Control and Testing
After installation, key connections should be verified through appropriate testing. Low-torque proof tests can identify loose fits or manufacturing defects. For critical applications, consider non-destructive testing methods to verify key seating and detect potential failure points.
Regular inspection schedules should include checking for key wear, especially in high-cycle applications. Worn keys should be replaced promptly, as the reduced cross-section invalidates the original stress calculations from the keyway key size calculator.
Documentation of key specifications, material certifications, and inspection records provides traceability and supports reliability programs in industrial automation systems. This documentation becomes particularly important in applications involving precision positioning systems and safety-critical automation equipment.
Frequently Asked Questions
π Explore our full library of 322 free engineering calculators β
About the Author
Robbie Dickson
Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.