📐 Free Gage Block Calculator — no login. Open it →

← AskMachinist · Guides · Calculator · 🔎 Search

Shaft Key Size Chart

Guide · Updated October 28, 2026

The key size for a shaft is set by the shaft diameter at the key. ANSI B17.1 gives a table of shaft diameter ranges and the matching key width and height, and the keyseat depth is half the key height for the nominal case. Square keys are preferred up to 6-1/2 in shafts and rectangular keys above that. The values below are from ANSI B17.1-1967 (R1998) Table 1.

Need an exact reference size?

Build any gage block stack with the free Gage Block Calculator. Free, no login.

Step by step

  1. Measure the shaft: Mic the shaft where the key goes.
  2. Find the key size: Look up the diameter range in the chart; the range is over the first size and up to and including the second.
  3. Choose square or rectangular: Square for most shafts; rectangular (thinner) when the hub wall or shaft section is thin.
  4. Work out the chordal height: Y = (D − √(D² − W²)) ÷ 2, the height of the curved part of the shaft over the key width.
  5. Calculate the shaft keyseat depth: S = D − Y − H/2 is the dimension from the bottom of the shaft to the bottom of the keyseat.
  6. Calculate the hub keyway: T = D − Y + H/2 plus the clearance allowance from the standard, measured across the bore to the bottom of the hub keyway.

Key size versus shaft diameter (ANSI B17.1)

Depths listed are H/2 for the square key. For a rectangular key, use half the rectangular height.

Why the chordal height matters

A keyseat depth of H/2 is measured from the edge of the keyseat, where it meets the round shaft, not from the top of the shaft. Because the shaft curves away across the key width, the top of the shaft is higher than the keyseat edge by the chordal height Y. If you touch off on the top of the shaft and feed down H/2, the keyseat comes out shallow by Y. On small keys Y is only a few thousandths, but on a 1/2 in key in a 2 in shaft it is about 0.032 in.

Worked example: 1-1/8 in shaft

D = 1.125 in falls in the over 7/8 to 1-1/4 range, so the key is 1/4 × 1/4 and the nominal depth is 1/8. Y = (1.125 − √(1.125² − 0.25²)) ÷ 2 = (1.125 − √1.203125) ÷ 2 = (1.125 − 1.0969) ÷ 2 = 0.0141 in.

Depth from the top of the shaft = H/2 + Y = 0.125 + 0.0141 = 0.139 in. S = D − Y − H/2 = 1.125 − 0.0141 − 0.125 = 0.986 in, which you can check by measuring over the shaft from the keyseat bottom with a micrometer. The hub keyway T = D − Y + H/2 = 1.236 in before the standard clearance.

Worked example: 2 in shaft

D = 2.000 in is in the over 1-3/4 to 2-1/4 range, so the key is 1/2 × 1/2 with a 1/4 nominal depth. Y = (2 − √(4 − 0.25)) ÷ 2 = (2 − 1.9365) ÷ 2 = 0.0318 in. S = 2.000 − 0.0318 − 0.250 = 1.718 in. Feed from the top of the shaft = 0.250 + 0.0318 = 0.282 in.

Key fit and length

Keys and keyseats have their own width tolerances in B17.1 for class 1 (clearance) and class 2 (side fit) keys. Key stock is usually made slightly oversize in width so it can be filed or ground to fit. For length, a common guideline is about 1 to 1.5 times the shaft diameter; check bearing and shear stress for heavy torque.

Common problems

Touching off on the top of the shaft and forgetting the chordal height, using an end mill that has worn under size so the keyseat is loose, cutting the keyseat off center, and using the wrong range at a boundary, for example a 7/8 in shaft uses a 3/16 key, not 1/4, because the 1/4 range starts over 7/8. Check width with gage blocks or pin gages and check the center with an indicator.

FAQ

What size key for a 1 inch shaft?

1/4 × 1/4 square key with a 1/8 in nominal keyseat depth per ANSI B17.1.

What size key for a 3/4 inch shaft?

3/16 × 3/16 square key, 3/32 nominal depth.

How deep is a keyseat?

Half the key height, measured from the edge of the keyseat; add the chordal height Y when you measure from the top of the shaft.

How do I check keyway width?

Check the gage itself before trusting a measurement: gage blocks set mics, calipers and indicators; build any stack free at gageblockcalc.com.

Related guides and calculators

Build your stack in seconds

The free Gage Block Calculator finds the fewest-block combination for inch and metric sets, with wear blocks. No login.

Questions? Ask a machinist.

General shop information only — follow your drawing, tool maker's data and your quality system.