← AskMachinist · Guides · Calculator · 🔎 Search
How to Cut a Keyway
Guide · Updated October 28, 2026
A keyway locks a pulley, gear or coupling to a shaft. The shaft gets a keyseat milled into it, the hub gets a matching keyway, usually broached, and a square or Woodruff key fills both.
Gage the width and depth
Set a known width or depth stack for checking with the free Gage Block Calculator.
Step by step
- Pick the key size: Use the standard for the shaft diameter, for example a 3/16 in key for shafts over 9/16 to 7/8 in and 1/4 in for over 7/8 to 1-1/4 in.
- Hold the shaft: Clamp the shaft in a vise with V-block jaws, or in V-blocks on the table, with the axis parallel to X.
- Find center: Touch off both sides of the shaft with an edge finder or indicator and move to the centerline.
- Touch off the top: Touch the cutter on the top of the shaft and zero the quill or Z.
- Cut the keyseat: Use an end mill slightly under key width, take the depth in passes, then widen to size; or plunge a Woodruff cutter to depth.
- Broach the hub: For the hub, put the bushing and broach in the bore and press it through with an arbor press, adding shims between passes as the broach set requires.
- Measure and deburr: Check width with gage blocks or pins and depth from the opposite side of the shaft, then deburr the edges.
Keyseat depth math
Standard square keys sit half in the shaft and half in the hub. Measure depth from the side of the shaft opposite the keyseat: remaining dimension = D − (key height ÷ 2) + chordal height, where chordal height = (D − √(D² − W²)) ÷ 2. For a 1.000 in shaft and 1/4 in key: chordal height ≈ 0.016 in, so the dimension is about 1.000 − 0.125 + 0.016 = 0.891 in.
Why undersize end mills?
An end mill the exact key width cuts oversize from runout and deflection. Rough with a smaller end mill and finish each wall, or use a keyseat cutter ground to width.
Woodruff keys
A Woodruff key is a half-disc; the cutter matches the key number (e.g., #406 = 1/8 in wide × 3/4 in diameter). Plunge to the depth listed in the chart, and the key self-aligns.
Tips
- Check end mill runout before cutting to width.
- Use milling speeds and feeds, slowing the feed for full-slot cuts.
- Find the centerline with an edge finder.
- Hold round stock with V-blocks.
- Break edges: deburring guide.
FAQ
How do you cut a keyway in a shaft?
Clamp the shaft parallel to X, find its centerline, touch off the top and mill the keyseat with an undersize end mill or keyseat cutter to half the key height plus chordal height.
How do you cut a keyway in a pulley or gear bore?
Use a keyway broach with a bushing that fits the bore, pushed through with an arbor press, adding shims for each pass.
How deep should a keyway be?
For a standard square key, about half the key height in the shaft and half in the hub, measured from the shaft edge using the chordal height correction.
What size key for a 1 inch shaft?
A 1/4 in square key is standard for shafts over 7/8 in to 1-1/4 in diameter.
Can I cut an internal keyway without a broach?
Yes, by slotting on a shaper, slotting attachment, or by single-point shaping on the lathe with the carriage, but a broach is fastest for small runs.
Related guides and calculators
- Milling speeds and feeds
- Edge finder basics
- How to use a V-block with gage blocks
- How to deburr and break edges
- Runout and TIR basics
- How to tram a mill
- ISO 286 fit calculator
- Blueprint reading basics
- How to Use a Dividing Head
- How to Use a Slitting Saw
- How to Use a Keyway Broach
- How to Cut a T-Slot
- How to Cut a Woodruff Keyseat
- How to Use a Slotting Attachment on a Mill
- How to Cut Spur Gears with a Dividing Head
- How to Use an Arbor Press
- How to Set Up a Horizontal Mill
- All free machinist calculators
- How to Cut a Dovetail
- Shaft Key Size Chart
- ISO 286 Hole-Basis Fits Explained (H7/g6, H7/h6, H7/k6, H7/p6)
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 machine and tooling manufacturer's instructions and your shop's safety rules.