Keyway Tolerance Chart — ANSI B17.1 & DIN 6885 Fit Classes

Getting keyway dimensions right is step one. Getting the tolerances right is what determines whether the assembly actually works under load.

This page is a complete tolerance reference for parallel key and keyway fits per ANSI B17.1 (inch) and DIN 6885 (metric). If you’re looking for the base keyway dimensions themselves — key width, height, and depth by shaft diameter — see our Keyway Dimensions & Size Chart.

Bookmark this page. You’ll need it every time a print doesn’t call out the fit class explicitly.


Why Keyway Tolerances Matter

The tolerance on the keyway width is the single most critical dimension in a keyed assembly. Here’s what happens when it’s wrong:

Keyway too wide (oversize on width): The key rocks under cyclic load. This creates fretting wear on the bearing faces, which wallows out the slot over time. Eventually the key shears or the hub spins on the shaft. This is the most common keyway failure mode.

Keyway too narrow (undersize on width): The key won’t seat, or requires excessive force to install. In an interference fit this is by design — but if you’re aiming for Class 1 clearance and the slot is tight, you’ve got a problem. Forced assembly can crack the hub on brittle materials.

Keyway too deep: Excessive clearance at the top of the key. The key can lift under reversing loads, causing hammering and accelerated wear.

Keyway too shallow: The key bottoms out before the hub fully seats on the shaft. The hub appears to be on but isn’t transmitting torque through the key’s bearing faces — it’s riding on the top of the key instead.

The tables below define exactly how much variation is acceptable for each fit class.


ANSI B17.1 Fit Classes — Overview

ANSI B17.1-1967 (R2019) defines two standard fit classes for parallel keys, plus a third that is specified but not fully tabulated:

Class 1 — Free Fit (Clearance) Uses bar stock keys (broad, negative tolerances). Always produces clearance between the key and keyseat. Used where easy assembly/disassembly is needed and some backlash is acceptable — adjustable couplings, frequently serviced equipment, light-duty drives.

Class 2 — Normal Fit (Transition) Uses key stock (close, positive tolerances). Produces a transition fit — slight interference or slight clearance on the side fit, depending on actual dimensions within the tolerance band. This is the standard fit for most industrial power transmission: gears, couplings, pulleys, sprockets. If the print doesn’t specify a fit class, assume Class 2.

Class 3 — Interference Fit Not fully tabulated in the standard. Used for high-precision or reversing-load applications where any backlash is unacceptable. The key is pressed into the shaft keyseat. Use the Class 2 depth tolerances and specify tighter width tolerances by agreement between manufacturer and customer.


ANSI B17.1 — Class 1 Side Fit Tolerances (Clearance Fit)

All dimensions in inches. “CL” = Clearance.

Square Keys — Class 1

Key Width (in) Key Width Tolerance Keyseat Width Tolerance Max Clearance Min Clearance
Up to 1/2 +0.000 / −0.002 +0.002 / −0.000 0.004 CL 0.000 (metal-to-metal)
Over 1/2 to 3/4 +0.000 / −0.002 +0.003 / −0.000 0.005 CL 0.000
Over 3/4 to 1 +0.000 / −0.003 +0.003 / −0.000 0.006 CL 0.000
Over 1 to 1-1/2 +0.000 / −0.003 +0.004 / −0.000 0.007 CL 0.000
Over 1-1/2 to 2-1/2 +0.000 / −0.004 +0.004 / −0.000 0.008 CL 0.000
Over 2-1/2 to 3-1/2 +0.000 / −0.006 +0.004 / −0.000 0.010 CL 0.000

Rectangular Keys — Class 1

Key Width (in) Key Width Tolerance Keyseat Width Tolerance Max Clearance Min Clearance
Up to 1/2 +0.000 / −0.003 +0.002 / −0.000 0.005 CL 0.000
Over 1/2 to 3/4 +0.000 / −0.003 +0.003 / −0.000 0.006 CL 0.000
Over 3/4 to 1 +0.000 / −0.004 +0.003 / −0.000 0.007 CL 0.000
Over 1 to 1-1/2 +0.000 / −0.004 +0.004 / −0.000 0.008 CL 0.000
Over 1-1/2 to 3 +0.000 / −0.005 +0.004 / −0.000 0.009 CL 0.000
Over 3 to 4 +0.000 / −0.006 +0.004 / −0.000 0.010 CL 0.000
Over 4 to 6 +0.000 / −0.008 +0.004 / −0.000 0.012 CL 0.000
Over 6 to 7 +0.000 / −0.013 +0.004 / −0.000 0.017 CL 0.000

