Keyway Dimensions Chart

Keyway dimensions chart for shafts from 6 to 500 mm: a 25 mm shaft takes an 8 × 7 mm parallel key, with a shaft keyway 4.0 mm deep (t1) and a hub keyway 3.3 mm deep (t2). Type a shaft diameter in mm or inches below to get the key size, both depths and the keyway width limits for a free, normal or close fit. The default is the 25 mm shaft with a normal fit: shaft keyway N9 at 7.964 to 8.000 mm and hub keyway Js9 at 7.982 to 8.018 mm.

Key for a 25 mm shaft8 × 7 mm key

Shaft range over 22 up to 30 mm. Shaft keyway depth t1 = 4.0 mm, hub keyway depth t2 = 3.3 mm, each with +0.2 / 0 mm. Normal fit: shaft keyway N9, hub keyway Js9.

Keyway width limits for b = 8 mm, normal fit. Deviations in µm, limits in mm, computed with the ISO 286 code on this site.
KeywayClassDeviation (µm)Width limits (mm)
Shaft keyway widthN9−36 to 07.964 to 8.000
Hub keyway widthJs9−18 to +187.982 to 8.018
Shaft keyway: measure d − t121.00
Hub keyway: measure d + t228.30
Download CSV

Key size and keyway depths by shaft diameter, 6 to 500 mm

Each row gives the key width b and height h for a shaft diameter range, the shaft keyway depth t1 and the hub keyway depth t2. The ranges are over the first number and up to and including the second, so a 22 mm shaft is in the 6 × 6 row and a 22.01 mm shaft is in the 8 × 7 row. The values are the ones printed in Engineers Edge, fasten.it's DIN 6885-1 page and Roymech's BS 4235-1:1972 table. The three agree on every one of the 26 rows for b, h, t1 and t2.

Parallel key size and keyway depths by shaft diameter, mm. Shaft diameter is over the first value and up to and including the second. The last column is t1 + t2 − h, the nominal gap above the key, calculated here. Sources: Engineers Edge, fasten.it (DIN 6885-1), Roymech (BS 4235-1).
Shaft d (mm)Key b × ht1 (mm)t2 (mm)Gap above key
6 to 82 × 21.21.00.2
8 to 103 × 31.81.40.2
10 to 124 × 42.51.80.3
12 to 175 × 53.02.30.3
17 to 226 × 63.52.80.3
22 to 308 × 74.03.30.3
30 to 3810 × 85.03.30.3
38 to 4412 × 85.03.30.3
44 to 5014 × 95.53.80.3
50 to 5816 × 106.04.30.3
58 to 6518 × 117.04.40.4
65 to 7520 × 127.54.90.4
75 to 8522 × 149.05.40.4
85 to 9525 × 149.05.40.4
95 to 11028 × 1610.06.40.4
110 to 13032 × 1811.07.40.4
130 to 15036 × 2012.08.40.4
150 to 17040 × 2213.09.40.4
170 to 20045 × 2515.010.40.4
200 to 23050 × 2817.011.40.4
230 to 26056 × 3220.012.40.4
260 to 29063 × 3220.012.40.4
290 to 33070 × 3622.014.40.4
330 to 38080 × 4025.015.40.4
380 to 44090 × 4528.017.40.4
440 to 500100 × 5031.019.50.5

The same data, with the depth tolerance and the width deviations for all three fit classes, as a spreadsheet: keyway-and-key-size-chart.csv.

Two more sources print the same rows where they overlap. Hallite lists the BS 4235 Part 1:1972 rows from 10 to 230 mm, and Miki Pulley lists the JIS B 1301-1996 rows from 6 to 130 mm. A scan of the 1969 ISO Recommendation ISO/R 773 prints the same shaft ranges, key sections and depths, although the optical character recognition of that scan is rough enough that I used it to confirm the ranges and the width tolerance classes, not to read every digit.

Check the ranges against your own shaft before you trust a row. A 25 mm shaft sits in the 22 to 30 mm row, so it takes an 8 × 7 mm key. At exactly 30 mm the key stays 8 × 7, and at 31 mm it becomes 10 × 8 with a shaft keyway 5.0 mm deep. A 20 mm shaft takes 6 × 6 mm with t1 = 3.5 mm and t2 = 2.8 mm, a 50 mm shaft takes 14 × 9 mm, and a 60 mm shaft takes 18 × 11 mm. At 100 mm it is 28 × 16 mm.

How to read b, h, t1 and t2, and how to measure the depths

