Free gear, belt and chain calculators

Keyway Calculator

Enter the shaft diameter and the key width and height to get the keyseat and keyway depths and the dimensions to measure them by.

Open on TranSourceHub

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

The keyway calculator works out the keyseat depth in a shaft and the keyway depth in a hub for a parallel key. Enter the shaft diameter, key width and key height, in inches or millimetres, and it shows the dimensions to cut and the distances to check with a micrometer. It also works as a keyway depth calculator when you need the depth from the top of the shaft at the centre line of the keyseat.

The calculator runs in your browser, is free, and needs no sign-up. You enter the key size yourself, because the tool does not contain a key-size-by-shaft-diameter table. Results are for estimation, so check critical designs against the standard that applies to your work.

Keyway calculator example

How to use the Keyway Calculator

  1. Enter the shaft diameter (D) and choose its unit from the unit menu beside it.
  2. Enter the key width (W) and key height (H). Each has its own unit menu, so you can mix inches and millimetres.
  3. Read the result. It updates as you type and shows the keyseat depth in the shaft, dimension S, dimension T and the hub keyway depth.
  4. Open More options if you need a different side-wall depth in the shaft or a clearance (c) for the hub keyway. The default puts half the key height in the shaft.
  5. Check for warnings and fix any input errors. The key width must be smaller than the shaft diameter, and the shaft depth must be smaller than the key height.
  6. Open How it was calculated under the result to see the formula, the values substituted and the answer with units.

Preset buttons above the form load four typical cases, and Reset restores the starting example. Copy result copies the result lines with a link. Copy link copies the page address, which stores every input in the ?s= part of the URL. Print / save as PDF prints a one-page record of the inputs, results, calculation steps and the date.

What is chordal height and how is it found?

Chordal height (Y) is the distance from the top of the shaft down to the chord where the keyseat walls meet the circle. It is found with Y = (D - √(D² - W²)) / 2, where D is the shaft diameter and W is the key width. For a 1 in shaft and a 0.25 in key, Y = (1 - √(1 - 0.0625)) / 2 = 0.01588 in.

How is the keyseat depth in the shaft worked out?

The keyseat depth is measured from the top of the shaft, at the centre line of the keyseat. By default, half the key height sits in the shaft, so the side-wall depth is H/2, and the keyseat depth is Y + H/2. With H = 0.25 in, the keyseat depth is 0.01588 + 0.125 = 0.1409 in.

The advanced input lets you enter a different side-wall depth in the shaft. The hub then takes the rest of the key height.

What do dimensions S and T measure?

Dimension S = D - Y - side-wall depth is the distance from the bottom of the keyseat to the opposite side of the shaft. It is the figure you check with a micrometer. For the same example, S = 1 - 0.01588 - 0.125 = 0.8591 in.

Dimension T = D - Y + hub depth + c is the distance from the keyway bottom to the opposite side of the bore. The value c is an optional clearance, which defaults to 0. The tool also shows the hub keyway depth at the side wall and beyond the bore at the centre line, which is hub depth + c - Y.

Why must the key width be smaller than the shaft diameter?

The chord formula needs a real square root, so W must be smaller than D. If W equals or exceeds D, the keyseat walls cannot meet the circle, and the calculator shows an error. The tool also warns when the key is wider than half the shaft, or when the keyseat reaches the shaft centre.

Worked examples

InputResult
D 1 in, key 0.25 × 0.25 inkeyseat depth 0.1409 in, S 0.8591 in, T 1.109 in
D 25 mm, key 8 × 7 mmkeyseat depth 4.157 mm, S 20.84 mm, T 27.84 mm
D 1.5 in, key 0.375 × 0.25 inkeyseat depth 0.1488 in, S 1.351 in, T 1.601 in
D 40 mm, key 10 × 8 mmkeyseat depth 5.635 mm, S 34.36 mm, T 42.46 mm

Calculated by the tool above with these values.

Frequently asked questions

Can I use the results in commercial projects or client reports?

Yes. The results may be used in commercial work, including quotes, design notes, reports and client projects, without attribution. The page states that results are for estimation, and the tool does not certify compliance with any code, so verify critical designs against the applicable standard.

Is the calculator free, and is anything I type uploaded?

The calculator is free. Everything is calculated in your browser, and nothing you type is uploaded. There is no account or sign-up.

Can I print or share a calculation?

Yes. Print / save as PDF produces a one-page record with the inputs, results, calculation steps and date. Copy link gives you a page address that stores every input, so the same calculation reopens later or can be sent to a colleague.

Does the calculator choose the key size for my shaft?

No. You enter the key width and height yourself. The calculator does not contain a table of key sizes by shaft diameter, so check the key size against your own drawing or standard before you enter it.

Can I use metric keys?

Yes. Enter the shaft and key in millimetres, for example the 8 × 7 mm key on a 25 mm shaft preset; every result is shown in the unit you choose.

Sources

ANSI B17.1 keyseat depth method (Machinery’s Handbook); results checked against the published ANSI B17.1 depth table (S and T) for a 1 in shaft. For estimation; verify critical designs against the applicable standard.