Skip to content
HeavyCNC

Guides / Process

Keyways, Splines and Flats on Long Machined Shafts

September 29, 2026

A keyway or spline looks like a simple feature on a drawing, a slot or a set of teeth cut into an otherwise round shaft. On a long, large diameter shaft it is rarely the easiest operation in the sequence, because it happens after the shaft is already round, straight and, on some parts, hardened, which means there is very little room left to correct a mistake.

Why the feature usually comes after turning

A shaft is turned first because turning establishes the centreline, the diameters and the shoulders that everything else references. Cutting a keyway before turning would mean cutting it against a blank that has not yet been made round or straight, so any alignment work would have to be redone anyway.

Once turning is complete, the keyway, spline or flat is cut on a separate operation, usually milling, and it has to be located against the same centreline and shoulders the turning operation established. This is where the work gets exacting on a long shaft, because a keyway near one end has to align with a shoulder or a bore that might be metres away.

Alignment across the length of the shaft

The requirement that causes the most trouble on large shafts is a keyway that has to align angularly with something else on the part, a second keyway, a flat, a cross bore or a coupling face.

Two things make this hard as the shaft gets longer.

Handling. The shaft has to be picked up, moved between machines or rotated in a large fixture, and every handling step is a chance to lose the angular reference that was set during turning.

Indicating over distance. Finding a feature’s exact angular position on a shaft that might be three or four metres long takes time on the machine, because a small error in how the part is clocked at one end shows up as a larger error at the far end.

The practical answer is to keep the shaft on one setup for as much of this work as possible, or to mark and record the reference used for turning so it can be recovered accurately at the milling stage. A shop experienced with large shafts plans for this before the part ever leaves the lathe.

Before or after heat treatment

Some shafts are hardened, either through the section or on specific surfaces, and the keyway or spline can be cut before or after that operation depending on the design.

Before heat treatment. Easier to machine, but the feature can distort slightly during hardening, which matters if the tolerance is tight.

After heat treatment. The feature is cut into material that is already at its final hardness, which can mean milling is no longer practical and grinding takes over, adding a different process and often a different machine to the sequence.

Neither approach is automatically correct. It depends on the hardness required, the tolerance on the feature, and what the shop’s process can reliably hold. This is a detail worth asking about directly rather than assuming a shop will default to the simpler option.

Broaching versus milling at this size

Broaching a keyway pushes or pulls a shaped tool through the slot in one pass and gives a very repeatable result, which is why it dominates high volume shaft production. It needs a broach sized to the exact keyway dimensions, which is tooling cost that makes sense across many identical parts and less sense on a single large shaft or a short run.

Milling a keyway with a standard end mill or a dedicated keyseat cutter needs no special tooling beyond what most shops already carry, and it is the more common choice for one-off or low quantity large shafts. The tradeoff is a slightly longer cycle and, on a very long slot, more attention to keeping the width and depth consistent along its length.

Splines are more often milled or hobbed than broached at large shaft sizes, for the same reason: dedicated broaching tooling for a large spline is expensive to justify outside repeat production.

What to put on the RFQ

  • Keyway or spline dimensions and standard reference, if one applies
  • Angular alignment requirement to any other feature on the shaft, stated as a relationship rather than an isolated tolerance
  • Whether the feature is cut before or after any heat treatment
  • Quantity, since it affects whether broaching becomes worth discussing
  • The datum used to establish the shaft centreline, so the shop can confirm they can recover it

What to do next

If your shaft has more than one angularly related feature along its length, say so explicitly on the drawing and state which one is the reference. That single clarification prevents more rework than any tolerance value on the keyway itself.

Related reading: vertical turning lathe vs horizontal lathe, large bore machining and coaxiality, tolerance across a large part.

Frequently asked questions

Should a keyway be cut before or after heat treatment?

It depends on the hardness target and the tolerance. A keyway cut before a hardening operation may distort slightly, while one cut after can be harder to machine and may need grinding rather than milling. Ask the shop which sequence they plan and why, since both approaches are used.

Is broaching or milling better for a keyway on a large shaft?

Broaching gives a very consistent finish but needs tooling sized to the keyway and is more common in higher volume work. On a large, one-off or low quantity shaft, milling the keyway is usually the more practical choice because it needs no dedicated broach.

How is a keyway kept aligned to a feature elsewhere on the shaft?

By referencing the same datum used for the rest of the shaft, usually the centreline established during turning, and by indicating a shoulder, a bore or another keyway from that same reference rather than measuring from the nearest convenient surface.

Need a quote for a part like this?

Send the drawing with the envelope and finished weight. We match you with up to 3 shops that take parts this size and reply within 24 business hours.

Get matched with a large part shop

Keep reading