The key width b is the dimension that fits across the keyway. The key height h is its thickness in the direction of the shaft radius. t1 is the depth of the keyway cut into the shaft, and t2 is the depth cut into the hub bore. The two depths do not add up to the key height. In every row t1 + t2 is larger than h, by 0.2 mm in the smallest rows up to 0.5 mm in the largest, so a small gap is left between the top of the key and the bottom of the hub keyway. U-Need's keyway article works this out for a 10 × 8 mm key: 5.0 + 3.3 = 8.3 mm of groove space against an 8 mm key leaves a nominal 0.3 mm, and it adds that this nominal subtraction does not set a minimum or maximum clearance. The last column of the chart applies the same subtraction to every row.

The depths are not measured from the side corner of the slot. The ISO Recommendation says the depth of a keyway in a shaft or hub should be obtained by direct measurement, or by measuring the composite dimensions d − t1 for the shaft and d + t2 for the hub, and that keyway depths should not be measured from the side corner (ISO/R 773, notes under the keyway table). For the 25 mm shaft that gives 25 − 4.0 = 21.0 mm from the bottom of the shaft keyway to the opposite side of the shaft, and a hub bore plus keyway of 25 + 3.3 = 28.3 mm. The finder prints both figures for any size.

Keyway width tolerances for a free, normal or close fit

The keyway width has its own tolerance class, and the class depends on how snug the key should sit. Roymech's BS 4235 page and the ISO/R 773 scan both list three fits. A free fit uses H9 for the shaft keyway and D10 for the hub keyway. A normal fit uses N9 for the shaft and Js9 for the hub. A close fit uses P9 for both. Engineers Edge names only the normal fit (N9 shaft, Js9 hub) and the close fit (P9), and prints the hub class as JS9. The letters and grades are the ones from the ISO fits system, so the deviations can be computed, and the table below was computed with the same ISO 286 code that runs the ISO 286 calculator on this site, not copied from a keyway chart.

Keyway width deviations in µm (lower / upper) by key width b, for the three fit classes. Computed from the ISO 286 limits for each key width as the nominal size. Normal: shaft N9, hub Js9. Close: P9 for both. Free: shaft H9, hub D10. Class assignments from Roymech (BS 4235-1:1972) and ISO/R 773.
b (mm)Shaft N9Hub Js9Close P9Free shaft H9Free hub D10
2−29 / −4−12.5 / +12.5−31 / −60 / +25+20 / +60
3−29 / −4−12.5 / +12.5−31 / −60 / +25+20 / +60
4−30 / 0−15 / +15−42 / −120 / +30+30 / +78
5−30 / 0−15 / +15−42 / −120 / +30+30 / +78
6−30 / 0−15 / +15−42 / −120 / +30+30 / +78
8−36 / 0−18 / +18−51 / −150 / +36+40 / +98
10−36 / 0−18 / +18−51 / −150 / +36+40 / +98
12−43 / 0−21.5 / +21.5−61 / −180 / +43+50 / +120
14−43 / 0−21.5 / +21.5−61 / −180 / +43+50 / +120
16−43 / 0−21.5 / +21.5−61 / −180 / +43+50 / +120
18−43 / 0−21.5 / +21.5−61 / −180 / +43+50 / +120
20−52 / 0−26 / +26−74 / −220 / +52+65 / +149
22−52 / 0−26 / +26−74 / −220 / +52+65 / +149
25−52 / 0−26 / +26−74 / −220 / +52+65 / +149
28−52 / 0−26 / +26−74 / −220 / +52+65 / +149
32−62 / 0−31 / +31−88 / −260 / +62+80 / +180
36−62 / 0−31 / +31−88 / −260 / +62+80 / +180
40−62 / 0−31 / +31−88 / −260 / +62+80 / +180
45−62 / 0−31 / +31−88 / −260 / +62+80 / +180
50−62 / 0−31 / +31−88 / −260 / +62+80 / +180
56−74 / 0−37 / +37−106 / −320 / +74+100 / +220
63−74 / 0−37 / +37−106 / −320 / +74+100 / +220
70−74 / 0−37 / +37−106 / −320 / +74+100 / +220
80−74 / 0−37 / +37−106 / −320 / +74+100 / +220
90−87 / 0−43.5 / +43.5−124 / −370 / +87+120 / +260
100−87 / 0−43.5 / +43.5−124 / −370 / +87+120 / +260

For the 8 mm key on a 25 mm shaft, the normal-fit shaft keyway is −36 / 0 µm, which is 7.964 to 8.000 mm. The hub keyway is −18 / +18 µm, or 7.982 to 8.018 mm. A close fit makes both −51 / −15 µm, 7.949 to 7.985 mm. The free fit gives the shaft keyway 0 / +36 µm and the hub keyway +40 / +98 µm.