Note: Class 1 uses bar stock, which has negative (undersize) width tolerances. The keyseat has positive (oversize) tolerances. The combination always produces clearance or metal-to-metal contact — never interference.


ANSI B17.1 — Class 2 Side Fit Tolerances (Normal/Transition Fit)

All dimensions in inches. “CL” = Clearance, “INT” = Interference.

Square Keys — Class 2

Key Width (in) Key Width Tolerance Keyseat Width Tolerance Max Clearance Max Interference
Up to 1-1/4 +0.001 / −0.000 +0.002 / −0.000 0.002 CL 0.001 INT
Over 1-1/4 to 3 +0.002 / −0.000 +0.002 / −0.000 0.002 CL 0.002 INT
Over 3 to 3-1/2 +0.003 / −0.000 +0.002 / −0.000 0.002 CL 0.003 INT

Rectangular Keys — Class 2

Key Width (in) Key Width Tolerance Keyseat Width Tolerance Max Clearance Max Interference
Up to 1-1/4 +0.001 / −0.000 +0.002 / −0.000 0.002 CL 0.001 INT
Over 1-1/4 to 3 +0.002 / −0.000 +0.002 / −0.000 0.002 CL 0.002 INT
Over 3 to 7 +0.003 / −0.000 +0.002 / −0.000 0.002 CL 0.003 INT

Note: Class 2 uses key stock, which has positive (oversize) width tolerances. Because both the key and keyseat have positive tolerances, the fit can be either clearance or interference depending on where each lands within its band. This is why it’s called a transition fit. In practice, the key is typically a light press into the shaft keyseat and a sliding-to-snug fit in the hub keyway.


ANSI B17.1 — Depth Tolerances (Both Classes)

Depth tolerances are the same for Class 1 and Class 2 parallel keys. All dimensions in inches.

Square Keys — Depth Tolerances

Key Width (in) Key Height Tolerance Shaft Keyseat Depth Tolerance Hub Keyway Depth Tolerance Max Depth Clearance Min Depth Clearance
Up to 1/2 +0.000 / −0.002 +0.000 / −0.015 +0.010 / −0.000 0.032 CL 0.005 CL
Over 1/2 to 3/4 +0.000 / −0.002 +0.000 / −0.015 +0.010 / −0.000 0.032 CL 0.005 CL
Over 3/4 to 1 +0.000 / −0.003 +0.000 / −0.015 +0.010 / −0.000 0.033 CL 0.005 CL
Over 1 to 1-1/2 +0.000 / −0.003 +0.000 / −0.015 +0.010 / −0.000 0.033 CL 0.005 CL
Over 1-1/2 to 2-1/2 +0.000 / −0.004 +0.000 / −0.015 +0.010 / −0.000 0.034 CL 0.005 CL
Over 2-1/2 to 3-1/2 +0.000 / −0.006 +0.000 / −0.015 +0.010 / −0.000 0.036 CL 0.005 CL

Rectangular Keys — Depth Tolerances

Key Width (in) Key Height Tolerance Shaft Keyseat Depth Tolerance Hub Keyway Depth Tolerance
Up to 1-1/4 +0.005 / −0.005 +0.000 / −0.015 +0.010 / −0.000
Over 1-1/4 to 3 +0.005 / −0.005 +0.000 / −0.015 +0.010 / −0.000
Over 3 to 7 +0.005 / −0.005 +0.000 / −0.015 +0.010 / −0.000

Key takeaway: The depth tolerances are generous compared to the width tolerances. The standard allows up to 0.015″ undersize on shaft keyseat depth and 0.010″ oversize on hub keyway depth. This is intentional — depth is less critical than width for torque transmission. The key’s bearing faces (the sides) do the work.


DIN 6885 — Metric Keyway Tolerances

DIN 6885 uses ISO tolerance grades to specify keyway width fits. The fit class is determined by which tolerance designation is applied to the hub keyway and shaft keyseat widths.

Metric Fit Classes

