Home / Articles / Keyway depth: measure over the shaft (D−t1) and draw it
Draw + calculate · 2D

Keyway depth: measure over the shaft (D−t1) and draw it

7 min read · updated 21 Nov 2026

A keyway on a shaft or hub is specified by depth t1 (shaft) and t2 (hub). But you cannot set a caliper straight down into the slot to check t1 — so machinists use the over-shaft (J) measurement: from the flat bottom of the keyway across to the far side of the shaft, which equals D − t1. On the hub it is measured across the bore and equals D + t2. This guide gives the formulas, a DIN 6885 depth table, a worked Ø40 example, and the steps to draw the section in DXCAD2D.

Why measure over the shaft, not the depth directly

Depth t1 is measured from the top surface of the shaft down to the keyway bottom, but that top surface is a curve — a caliper jaw has nothing flat to sit on. So the part is flipped and measured from the flat keyway bottom down to the opposite side of the shaft, a single lowest point. That value is easy to repeat, and it is called the J or over-shaft dimension.

Core formula (parallel key):
Shaft: over-shaft J = D − t1
Hub: over-bore = D + t2
where D = shaft diameter (≈ the hub bore size) and t1, t2 are the keyway depths from the table.
J = D − t1 t1 b flat bottom, width b measure bottom → lowest point
Shaft: measure J from the flat keyway bottom down to the opposite side of the shaft = D − t1 (not the depth t1 directly).

Worked example: a Ø40 shaft

For a Ø40 mm shaft, look up DIN 6885 in the diameter band "over 38 to 44": key b×h = 12×8, depth t1 = 5.0 mm (shaft) and t2 = 3.3 mm (hub).

Shaft: J = D − t1 = 40 − 5.0 = 35.0 mm → set the caliper or micrometer to 35.0 mm and measure from the keyway bottom to the underside of the shaft.

Hub: D + t2 = 40 + 3.3 = 43.3 mm → measure from the hub keyway bottom across the bore to the far wall (often with a key or gauge pin fitted to help).

Watch out: the table t1 is "depth from the shaft surface", not the number to set on the caliper. Always convert it to D − t1 first. Setting the machine to t1 by mistake cuts the slot far too deep.

DIN 6885 parallel keys and keyway depths

Shaft D (over–to)Key b×ht1 (shaft)t2 (hub)
6–82×21.21.0
8–103×31.81.4
10–124×42.51.8
12–175×53.02.3
17–226×63.52.8
22–308×74.03.3
30–3810×85.03.3
38–4412×85.03.3
44–5014×95.53.8
50–5816×106.04.3
58–6518×117.04.4

More over-shaft values: Ø25 (key 8×7) → J = 25 − 4.0 = 21.0 mm, hub = 25 + 3.3 = 28.3 mm · Ø50 (key 14×9) → J = 50 − 5.5 = 44.5 mm, hub = 50 + 3.8 = 53.8 mm.

Draw the keyway section in DXCAD2D

Using the Ø40 example, key 12×8 (shaft radius 20, flat bottom width b = 12 so x = ±6, bottom at y = 20 − 5 = 15):

  1. Press C and draw the shaft circle, centre 0,0, radius 20 (Ø40).
  2. Press L and draw the flat bottom from -6,15 to 6,15.
  3. Press L and draw the two side walls from -6,15 up to the circle and 6,15 up to the circle (the walls meet the circle at y ≈ 19.08).
  4. Press trim and trim away the arc of the circle between the two walls, leaving the slot open.
  5. Press D and dimension: slot width 12, over-shaft J = 35 (from bottom y=15 to y=−20), and use M to re-check.
Tip: DXCAD2D has no automatic depth readout, so type the keyway-bottom coordinate you calculated (y = R − t1) and dimension D − t1 yourself, so the drawing matches what the machinist actually measures.

Try it right now — a free 2D CAD in your browser. Nothing to install, no sign-up.

Open DXCAD2D Online

Frequently asked questions

What is the keyway depth for a 40 mm shaft

Per DIN 6885, a Ø40 shaft uses a 12×8 key: shaft depth t1 = 5.0 mm and hub depth t2 = 3.3 mm. On the bench you measure over the shaft, D − t1 = 40 − 5.0 = 35.0 mm.

How do I measure keyway depth with a caliper

Measure from the flat keyway bottom down to the opposite side of the shaft (over-shaft). That reading equals D − t1, because you cannot sit a jaw on the curved top to read t1 directly.

What is the J dimension of a keyway

It is the over-shaft measurement from the keyway bottom to the far side of the shaft, equal to D − t1. It is used to set gauges because it is easy to measure and repeat.

How is hub keyway depth checked

Measure from the hub keyway bottom across the bore to the far wall = D + t2, e.g. a Ø40 bore gives 40 + 3.3 = 43.3 mm, usually with a key or gauge pin fitted.

Summary

The table depths t1 and t2 are measured from the surface, but on the shop floor you always convert them to an over-measurement first: shaft J = D − t1, hub = D + t2. Look up the key size from DIN 6885 by shaft diameter, then draw the keyway bottom at y = R − t1 in DXCAD2D so your drawing agrees with the number the machinist reads off the part.