The computed widths match the eight key widths that Roymech prints (2, 4, 8, 12, 20, 32, 56 and 90 mm) for all five classes, within the rounding below. The test file for this page compares them. For the 2 and 3 mm keys the normal-fit shaft keyway is −29 / −4 µm at 2 mm, and Roymech prints the same −0.004 to −0.029 mm. From 4 mm up the N9 upper deviation is 0, so at 4 mm it is −30 / 0 µm.

The Js9 half-widths differ slightly between sources. The Js9 tolerance is symmetric, plus and minus half the IT9 value. For the 12 mm key IT9 is 43 µm, so half is 21.5 µm. The ISO/R 773 scan prints ±0.0215 mm (legible at its 14 mm row, which has the same IT9), and the code here gives ±21.5 µm, while Roymech prints ±0.021. For the 90 mm key the scan prints ±0.0435 and Roymech ±0.043, against 43.5 µm from the code. Roymech has rounded the half-width down by 0.5 µm.

Depth tolerances on t1 and t2

The depths carry a plus-only tolerance in BS 4235. Roymech marks +0.1 / 0 mm at the 2 × 2 row, +0.2 / 0 at the 8 × 7 and 12 × 8 rows and +0.3 / 0 at the 36 × 20 row. Hallite's BS 4235 table shows the same bands in its upper limits: 2.5 to 2.6 mm for t1 at 4 × 4, 4.0 to 4.2 at 8 × 7, 11.0 to 11.2 at 32 × 18 and 12.0 to 12.3 at 36 × 20. Read together, the tolerance is +0.1 mm up to a 22 mm shaft, +0.2 mm from 22 to 130 mm and +0.3 mm above 130 mm, which is how the table and the CSV apply it. The ISO/R 773 scan shows the same 0.1, 0.2 and 0.3 steps against its depth columns but not legibly enough to place the break points, so the break points rest on the two BS 4235 sources.

What the three fit classes do to a key of 8 mm

ISO/R 773 gives the key itself a width tolerance of h9, which for an 8 mm key is −36 / 0 µm, or 7.964 to 8.000 mm. Putting an h9 key into each keyway class gives the clearance ranges below. A negative number is interference. The ranges come from the same ISO 286 code and treat the keyway as a hole and the key as a shaft, so they are arithmetic on the nominal limits, not a published fit table.

Clearance of an 8 mm key (h9, −36 / 0 µm) in each keyway class, µm. Negative = interference. Computed with the ISO 286 code; the key tolerance is from ISO/R 773.
Fit classShaft keywayKey in shaft keywayHub keywayKey in hub keyway
FreeH90 to +72 (clearance)D10+40 to +134 (clearance)
NormalN9−36 to +36 (transition)Js9−18 to +54 (transition)
CloseP9−51 to +21 (transition)P9−51 to +21 (transition)

Under the normal fit, the 8 mm key goes from 36 µm tight to 36 µm loose in the shaft keyway, and from 18 µm tight to 54 µm loose in the hub keyway. The shaft keyway has the tighter limits of the two. The close fit puts both keyways at P9, which in this arithmetic runs from 51 µm tight to 21 µm loose, so even the close fit is a transition fit at the limits. The free fit leaves clearance in both keyways, 0 to 72 µm in the shaft keyway and 40 to 134 µm in the hub keyway.

Why the key size is not a fixed fraction of the shaft diameter

Wikipedia's article on keys gives proportions of W = d/4 for the key width and H = 2d/3 for the height, and it tags both with a clarification-needed note. The next table sets those formulas against the standard rows. The width formula runs below the table at every size listed, by 0.50 mm at 10 mm and 3.00 mm at 100 mm. The height formula is much further off.

Wikipedia's rule of thumb (W = d/4, H = 2d/3) against the standard key section, mm. Standard: Engineers Edge and DIN 6885-1 table above.
Shaft dTable b × hd/42d/3
103 × 32.506.67
258 × 76.2516.67
4012 × 810.0026.67
6018 × 1115.0040.00
10028 × 1625.0066.67

At 25 mm, d/4 gives 6.25 mm against the table's 8 mm, and 2d/3 gives 16.67 mm against a table height of 7 mm. The same article says square keys are used for smaller shafts and rectangular keys for shaft diameters over 6.5 in (170 mm). The metric table turns rectangular much earlier, from the 8 × 7 row at a 22 to 30 mm shaft. The article does not say which standard it describes, so treat its formulas as a rough starting point for a shaft outside the table and use the rows above for anything on a drawing.

