Shaft & Keyway Sizing Calculator
Size shafts from torque loads and select ANSI standard keys and keyways per ANSI B17.1 and Machinery's Handbook
Free shaft and keyway sizing calculator for mechanical engineers, millwrights, and industrial maintenance professionals. Enter the transmitted horsepower, RPM, and service factor to calculate the required shaft diameter based on shear stress. Then select the shaft size to get the standard ANSI B17.1 square or rectangular key dimensions, width, height, keyway depth in shaft, keyway depth in hub, and recommended tolerances. Checks key shear and compressive bearing stress against material allowables. Supports common shaft materials (1045, 4140, 4340, 316 SS) with their allowable stress values.
Calculate torque from horsepower and RPM
Torque-HP Calculator →Calculate bolt torque for coupling connections
Bolt Torque Calculator →Check coupling alignment tolerances
Coupling Alignment Calculator →Estimate bearing life under the shaft loads
Bearing Life Calculator →How It Works
-
Enter the Load
Enter the transmitted horsepower (or kW) and shaft RPM. Select a service factor based on the driven equipment, 1.0 for uniform loads, 1.25-1.5 for moderate shock, 2.0-3.0 for heavy shock or reversing loads.
-
Select Shaft Material
Choose the shaft material to set the allowable shear stress. Common choices: 1045 steel (general purpose), 4140 (heat-treatable, higher strength), 4340 (high-strength, critical applications), 316 SS (corrosion resistance).
-
Review Shaft Diameter
The calculator shows the minimum shaft diameter based on torsional shear stress and the next standard shaft size. If a keyway is present, the tool increases the diameter to compensate for the stress concentration.
-
Get Key and Keyway Dimensions
For the selected shaft diameter, the calculator outputs the standard ANSI B17.1 key width, height, keyway depth (shaft and hub), length recommendation based on the applied torque, and both shear and compressive bearing stress on the key.
Built For
- Mechanical engineers sizing drive shafts for conveyors, mixers, and pumps
- Millwrights selecting replacement keys for worn keyways during equipment rebuilds
- Maintenance engineers verifying that an existing shaft can handle an increased load after a motor upgrade
- Machine designers specifying key and keyway tolerances for new shaft-to-hub connections
- Students learning the ANSI B17.1 standard key sizing system and shaft stress calculations
Assumptions
- The shaft is loaded in pure torsion, bending loads, axial loads, and combined loading require additional analysis.
- Key dimensions follow ANSI B17.1 standard square or rectangular key proportions.
- Material properties are for the normalized or quenched-and-tempered condition as specified, actual values depend on heat treatment.
References
- ANSI B17.1, Keys and Keyseats
- Machinery's Handbook, 31st Edition, Shafts, Keys, and Couplings sections
- ASME B106.1M, Design of Transmission Shafting
- Shigley's Mechanical Engineering Design, 11th Edition, Shaft and key design chapters
Frequently Asked Questions
Learn More
Shaft and Keyway Sizing: Torque, Stress, and ASME B17.1
How to select key size for a given shaft diameter and torque. Shear and bearing stress calculations, standard key dimensions, and common failure modes.
Related Tools
Air Compressor Leak Calculator
Find out how much compressed air leaks cost your facility per year. Enter leak count, system pressure, and electricity rate to see CFM losses, kW waste, and annual dollars wasted.
Compressed Air System Sizing & Cost Calculator
Size your shop air compressor based on real tool CFM demand with duty cycles. Get HP recommendations, pipe sizing, receiver tank sizing, and true 5-year operating cost comparison.
Concrete Volume Calculator
Calculate how many cubic yards of concrete to order. Accounts for overdig, pour-specific waste factors, and short load fees. Supports slabs, footings, walls, columns, and steps.