Chain length in links from centre distance and teeth
Before you cut a chain or lay out a drive, you need the chain length in pitches (links), worked out from the two sprocket centre distance, the tooth count of each sprocket, and the chain pitch. The result is rounded up to a whole number — and preferably an even one, to avoid an offset link. This guide gives the chain-length formula, the formula to solve back for the centre distance, a worked #40 example with 17- and 38-tooth sprockets, and how to check the centre distance in DXCAD2D.
How the chain wraps two sprockets
Chain length is three parts: the two straight spans (top and bottom) plus the wrap around each sprocket. Added up in links, this gives the standard formula below. Work everything in "number of pitches" first, then multiply by the real pitch to get millimetres.
Chain-length formula (in pitches)
L = 2(C ÷ P) + (N1 + N2) ÷ 2 + (P ÷ C) × [ (N2 − N1) ÷ (2π) ]²
where C = centre distance, P = chain pitch, N1/N2 = teeth on the small/large sprocket
The first two terms are the main part (straight spans + half the teeth of each sprocket); the third is a small correction for the difference in sprocket size. Round L up to a whole number, and preferably an even one, so you don't need a weaker offset (cranked) link.
Worked example — #40 chain, 17 and 38 teeth
ANSI #40 chain has pitch P = 12.7 mm (½ inch). The small sprocket is N1 = 17 teeth, the large one N2 = 38 teeth, with a target centre distance C = 400 mm.
- C ÷ P = 400 ÷ 12.7 = 31.496 pitches
- Term 1 = 2 × 31.496 = 62.992
- Term 2 = (17 + 38) ÷ 2 = 27.5
- Term 3 = (12.7 ÷ 400) × [ (38 − 17) ÷ (2π) ]² = 0.03175 × (3.3422)² = 0.03175 × 11.171 = 0.355
- Total L = 62.992 + 27.5 + 0.355 = 90.85 pitches
- Round up to an even number = 92 links → chain length = 92 × 12.7 = 1168.4 mm
Solve back for the centre distance (once links are chosen)
Rounding L up to 92 shifts the actual centre distance slightly. Solve back with
where 0.8106 = 8 ÷ π²
Put in L = 92, N1 = 17, N2 = 38, P = 12.7:
2L − (N1+N2) = 184 − 55 = 129
under the root = 129² − 0.8106 × 21² = 16641 − 357.5 = 16283.5 → √ = 127.61
C = (12.7 ÷ 8) × (129 + 127.61) = 1.5875 × 256.61 = 407.4 mm
Try it right now — a free 2D CAD in your browser. Nothing to install, no sign-up.
Open DXCAD2D OnlineCheck the centre distance in the program
Draw the pitch circles (PCD) of both sprockets at the centre distance to check the chain clears and the spans fit, using PCD = P ÷ sin(180° ÷ N) → a 17-tooth sprocket PCD = 12.7 ÷ sin 10.588° = 69.12 mm, a 38-tooth sprocket PCD = 12.7 ÷ sin 4.737° = 153.79 mm.
- Press C and draw the small PCD at the left centre with radius
34.56(half of 69.12). - Press C again, type the centre
400,0(400 along from the first centre) and radius76.9(half of 153.79). - Press L and draw the straight chain spans tangent to both circles, top and bottom (snapping helps catch the edge).
- Press ME and measure between the centres to confirm 400 mm (or 407.4 with a 92-link chain).
- Press D to dimension the centre distance and PCDs as an assembly drawing.
Frequently asked questions
How do I calculate chain length in links
Use L = 2(C/P) + (N1+N2)/2 + (P/C)·[(N2−N1)/(2π)]², where C is the centre distance, P the chain pitch and N1/N2 the two tooth counts, then round the result up to a whole number.
Why round the number of links up to an even number
An even number of links joins end to end with a normal connecting link. An odd number needs an offset (cranked) link, which is weaker, so an even count is preferred.
What is the pitch of #40 chain
ANSI #40 chain has a 12.7 mm (½ inch) pitch. The number divided by 8 gives the pitch in eighths of an inch (#40 → 4/8 inch = ½ inch, #50 → 5/8 inch).
Does rounding the links change the centre distance
Yes. Solve back with C = (P/8)·[2L − (N1+N2) + √((2L−(N1+N2))² − 0.8106(N2−N1)²)]. In the example, rounding to 92 links moves the centre distance from 400 to 407.4 mm.
How do I find a sprocket's pitch diameter
PCD = P ÷ sin(180° ÷ N). A 17-tooth #40 sprocket is 12.7 ÷ sin 10.588° = 69.12 mm. Use it to draw the pitch circle and check clearance.
Summary
Work out chain length in pitches first with L = 2(C/P) + (N1+N2)/2 + (P/C)·[(N2−N1)/(2π)]², then round up to an even number. For #40 chain with 17/38 teeth at 400 mm centres that gives 90.85, rounded to 92 links (1168.4 mm); solving back gives an actual centre distance of 407.4 mm, so allow a tensioner. Drawing the PCDs in DXCAD2D and measuring with ME confirms it before you build.