Inch keyway sizes by shaft diameter (ASME B17.1 sizes)

Inch keys follow the ANSI/ASME B17.1 relation between shaft diameter and key size. The table gives the keyway width, the key and the nominal keyseat depth. I took the ranges and keyway sizes from the Gates technical note on shaft and hub keyway and key sizes, Table 1, and compared the range limits with AmesWeb's list of ANSI B17.1-1967 (R1998) shaft ranges. The two print the same upper bounds, 7/16, 9/16, 7/8, 1 1/4 and on up to 9 in. Gates writes the lowest shaft in each row, such as 1/2 to 9/16, and AmesWeb writes over 7/16 up to 9/16. Each Gates lower limit is one sixteenth of an inch above the previous row's upper limit, so the rows are the same.

Inch key and keyway sizes by shaft diameter, with the shaft range in mm (inches × 25.4). Square keys through 6 1/2 in; the two largest rows use a 1 1/2 in high key. Depth is H/2. Sources: Gates technical note, Table 1, AmesWeb.
Shaft d (in)Shaft d (mm)Key W × H (in)Depth H/2 (in)
5/16 to 7/167.9 to 11.13/32 × 3/323/64
1/2 to 9/1612.7 to 14.31/8 × 1/81/16
5/8 to 7/815.9 to 22.23/16 × 3/163/32
15/16 to 1 1/423.8 to 31.81/4 × 1/41/8
1 5/16 to 1 3/833.3 to 34.95/16 × 5/165/32
1 7/16 to 1 3/436.5 to 44.43/8 × 3/83/16
1 13/16 to 2 1/446.0 to 57.11/2 × 1/21/4
2 5/16 to 2 3/458.7 to 69.85/8 × 5/85/16
2 13/16 to 3 1/471.4 to 82.53/4 × 3/43/8
3 5/16 to 3 3/484.1 to 95.37/8 × 7/87/16
3 13/16 to 4 1/296.8 to 114.31 × 11/2
4 9/16 to 5 1/2115.9 to 139.71 1/4 × 1 1/45/8
5 9/16 to 6 1/2141.3 to 165.11 1/2 × 1 1/23/4
6 9/16 to 7 1/2166.7 to 190.51 3/4 × 1 1/23/4
7 9/16 to 9192.1 to 228.62 × 1 1/23/4

AmesWeb says square keys are preferred through 6 1/2 in diameter shafts and rectangular keys for larger shafts, and that the nominal keyseat depth is H/2. The depth column above follows the second: half of the key height in every row. AmesWeb adds that the shaft diameters only identify the key size and do not set shaft dimensions, tolerances or selections, and that the key size is set by the shaft diameter at the key location, whatever the other diameters on the shaft.

The two largest rows come with a caveat. In the Gates table the keys for 6 9/16 to 7 1/2 in and 7 9/16 to 9 in shafts are 1 3/4 and 2 in wide, with a keyway depth of 3/4 in, and the key columns show a height of 1 1/2 in. Engineers Edge notes under its table that some key standards show 1 1/4 in and that the preferred height is 1 1/2 in. The Machinery's Handbook table of depth control values (Table 2, ANSI/ASME B17.1-1967 R2013) carries a footnote for a 1 3/4 × 1 1/2 in key. The 1 1/2 in height is therefore the common value, though not the only one printed.

The inch fits are separate. Machinery's Handbook Table 4 lists the ASME standard fits for parallel and taper keys, split into a Class 1 fit for parallel keys and a Class 2 fit for parallel and taper keys, with side fit and top-and-bottom fit columns. I could not read the numbers from the page and I have not reproduced them. The finder therefore gives inch key sizes and a metric equivalent, and calculates fit limits only for the metric keyways.

Enter an inch size in the finder and it returns the inch key from this table, followed by the metric row for the same shaft. A 1.25 in shaft, for example, takes a 1/4 in square key and falls in the 30 to 38 mm metric row at 31.75 mm. Do not mix the two systems on one drawing. U-Need's article makes the same point in its own words: "Do not combine dimensions or tolerances from different systems."

Woodruff key size chart: reading the key number

A Woodruff key is a different part from the parallel key above. Wikipedia describes it as semicircular, sitting partly in a circular segment keyway, with the advantage that no milling is needed near a shaft shoulder. Its size comes from a number, and the number can be decoded without a table. AmesWeb gives the rule: the last two digits are the nominal diameter B in eighths of an inch, and the digits before them are the nominal width W in thirty-seconds of an inch. Its example is key 1212, which is 12/32 × 12/8 in, or 3/8 × 1 1/2 in.

