Keyway Size Calculator
Determine standard keyway dimensions from shaft diameter using ANSI/DIN tables. Enter values for instant results with step-by-step formulas.
Formula
Key size is determined by shaft diameter from ANSI B17.1 or DIN 6885 tables
Standard keyway dimensions are selected based on the shaft diameter range. The key width and height increase with shaft diameter according to standardized tables. Shaft keyseat depth is approximately half the key height plus clearance.
Frequently Asked Questions
What is a keyway and what is its purpose in mechanical design?
A keyway is a slot machined into a shaft and a matching slot (called a keyseat) in the hub of a gear, pulley, or coupling that together hold a key to transmit torque between the shaft and the mounted component. The key prevents relative rotation between the shaft and the hub while allowing the component to slide axially for assembly and disassembly. Keyways are one of the most common and economical methods of transmitting torque in mechanical power transmission systems. They are used in applications ranging from small electric motors to large industrial machinery, providing a positive drive connection that is simple to manufacture and maintain.
How do I determine the correct keyway size for my shaft?
The correct keyway size is determined primarily by the shaft diameter using standardized tables from ANSI B17.1 or DIN 6885. These standards specify the key width and height based on the shaft diameter range. For example, a 25mm shaft uses an 8mm wide by 7mm tall key according to both standards. The key length is typically determined by the hub width of the component being mounted and the torque requirements. Always use the standard dimensions unless specific engineering analysis shows different dimensions are needed. Using non-standard keyway sizes makes replacement keys difficult to source and increases manufacturing costs.
What is the difference between ANSI and DIN keyway standards?
ANSI B17.1 is the American standard while DIN 6885 is the European (German) standard for parallel keys and keyways. Both standards define very similar key cross-sections for given shaft diameter ranges, and in many cases the dimensions are identical. The main differences are in tolerances, fit classes, and some dimensional preferences at certain shaft sizes. ANSI tends to use fractional inch sizes for imperial shafts while DIN uses metric dimensions throughout. When designing new equipment choose the standard that matches your market and supply chain. For replacement parts identify which standard the original equipment used by measuring the existing keyway dimensions carefully.
What are the different types of keys used in keyway connections?
Several types of keys are used in mechanical design, each suited to different applications. Square keys have equal width and height and are used for shaft diameters up to about 22mm. Rectangular (flat) keys are wider than they are tall and used for larger shafts where the deeper shaft keyseat would weaken the shaft too much. Woodruff keys are semicircular and self-aligning, commonly used in tapered shaft applications and automotive transmissions. Gib-head keys have a head that allows removal without access to both ends and are used where the key must be driven out from one end. Round (pin) keys are simple and inexpensive for light-duty applications.
How deep should the keyway be cut into the shaft and hub?
Standard practice distributes the key height between the shaft keyseat and the hub keyseat. For rectangular keys, the shaft keyseat depth is approximately half the key height plus a small clearance of 0.1 to 0.2mm. The hub keyseat depth is the remaining key height minus the shaft depth plus clearance. This ensures the key fits with slight interference or transition fit in the radial direction. The total of shaft depth plus hub depth should be slightly more than the key height to prevent the key from bottoming out in both slots simultaneously. Precise depth dimensions and tolerances are specified in the relevant standard and should be followed exactly for reliable torque transmission.
How do I machine a keyway accurately?
Keyways can be machined using several methods depending on the production volume and required accuracy. Broaching is the most common production method for internal hub keyways, producing excellent dimensional accuracy and surface finish in a single pass. Shaping or slotting machines cut keyways using a single-point tool in a reciprocating motion and are common in job shops. Milling with an end mill is used for shaft keyways, cutting either a sled-runner style (open-ended) or profile (closed-ended) keyway. Wire EDM is used for hardened materials or complex shapes. Regardless of method, the keyway must be located accurately relative to the shaft centerline and have the correct width tolerance for the specified fit class.