Fit Type Hub Keyway Width Shaft Keyseat Width Application
Tight fit (fixed) P9 P9 Permanent installation, high-torque, reversing loads. Key is pressed in. No axial movement.
Normal fit (loose) Js9 N9 Standard power transmission. Key slides in with light tapping. Most common fit.
Sliding fit D10 H9 Key must slide axially. Adjustable mechanisms, feather key applications.

Hub Keyway Width Tolerances (DIN 6885)

All tolerances in mm, applied to the nominal key width b.

Key Width b (mm) P9 (Tight Fit) Js9 (Normal Fit) D10 (Sliding Fit)
2 – 3 −0.006 / −0.031 +0.013 / −0.013 +0.060 / +0.020
Over 3 – 6 −0.012 / −0.042 +0.015 / −0.015 +0.078 / +0.030
Over 6 – 10 −0.015 / −0.051 +0.018 / −0.018 +0.098 / +0.040
Over 10 – 18 −0.018 / −0.061 +0.022 / −0.022 +0.120 / +0.050
Over 18 – 30 −0.022 / −0.074 +0.026 / −0.026 +0.149 / +0.065
Over 30 – 50 −0.026 / −0.088 +0.031 / −0.031 +0.180 / +0.080

Shaft Keyseat Width Tolerances (DIN 6885)

Key Width b (mm) P9 (Tight Fit) N9 (Normal Fit) H9 (Sliding Fit)
2 – 3 −0.006 / −0.031 −0.004 / −0.029 +0.025 / 0.000
Over 3 – 6 −0.012 / −0.042 −0.004 / −0.034 +0.030 / 0.000
Over 6 – 10 −0.015 / −0.051 −0.005 / −0.041 +0.036 / 0.000
Over 10 – 18 −0.018 / −0.061 −0.006 / −0.049 +0.043 / 0.000
Over 18 – 30 −0.022 / −0.074 −0.007 / −0.059 +0.052 / 0.000
Over 30 – 50 −0.026 / −0.088 −0.008 / −0.070 +0.062 / 0.000

Key Width Tolerances (DIN 6885)

The key itself is always manufactured to h9 tolerance (minus tolerance from nominal).

Key Width b (mm) h9 Tolerance
2 – 3 0 / −0.025
Over 3 – 6 0 / −0.030
Over 6 – 10 0 / −0.036
Over 10 – 18 0 / −0.043
Over 18 – 30 0 / −0.052
Over 30 – 50 0 / −0.062

Metric Depth Tolerances (DIN 6885)

Hub keyway depth (t₂) and shaft keyseat depth (t₁) tolerances per DIN 6885:

Key Width b (mm) Hub Keyway Depth t₂ Tolerance Shaft Keyseat Depth t₁ Tolerance
2 – 6 Nominal +0.1 / 0 Nominal +0.1 / 0
Over 6 – 10 Nominal +0.2 / 0 Nominal +0.2 / 0
Over 10 – 18 Nominal +0.2 / 0 Nominal +0.2 / 0
Over 18 – 50 Nominal +0.2 / 0 Nominal +0.2 / 0

How to Read These Tables

If you’re staring at a print that says “Class 2 fit, 1/4″ key,” here’s what that means in practice:

  1. Key width: The key stock will be 0.250″ to 0.251″ wide (nominal +0.001 / −0.000)
  2. Keyseat width (shaft and hub): Cut to 0.250″ to 0.252″ (nominal +0.002 / −0.000)
  3. Side fit range: Anywhere from 0.002″ clearance (key at minimum, keyseat at maximum) to 0.001″ interference (key at maximum, keyseat at minimum)
  4. What this means on the shop floor: The key should slide into the hub keyway with light tapping. It may need to be lightly pressed into the shaft keyseat. It should not be loose enough to rattle.

For a DIN 6885 normal fit with b = 8mm key: 1. Key width: 8.000 to 7.964mm (h9) 2. Hub keyway width: 8.018 to 7.982mm (Js9) 3. Shaft keyseat width: 7.995 to 7.959mm (N9) 4. What this means: The key slides into the hub with light clearance. The shaft keyseat is slightly undersize relative to the key, producing a snug or light interference fit.


When Tolerances Aren’t Called Out on the Print

This happens more often than it should. Here’s what to default to:

