A shaft key is a small machined bar of metal that sits in a slot cut across the shaft and the bore of a mating hub, transmitting torque between the two by shear and bearing on its side faces. It is the simplest and most widely used demountable connection in power transmission, found wherever a gear, pulley, sprocket, coupling, or flywheel must turn with a shaft yet still be removed for service.
Because the key is a separate, inexpensive part, it is often designed to be the weakest link in the drive so that it shears before the shaft or hub is damaged, making it a mechanical fuse as well as a torque coupling. Key cross-sections are not free design choices: they are fixed by the shaft diameter through dimensional standards including ISO 773, DIN 6885, ANSI/ASME B17.1, GB/T 1096, and JIS B 1301.
This guide is aimed at industrial purchasing engineers and design engineers. It covers 6 chapters from what a key is, through key types, dimensional standards, materials, fits and tolerances, to shear and bearing sizing and selection decisions, with 7 selection FAQs and supplier notes. All dimensions reference the public standards ISO 773, ISO 2491, ISO 3912, DIN 6885, DIN 6888, BS 4235, ANSI/ASME B17.1, GB/T 1096, and JIS B 1301.
Chapter 1 / 06
What is a Shaft Key
A shaft key is a machine element, usually a rectangular or square bar of steel, fitted into matching slots called keyways or keyseats that are cut into a shaft and into the bore of the component mounted on it. When torque is applied, the key transmits the rotational load between shaft and hub through shear across the key and bearing pressure on its side faces. Keys are one of the four classical methods of fixing a hub to a shaft, alongside splines, interference (shrink) fits, and friction-based locking assemblies, and they remain the most common because they are cheap, standardized, and easy to assemble and dismantle.
Functionally a key does two jobs at once. First, it positively couples the shaft and hub so they rotate together without slipping, which is essential where timing or backlash matters, for example on gears, timing pulleys, and indexing cams. Second, because the key is a small, low-cost, replaceable part, designers can intentionally size it so it shears before the shaft yields under an overload, turning it into a sacrificial mechanical fuse that protects the expensive parts of the drive train. This dual role of torque transmission and overload protection shapes much of the material and sizing logic discussed later in this guide.
The geometry has three named features that appear on every drawing. The keyway in the shaft is the longitudinal slot milled along the shaft surface; the keyway in the hub is the matching slot broached through the bore; and the key itself bridges the two. For a parallel key the sum of the shaft keyway depth and the hub keyway depth equals the key height plus a small clearance specified by the standard, so the key seats fully without bottoming or floating. Corner radii at the bottom of the keyway are specified deliberately, because a sharp internal corner is a fatigue stress raiser and is a frequent origin of shaft cracking.
Keyed joints have a long industrial history. Square and rectangular sunk keys were already standard practice in nineteenth-century millwork and early machine tools, and the modern dimensional families crystallized in the twentieth century: the British BS 46 and later BS 4235 series, the German DIN 6885 first issued in the 1950s, the American ASA and later ANSI B17.1 standard, and the international ISO 773 that harmonized the metric world. Today the parallel sunk key per ISO 773 and its national equivalents is the dominant form, while older taper and gib-head keys persist in heavy and legacy machinery.
In scale terms, keyed connections span an enormous range. The smallest standard metric parallel keys are 2 mm wide and serve shafts of 6 to 8 mm in instrument drives and small gear motors, while the largest tabulated sizes exceed 100 mm in width on rolling-mill spindles and large marine reduction gears carrying shafts of several hundred millimeters. Across that range the underlying physics is identical: torque becomes a tangential force at the shaft surface, and the key must carry that force in shear and bearing without failing or working loose, which is exactly the calculation a procurement or design engineer must be able to check.
Chapter 2 / 06
Key Types and Classification
Keys are classified first by whether they are sunk into the shaft or not, and second by their cross-sectional shape and how they transmit and locate load. The great majority of industrial keys are sunk keys, meaning the keyway is cut into the shaft so the key sits partly below the shaft surface. Within that family the parallel key dominates, but several other forms remain important for specific duties. The table below summarizes the main types, how each transmits load, and where each is typically used.
Key type
Cross-section
How it transmits load
Typical applications
Parallel (square)
Uniform, width = height
Shear and bearing on side faces, no preload
Shafts up to about 165 mm (6-1/2 in), general drives
Parallel (rectangular)
Uniform, width > height
Shear and bearing on side faces, no preload
Larger shafts, where a full square would weaken the shaft
Feather key
Parallel, clearance in hub
Side faces, hub free to slide axially
Sliding gears, shift forks, adjustable hubs
Taper key
Sloped top, taper 1:100
Side faces plus friction from wedging
Legacy and heavy machinery, no separate axial lock
Gib-head key
Taper key with a head
Same as taper key, head aids removal
Where a key must be driven out from one accessible end
Woodruff key
Semicircular segment
Self-aligning, side faces of the protruding top
Tapered motor shafts, small engine crankshafts, spindles
Parallel keys have a constant rectangular cross-section along their length and transmit torque only through their side faces, exerting no radial force on the hub. This is their great advantage: the hub stays concentric with the shaft, which matters for high-speed and precision drives where any induced eccentricity would cause vibration. Square parallel keys (width equal to height) are preferred on smaller shafts, while rectangular keys (width greater than height) are used on larger shafts so the keyway does not cut too deep and weaken the shaft. Because parallel keys provide no axial location, the hub must be held by a separate set screw, retaining ring, shaft collar, or shoulder.
Feather keys are a variant of the parallel key with a deliberate clearance fit in the hub keyway so the hub can slide axially along the shaft while still being driven in rotation. They are essential in sliding-gear gearboxes, shift mechanisms, and any application where a component must move along the shaft under load. A feather key is often fastened to the shaft with one or two screws so it travels with the shaft rather than the hub, and it always uses the free-fit width tolerance described in Chapter 5.
Taper keys and gib-head keys have a sloped top face, conventionally tapered at 1:100, and are driven axially into the keyway so the wedging action grips the hub by friction in addition to the side-face contact. This lets a taper key hold a hub axially without any other retaining device, which is why it survived in older and heavy machinery. The penalties are that the wedge can push the hub slightly off-center, raising eccentricity, and that removal can be difficult. A gib-head key adds a projecting head so a puller or drift can extract it from one end. The exposed head must be guarded because it is a clothing-snag and injury hazard on rotating machinery.
Woodruff keys are flat semicircular segments that seat in a deep half-moon pocket milled into the shaft, with only the flat top protruding into the hub keyway. The curved base lets the key rock to align itself, so it is self-aligning and tolerates the tapered shafts found on electric-motor stub shafts, small internal-combustion engines, and machine-tool spindles. Their dimensions are standardized in ISO 3912 and DIN 6888. The trade-off is that the deep pocket removes a large bite of shaft cross-section, so Woodruff keys are confined to light and medium torque on smaller shafts and are rare in heavy industrial drives.
Chapter 3 / 06
Dimensional Standards and Sizes
The defining feature of keys is that you do not choose the cross-section freely: it is fixed by the shaft diameter through a dimensional standard, and only the length remains a design variable. The metric world is governed by ISO 773 for ordinary parallel keys, ISO 2491 for thin parallel keys, and ISO 3912 for Woodruff keys, with national standards DIN 6885 (Germany), GB/T 1096 (China), JIS B 1301 (Japan), UNI 6604 (Italy), and BS 4235 (United Kingdom) all carrying the same metric dimensions. The inch world uses ANSI/ASME B17.1 for keys and keyseats. For metric parallel keys these standards are dimensionally interchangeable; a key cut to DIN 6885 fits a keyway dimensioned to ISO 773 or GB/T 1096 of the same nominal size.
The metric table below gives representative shaft-diameter bands with their key width (b), key height (h), shaft keyway depth (t1), and hub keyway depth (t2), per ISO 773 and DIN 6885. The full standard runs continuously from 6 mm to over 500 mm of shaft diameter; this is a working extract for common sizes. Note how the cross-section steps up in defined bands rather than scaling smoothly.
Shaft diameter (mm)
Key b × h (mm)
Shaft depth t1 (mm)
Hub depth t2 (mm)
6 to 8
2 × 2
1.2
1.0
10 to 12
4 × 4
2.5
1.8
17 to 22
6 × 6
3.5
2.8
22 to 30
8 × 7
4.0
3.3
38 to 44
12 × 8
5.0
3.3
50 to 58
16 × 10
6.0
4.3
75 to 85
22 × 14
9.0
5.4
110 to 130
32 × 18
11.0
7.4
The inch system under ANSI/ASME B17.1 follows a simple proportioning rule: key width is approximately one quarter of the shaft diameter. Square keys are preferred through 6-1/2 inch (about 165 mm) shafts, and rectangular keys are preferred above that, where a full-height square key would cut the shaft too deeply. For a square key the keyseat depth in both shaft and hub is half the key height, so the key sits half in the shaft and half in the hub. The table below is a working extract of the ANSI B17.1 square-key chart.
Shaft diameter (in)
Square key W × H (in)
Keyseat depth (in)
1/2 to 9/16
1/8 × 1/8
1/16
5/8 to 7/8
3/16 × 3/16
3/32
15/16 to 1-1/4
1/4 × 1/4
1/8
1-5/16 to 1-3/8
5/16 × 5/16
5/32
1-7/16 to 1-3/4
3/8 × 3/8
3/16
1-13/16 to 2-1/4
1/2 × 1/2
1/4
2-5/16 to 2-3/4
5/8 × 5/8
5/16
2-13/16 to 3-1/4
3/4 × 3/4
3/8
Length is the only free dimension, and it is chosen from a preferred series so that key stock and broaches remain standard. The metric preferred lengths run 6, 8, 10, 12, 14, 16, 18, 20, 22, 25, 28, 32, 36, 40, 45, 50, 56, 63, 70, 80, 90, 100, 110, 125, 140, 160, 180, 200, 220, 250, 280, 320, 360, and 400 mm. In practice the chosen length is the smallest standard value that both fits inside the hub and keeps the calculated shear and bearing stresses within the allowable limits derived in Chapter 5.
Chapter 4 / 06
Materials and Key Stock
Keys are made from key stock, which is precision-rolled or cold-drawn bar held to the width and height tolerances the dimensional standards require, so it can be cut to length and dropped straight into a standard keyway. The default material is medium-carbon steel, most commonly C45, which is the same alloy known as 1045 in the AISI system and S45C in the Japanese system. C45 in the normalized condition gives a tensile strength of roughly 570 to 700 MPa and a Brinell hardness around 170 to 210 HB; supplied cold-drawn, strain hardening raises the tensile strength to roughly 600 to 800 MPa while reducing ductility. This combination of strength, toughness, and low cost makes C45 the workhorse of general key stock.
The single most important material principle is that the key should be slightly weaker than both the shaft and the hub. The intent is that under a torque overload the key shears or crushes first, acting as a sacrificial mechanical fuse that protects the costly shaft and hub from damage. In practice this is achieved by matching ordinary C45 key stock to shafts of similar or higher-grade steel and by sizing the key length so that the key reaches its allowable stress before the shaft does. Designers who upgrade the key to a high-strength alloy without thinking about this can inadvertently move the failure into the shaft, which is far more expensive to replace.
Beyond plain carbon steel, several material grades serve specific duties. The table below summarizes common key materials and where each is appropriate.
Material
Approx. tensile strength
Why chosen
Typical use
C45 / 1045 / S45C carbon steel
570 to 800 MPa
Strength, toughness, low cost
General-purpose key stock, the default
Stainless 304
about 515 MPa
Corrosion resistance, hygienic finish
Food, pharma, marine, washdown
Stainless 316
about 515 MPa
Chloride and acid resistance
Chemical and coastal environments
Brass
about 340 to 470 MPa
Non-magnetic, non-sparking, light duty
Instruments, electrical, low torque
4140 alloy / induction-hardened
over 900 MPa
High strength and fatigue under shock
Heavy reversing and impact drives
Stainless steels 304 and 316 are specified where corrosion or hygiene rules out carbon steel. Both have lower tensile strength than C45, around 515 MPa, so a stainless key may need to be longer to carry the same torque, and the designer must re-check the shear and bearing margins rather than assuming a drop-in swap. Grade 316, with its added molybdenum, is preferred for chloride-bearing and acidic environments such as coastal, marine, and certain chemical-process drives, while 304 covers general corrosion and food contact.
Brass keys are used where a non-magnetic or non-sparking element is needed, for example in instrument drives, certain electrical machines, and explosive atmospheres, accepting their lower strength for light-torque service. At the other extreme, alloy steels such as 4140, often induction or through-hardened, are chosen for heavy, reversing, or impact-loaded drives where a plain carbon key would peen or shear prematurely. In all cases the key material must be considered together with the keyway corner radius, surface finish, and fit, because fatigue cracking in a keyed joint usually starts at a sharp keyway corner rather than in the bulk of the key itself.
Chapter 5 / 06
Fits, Tolerances and Sizing
Once the cross-section is fixed by the shaft diameter, two engineering decisions remain: how tightly the key fits the keyways, and how long the key must be to carry the torque. Both are decided on the key width, because width controls the fit and width times length controls the shear area. Getting the fit wrong is the leading cause of keys working loose in service; getting the length wrong is the leading cause of keys shearing.
Fit is specified by ISO tolerance classes on the key width. Three standard fits exist in the metric system, and ANSI B17.1 defines three parallel classes. The table below maps them.
Fit class (ISO / DIN)
Shaft keyway
Hub keyway
ANSI B17.1 term
When to use
Free (sliding) fit
H9
D10
Class 1 (clearance)
Feather keys, hub must slide axially
Normal fit
N9
Js9
Class 2 (normal)
General assembly, steady torque
Close (interference) fit
P9
P9
Class 3 (interference)
Reversing and shock loads, no rocking
A free fit leaves clearance on both flanks so the key, or the hub over a feather key, can slide; it is correct for sliding gears but wrong for fixed hubs because the clearance lets the key rock under load reversal. A normal fit is the everyday choice for hubs that stay put under steady, unidirectional torque. A close or interference fit grips the key on both flanks so it cannot rock; it is required for frequently reversing drives, shock loads, and high-cycle duty, at the cost of needing a press or selective fitting at assembly. Choosing a clearance fit for a reversing drive is a classic error that ends in keyway rollover, where the key hammers the corners of the keyway until the joint is destroyed.
Sizing the length starts by turning torque into a tangential force at the shaft surface. With T the transmitted torque and D the shaft diameter, the force on the key is F = T / (D/2) = 2T/D. The key then carries this force in two distinct ways, and both must be checked.
Shear stress acts across the width times the effective length: shear stress = F / (b × L), where b is the key width and L is the effective length. The key must not exceed the allowable shear strength of the key material.
Bearing (crushing) stress acts on the portion of the key height that presses against the keyway wall, approximately half the height: bearing stress = F / ((h/2) × L), where h is the key height. The key must not exceed the allowable compressive strength of the material or of the weaker of the shaft and hub.
For a square key, where width equals height, the bearing stress works out to about twice the shear stress, so bearing usually governs the design and is the calculation to check first. A representative worked basis uses C45 normalized key stock with an allowable shear strength near 200 MPa and an allowable compressive strength near 130 MPa; the lower compressive figure again confirms that bearing is the limiting mode. The effective length is the straight bearing length after subtracting the end chamfers, not the gross key length.
The procedure in practice is to solve both stress equations for L, take the larger required length, multiply the torque by a service factor (commonly 1.5 for steady loads up to 2.5 or more for heavy shock and reversing duty), and round up to the next preferred standard length that still fits inside the hub. If the resulting length would exceed the hub width, the remedies are a larger key cross-section by oversizing the shaft, a higher-strength key and shaft material, or a second key set at 90 or 120 degrees around the shaft to share the load. Two keys do not simply double capacity because of fit and load-sharing tolerances, so a derating of roughly 25 percent is prudent.
Chapter 6 / 06
Selection Decision Factors
To turn the preceding chapters into a specific part number, work through the decision sequence below. Most key failures trace not to a single wrong number but to skipping one of these checks, especially fit class and axial retention, which are the two most commonly neglected. This list doubles as an RFQ template.
Shaft diameter and key cross-section: measure the shaft diameter at the key location and read the fixed width by height from the governing standard (ISO 773 or DIN 6885 metric, ANSI B17.1 inch, GB/T 1096 in China). The cross-section is not negotiable; only length is.
Torque and length: compute the tangential force F = 2T/D, check shear and bearing stress, apply a service factor for shock and reversal, and pick the smallest preferred length that satisfies both stresses and fits the hub.
Key type: choose parallel for general fixed hubs, feather for axially sliding hubs, taper or gib-head only for legacy or heavy machinery that relies on the wedge for axial hold, and Woodruff for tapered or self-aligning small shafts.
Fit class: free (H9/D10) for sliding, normal (N9/Js9) for steady torque, close (P9/P9) for reversing and shock. Match the fit to the load reversal pattern, not to convenience at assembly.
Material: C45 key stock by default, stainless 304 or 316 for corrosion and hygiene, brass for non-magnetic light duty, alloy or hardened steel for heavy shock. Keep the key slightly weaker than the shaft so it remains the sacrificial element.
Axial retention: a parallel key gives no axial location, so specify the locking method separately, a set screw over the key, a retaining ring, a shaft collar, a shoulder, or a locking assembly. Omitting this is a frequent oversight.
Keyway detail: specify corner radii and surface finish at the bottom of the keyway to limit fatigue stress concentration, and confirm the broach and cutter sizes are standard so the joint is serviceable in the field.
One last dimension is serviceability and sourcing. Key stock in standard sizes and materials is a commodity available from industrial fastener and power-transmission distributors such as Huyett, Misumi, RS Components, and McMaster-Carr, and from regional manufacturers supplying to ISO 773, DIN 6885, GB/T 1096, and ANSI B17.1. Because keys are designed as sacrificial parts, keeping a small inventory of the correct cross-section, fit, and material at hand turns a sheared key from a multi-day shaft repair into a minutes-long swap, which is the practical payoff of getting the selection right the first time.
FAQ
What is the difference between a parallel key and a taper key?
A parallel key has a uniform rectangular or square cross-section along its full length and transmits torque purely through the side faces, so it carries no radial preload and keeps the hub concentric. A taper key has a sloped top face, typically 1:100, and is driven axially into the keyway so the wedging action also clamps the hub against the shaft by friction. The trade-off is that a taper key can force the hub slightly off-center and is harder to remove. Parallel keys per ISO 773 and DIN 6885 dominate modern machinery because most applications use a separate locking element such as a set screw, retaining ring, or locking assembly to handle axial location.
How do I select the right key size for a given shaft diameter?
Key cross-section is fixed by the shaft diameter, not chosen freely. Under ISO 773 and DIN 6885 each shaft band maps to one width by height pair: for example a 22 to 30 mm shaft uses an 8 by 7 mm key, and a 50 to 58 mm shaft uses a 16 by 10 mm key. Under ANSI B17.1 the width is roughly one quarter of the shaft diameter, so a 1 inch shaft uses a 1/4 inch square key. Once the cross-section is set, only the length is a design variable: pick a standard length that gives an acceptable shear and bearing stress and that fits within the hub width.
How is key length calculated from torque?
Convert torque to a tangential force at the shaft surface: F equals T divided by the shaft radius (D/2). The key then sees shear across its width times length, so shear stress equals F divided by (width times effective length). Bearing stress acts on the portion of the key height bearing against the keyway wall, roughly half the height, so bearing stress equals F divided by (half height times effective length). Solve both for length, take the larger result, apply a service factor of about 1.5 to 2.5 for shock loads, and round up to a standard length. For a square key bearing stress is about twice the shear stress, so bearing usually governs.
What material are shaft keys made from?
The default is medium-carbon steel key stock, C45 (also called 1045 or S45C), supplied cold-drawn to a bright finish. C45 gives a tensile strength of roughly 570 to 700 MPa in the normalized condition and around 600 to 800 MPa cold-drawn, which suits most drives. A common design rule keeps the key slightly weaker than the shaft so the key shears first and protects the more expensive shaft and hub, acting as a mechanical fuse. For corrosive or food-grade service, stainless 304 or 316 key stock is used; for non-magnetic or light-duty applications, brass keys appear. High-shock drives may use 4140 or induction-hardened keys.
What are the fit classes for keys and keyways?
Fit is defined on the key width. Under the ISO and DIN system three width fits exist: free fit (shaft keyway H9, hub keyway D10) for feather keys that must slide; normal fit (shaft N9, hub Js9) for general assembly; and close or interference fit (shaft and hub both P9) for reversing and shock loads where the key must not rock. ANSI B17.1 uses the parallel terms Class 1 (clearance), Class 2 (normal), and Class 3 (interference). A loose fit lets the key rock under load reversal and hammer out the keyway, while too tight a fit makes assembly impossible without a press, so the application duty drives the choice.
When should I use a Woodruff key instead of a parallel key?
A Woodruff key is a semicircular segment that seats in a deep half-moon pocket milled in the shaft, with the flat top engaging the hub keyway. It is self-aligning and tilts to follow a tapered shaft, which is why it is standard on tapered motor shafts, small engine crankshafts, and machine-tool spindles. Its dimensions follow ISO 3912 and DIN 6888. The drawback is that the deep pocket removes more shaft material than a parallel keyway and weakens the shaft, so Woodruff keys are limited to light and medium torque on smaller shafts and are uncommon in heavy industrial drives, where parallel keys are preferred.
Are ISO 773, DIN 6885, GB/T 1096, and JIS B 1301 interchangeable?
For metric parallel keys the dimensional content is the same. ISO 773 is the international base standard; DIN 6885-1 (Germany), GB/T 1096 (China), JIS B 1301 (Japan), and UNI 6604 (Italy) all specify the same key width, height, keyway depths, and shaft-diameter bands. The differences are language, drawing-note format, and the standard number cited, not the physical sizes. A key made to DIN 6885 will fit a keyway dimensioned to ISO 773 or GB/T 1096 of the same nominal size. Note that ANSI B17.1 is an inch standard and is not interchangeable with the metric family.