Woodruff key numbers decoded by the ANSI B17.2 rule: W = leading digits / 32 in, B = last two digits / 8 in. Sizes in inches and mm (× 25.4), nominal only.
Key no.Width WDiameter BW × B (mm)
2042 / 32 in = 1/16 in4 / 8 in = 1/2 in1.6 × 12.7
4044 / 32 in = 1/8 in4 / 8 in = 1/2 in3.2 × 12.7
6066 / 32 in = 3/16 in6 / 8 in = 3/4 in4.8 × 19.0
8088 / 32 in = 1/4 in8 / 8 in = 1 in6.3 × 25.4
121012 / 32 in = 3/8 in10 / 8 in = 1 1/4 in9.5 × 31.8
121212 / 32 in = 3/8 in12 / 8 in = 1 1/2 in9.5 × 38.1
6176 / 32 in = 3/16 in17 / 8 in = 2 1/8 in4.8 × 54.0
8228 / 32 in = 1/4 in22 / 8 in = 2 3/4 in6.3 × 69.8

I checked the rule against the nominal sizes in the Machinery's Handbook 31st edition, Table 10 for ANSI/ASME B17.2-1967 (R2013). Its listing pairs key 812 with 1/4 × 1 1/2 in, 1012 with 5/16 × 1 1/2, 1212 with 3/8 × 1 1/2, 617 with 3/16 × 2 1/8, 822 with 1/4 × 2 3/4, 1228 with 3/8 × 3 1/2 and 2428 with 3/4 × 3 1/2. The rule reproduces each one, and the tests for this page do the same.

The numbers a machinist needs next are the key height, the keyseat depth in the shaft and the hub keyseat depth. The Handbook table has those columns, labelled A and B for the key and F, C, D and E for the shaft keyseat, but its text cannot be read reliably into aligned rows, and AmesWeb's table shows only placeholders until its calculator runs. I would rather leave them out than print a misaligned figure. There is also no metric Woodruff chart here, because I found no readable DIN 6888 table to check one against. Use the key number to get the nominal size, then take the keyseat dimensions from the standard or the cutter maker's data.

Where the sources agree and where they do not

Six sources give the metric rows. They agree on the numbers, and the differences are in how the ranges are written, what the depth column means and which standard the table is named after. The Js9 half-width rounding and Wikipedia's proportions are covered above.

Which standard these keyway dimensions come from

The values on this page are the DIN 6885-1 sizes that Engineers Edge and fasten.it print, which equal the BS 4235-1:1972 table in Roymech and Hallite and the JIS B 1301-1996 table at the sizes Miki Pulley lists. They also equal the ranges and depths in the 1969 ISO Recommendation R 773, titled Rectangular or square parallel keys and their corresponding keyways, which describes itself as drawn up by ISO technical committee TC 16 for general-purpose cylindrical shaft ends.

Status needs a caution. fasten.it's DIN 6885-1 page carries a note that the page lists the standard as withdrawn, with a 1968 date superseding a 1956 one. A search I ran turned up a DIN catalogue listing for a later edition, but I could not open it, so I cannot tell you which DIN edition is current. For a drawing or a contract, check the edition your customer or your plant names. The tables above are a cross-checked reference to the dimensions in these sources, not a copy of any standard.

Short answers to common searches

What key size goes on a 1 inch shaft? A 1 in shaft is in the 15/16 to 1 1/4 in row, so it takes a 1/4 × 1/4 in key with a 1/8 in keyseat depth (Gates, Table 1). In metric terms 25.4 mm is in the 22 to 30 mm row, an 8 × 7 mm key.

Is there a keyway size chart in mm as a PDF? Use the Print button, which prints the tables, or download the CSV. Each row of the CSV carries the key size, both depths and all five width classes.

What keyway tolerance should I use? For the keyway width the three metric classes are free (H9 and D10), normal (N9 and Js9) and close (P9). The table above gives the limits for every key width, and the finder returns them for your shaft.

What is the keyway for a 50 mm shaft? The 44 to 50 mm row: a 14 × 9 mm key, t1 = 5.5 mm, t2 = 3.8 mm. A 51 mm shaft moves to the 16 × 10 row.

Do the DIN 6885 key dimensions match ISO and BS? In the sources read here, yes for b, h, t1 and t2, as shown above. The tolerance classes for keyway width are named the same way in Roymech's BS 4235 page and in the ISO/R 773 scan.

The same data as JSON, with units and source: keyway-and-key-size-chart.json.