For ANSI/inch applications: Assume Class 2 fit unless the application clearly calls for easy removal (then Class 1) or zero backlash (then Class 3 or tighter by agreement).

For DIN/metric applications: Assume Js9 hub / N9 shaft (normal fit) unless the application requires a fixed connection (P9/P9) or axial sliding (D10/H9).

When in doubt: Call out the tolerance on the purchase order or work order. “Per ANSI B17.1 Class 2” or “DIN 6885 Js9/N9” removes all ambiguity. Five words on the PO can save a scrapped part.


Common Keyway Tolerance Problems and Solutions

Problem: Key is loose in the hub keyway, rocking under load. Cause: Hub keyway width oversize beyond the tolerance band. At 0.003″+ clearance on a Class 2 fit, you’ll get noticeable play. Fix: Machine a new keyway at the correct tolerance, or use an oversize key (non-standard, requires engineering approval).

Problem: Key won’t seat — can’t assemble the hub onto the shaft. Cause: Shaft keyseat or hub keyway undersize, or key oversize. Measure all three independently. Fix: Open the keyseat width with a second pass. For internal hub keyways, a keyseat miller can re-cut to the correct width without removing significant additional material.

Problem: Hub doesn’t fully seat on shaft — gap between hub face and shoulder. Cause: Keyway depth too shallow (key is bottoming out), or burr at the keyway corner preventing full seating. Fix: Check depth with a depth micrometer. Deburr keyway corners. If depth is undersize, re-machine to the correct tolerance.

Problem: Key shears repeatedly in service. Cause: Often a tolerance issue disguised as a strength issue. If the key is rocking in an oversize keyway, it’s taking impact loads instead of steady shear. Check keyway width before upsizing the key material.


Keyway Tolerance FAQ

What is the standard keyway tolerance for a Class 2 fit? For most common key sizes (up to 1-1/4″ width), the keyseat width tolerance is +0.002″ / −0.000″ from nominal key width, and the key stock tolerance is +0.001″ / −0.000″. This produces a transition fit with up to 0.002″ clearance or 0.001″ interference.

What is Js9 tolerance for a keyway? Js9 is a symmetric bilateral tolerance used for hub keyway width in DIN 6885 metric applications. It produces a normal (loose) fit. For an 8mm key, Js9 means the hub keyway is machined to 8.000mm ±0.018mm — so anywhere from 7.982mm to 8.018mm is acceptable.

What is P9 tolerance for a keyway? P9 is an interference tolerance used for tight (fixed) keyway connections per DIN 6885. Both the hub keyway and shaft keyseat are machined undersize relative to the nominal key width, producing a press fit. For an 8mm key, P9 means the slot is machined to approximately 7.985mm to 7.949mm.

What’s the difference between Class 1 and Class 2 ANSI keyway fits? Class 1 uses bar stock keys and always produces clearance. Class 2 uses precision key stock and produces a transition fit (possible slight interference or slight clearance). Class 2 is the default for industrial power transmission. Use Class 1 only when the key needs to slide in and out easily.

Is the keyway depth tolerance tighter than the width tolerance? No — it’s actually much looser. ANSI B17.1 allows up to 0.015″ undersize on shaft keyseat depth and 0.010″ oversize on hub keyway depth. Width is the critical dimension because it controls torque transmission. Depth just needs to be close enough that the key sits at the right height.

Can an oversize keyway be fixed without scrapping the part? Sometimes. An oversize key (next standard size up) can be used if the shaft diameter supports it and engineering approves. Alternatively, welding and re-machining the keyway is possible on some materials but changes the metallurgy and is generally a last resort.


Need Keyways Cut to These Tolerances?

NMT keyseat millers hold keyway width within ±0.0002″ — well within Class 2 or even Class 3 requirements. We manufacture custom tooling to your exact bore diameter and keyway specifications, inch or metric, including blind bores with no relief hole required.

If your application demands tight keyway tolerances in difficult materials or blind bore geometry, compare keyseat milling to broaching and EDM to see which method fits your requirements.

Tell us the bore diameter, keyway width, depth, and required fit class from your print and we’ll quote custom tooling.

Call: 513-541-6682 Email: nationalmachinetoolco@gmail.com

National Machine Tool Co. — Cincinnati, OH — Over 100 years manufacturing custom keyseat millers to any standard or custom keyway tolerance.

Request a Quote →