The Tool Mill

Roller Chain Length Calculator

Two sprockets and a center distance set the loop. Enter teeth, shaft spacing, and pitch. This returns length in pitches and the even link count you actually buy. Starting length only — not a tensioner spec.

When to use

Two sprockets and a center distance set the loop.

Use it when replacing or designing a chain drive on a machine, a conveyor, a go-kart or a bike. Enter the tooth counts, the chain pitch and the center distance; the page gives the length in links, rounded up to an even number so the chain closes with a standard connecting link, and the length in inches.

Calculator

Same unit on center distance and pitch. ANSI numbers are inch pitches.
Fills pitch. Pick Custom to type any pin-to-pin.
Driver or driven. 17T is a common small #40 sprocket.
The other sprocket. Order does not change the length.
Shaft center to shaft center, not sprocket OD.
Pin center to next pin center. #40 is ½ in.
Even closes with a standard connecting link. Odd needs an offset (cranked) link. Uncheck to round up to the next integer instead.
—

How this is calculated

A two-sprocket roller-chain loop is two tangent spans plus the wrap on each sprocket. Length is counted in pitches — one pitch is one link. Convert to inches or millimetres by multiplying by p.

L = (N1 + N2)/2 + 2C/p + ((N2 − N1)2 × p) / (4π2 C)
L = pitches (links) · N1, N2 = tooth counts · C = center distance · p = pitch · same unit on C and p.

The first term is the mean wrap. The second is the two straight runs. The third corrects for unequal sprockets — extra wrap on the large wheel, less on the small. When N1 = N2 that term is zero and L = N + 2C/p.

L is almost never an integer. A roller chain is alternating inner and outer links, so a standard connecting (master) link wants an even pitch count. This calculator rounds up to the next even integer by default. Uncheck the box to round up to the next whole number, even or odd. An odd count needs an offset link. Neither rounding is a tensioner: the theoretical C you typed will sit a hair short of the even loop, which is the usual shop slack to take up. This page does not solve center distance from a known chain, and it does not size an idler or a sliding motor base.

Worked checks

N1 / N2C, pitchL pitchesEven links
17 / 4218 in, #40 (0.500)101.94102 (51.00 in)
17 / 4218 in, #50 (0.625)87.6588 (55.00 in)
17 / 4218 in, #60 (0.750)78.1680 (60.00 in)
20 / 2020 in, #40 (0.500)100.00100 (50.00 in)
15 / 4524 in, #40 (0.500)126.47128 (64.00 in)
12 / 2412 in, #40 (0.500)66.1568 (34.00 in)

Those six rows come from (N1+N2)/2 + 2C/p + ((N2-N1)² × p)/(4π² C), then rounded up to even. The default example is the first row: 17T and 42T, 18 in centers, #40. Equal 20T sprockets on 20 in centers with p = 0.5 is the clean algebra check — correction is zero, L = 20 + 80 = 100 on the nose. 15/45 at 24 in is the odd-vs-even check: theoretical 126.47, next integer 127 (odd, offset link), next even 128.

FAQ

Why round up to an even number of links?

Roller chain is inner link, outer link, inner, outer. A standard connecting link joins that pattern on an even count. An odd count needs an offset (cranked, half-link) piece, which is a wear point and a weaker joint. Shops buy even unless the catalog forces otherwise. This page rounds up, not to nearest, so you are not short of the theoretical loop.

How do I measure center distance?

Shaft center to shaft center. A rule across the two shaft ODs, minus one radius of each shaft, is the usual shop method when the sprockets are already on. Do not tape sprocket outside diameters and call that C. Measure at the spacing you intend to run, not at the slack end of a motor slot — this calculator is a starting length for that C, not a take-up chart.

What is pitch, and what is ANSI 40 / 50 / 60?

Pitch is pin center to the next pin center. ANSI numbers are 80 × pitch in inches, so #40 is 0.500 in, #50 is 0.625 in, #60 is 0.750 in. The number is stamped on the chain or the box. Measure a used chain over several pitches and divide if the stamp is gone. ISO 08B is the same 12.7 mm pitch as #40; type 12.7 mm as custom if you are on a metric tape.

Does it matter which sprocket I call N1?

Not for length. The unequal term is squared, so 17 and 42 give the same L as 42 and 17. Ratio, wrap, and which shaft is the driver still matter for the drive; they do not change this loop count. Enter the two tooth counts you actually have.

Is this a tensioner spec?

No. Starting length only. Rounding up to even (or to the next integer) leaves you a little long for the C you typed. That slack is what a sliding base, an idler, or chain wear is for. This page does not tell you how much take-up to buy, where to put an idler, or what center distance an already-cut chain will sit at. If the drive is already built, count links on the old loop or lay it out and measure.

What if I uncheck even links?

The calculator then rounds up to the next whole pitch, which may be odd. 15T and 45T on 24 in of #40 is 126.47 theoretical: even rounding buys 128; integer rounding buys 127 and wants an offset link. Leave even on unless you already have an offset in the box and know why you are using it.

Inches or millimetres?

Use the unit on the tape. ANSI presets always mean 0.500 / 0.625 / 0.750 in and convert when you switch the menu. Center distance converts with them so the physical layout stays put. Mixing an 18 (inches) with a 12.7 (millimetres) as if they were the same system will invent a loop that does not exist.