# How do I calculate the diameter of a chainring from the number of teeth?

Simply knowing the number of teeth on a chainring can we determine an accurate diameter?

• There are basically 3 circles with different diameters (tips of teeth, base, or where the chain actually sits) -- which one do you want? What do you need the diameter for? – freiheit Aug 4 '11 at 21:13
• lovely answers here, but isn't the diameter twice the radius of a circle? – jackJoe Aug 4 '11 at 21:58
• @jackJoe yes, but that's not helpful because you don't know the radius, either. – freiheit Aug 4 '11 at 22:48
• @JackJoe: It is. But we don't have any info besides number of teeth, per the OP. – zenbike Aug 5 '11 at 8:05
• Dog Ears: Please do look at the question on Math.Stackexchange.com. It's a far more complex and more thorough examination of the issue. As for this page, I suggest you choose @Lantius' answer. Mine is good, and practical for most purposes. It will get within the scope of error of common measurement tools. It is not perfectly accurate, and Lantius' answer betters that. – zenbike Aug 5 '11 at 15:54

A chainring is an n-sided regular polygon where n is the number of teeth. The side length s of the polygon is the distance from tip-to-tip of each chainring tooth.

The formula for radius of a regular polygon is:

Using zenbike's 12.75mm above for s, we get 107.61 for the radius, or 215.22mm for the diameter, which is very close to his approximation.

Comparing the two formulas shows that the length term, as expected, can be eliminated. This leaves us with:

1 / sin( pi / n ) vs. n / pi

For large n, those terms converge, introducing an error of just .12mm when n=53. It's a bit larger as n gets smaller, differing by .64mm for n=11.

For all practical purposes, I'd just use s * n / pi, even for the smallest cog you'll come across it'll be within a millimeter.

• I'm interested in the math here. Can you spell out (for those of us with less time in a math class) what each variable represents? I think I'm following you, but I'm not certain. The s*n/pi formula is the same as what I'm doing, correct? Where does the inaccuracy for a smaller number of sides come from? (Assuming I'm following you and have the variables right. ) – zenbike Aug 5 '11 at 8:14
• Is it the straight line between teeth, rather than a described arc? – zenbike Aug 5 '11 at 8:16
• It's a straight line. For example, if you had an impossibly-tiny chainring with eight teeth (vertices), you could trace a clean-looking octagon around it. As you have surmised, measuring the straight-line distance along the edges of that octagon and multiplying is missing the extra bit of distance that an arc would scribe between those points, so your total circumference comes out just a bit short. As your points get closer together, the difference gets smaller - a polygon with a million tiny sides is going to be nearly indistinguishable from a circle. – lantius Aug 5 '11 at 9:08
• That's what figured. Thanks for the clarification. So how do you adapt for the missing arc in the measurement? – zenbike Aug 5 '11 at 9:12
• The same mathematics in a slightly easier to digest format is the crd(theta) function en.wikipedia.org/wiki/Chord_(geometry) - it relates the length of the chord (the chain pitch in this case) to the radius and the angle. Adapted here, 12.7mm = r crd (360 / n) = 2*r*sin(180 / n); therefore r = 6.35 / sin (180 / n) mm. We need TeX over here. – Ehryk Jun 3 '12 at 3:46

If you only know the pitch of the chain (standard for most bicycles) and number of teeth, then you can fully describe the circle (and n-gon) through the pin centers only. I will do my best to do the math formulas in a readable way with text, but I will fully describe each of the four circles/n-gons: Let:

n = number of teeth

L = chain pitch (link length) (12.7mm for most bicycles)

See below for valley, roller top, and tooth top measurements. Note that tooth tops can vary between manufacturers and will vary throughout the life of the ring. The alternate method at the bottom is probably the easiest method to use for frame clearance.

Since you know the pitch of the chain (1/2" or 12.7mm is a 40 series chain typically used on a bicycle), the chain-pins will form a regular n-gon (a polygon with n-sides of equal length), with each side being equal to 12.7mm. The formula for the perimeter of this n-gon is rather simple (below) and would be fine for most approximations. Note that this is also equal to the chain length that would be wrapped around the ring (the chain would follow the n-gon, not the circle).

# Perimeter of n-gon made by pin centers

Perimeter of n-gon = L * n = 12.7 * n mm

However, this is not entirely accurate to describe the circle through the pin centers. The more accurate formulas are below:

# Circle through pin centers

circumference = pi * L / (sin (180 / n)) = 39.8982 / (sin (180 / n)) mm

radius = L / (2 sin (180 / n)) = 6.35 / sin (180 / n) mm = 'pcRad' (pin center radius)

diameter = L / sin (180 / n) = 12.7 / sin (180 / n) mm = 'pcD' (pin center diameter)

Now, we will need additional information to describe the two related circles / n-gons:

For the valley floors and roller tops, we need to know the radius or diameter of the chain roller around the pin. According to http://en.wikipedia.org/wiki/Roller_chain, a 40 series chain has a roller-diameter of 0.312" (7.92mm). Since the distance from pin-center to the bottom of the valley is the radius of the roller:

# Circle / n-gon about valley floors

Perimeter of n-gon of valley floors = 2 * n * (pcRad - rRad) * sin (180 / n)

= 2n * (pcRad - 3.96) * sin (180 / n) mm

floorDiameter = 2 * fRad = pcD - 2 * rRad = pcD - 7.92 mm

# Circle / n-gon of the tops of the chain rollers

Perimeter of n-gon of roller tops = 2 * n * (pcRad + rRad) * sin (180 / n)

= 2n * (pcRad + 3.96) * sin (180 / n) mm

rollerTopDiameter = 2 * rtRad = pcD + 2 * rRad = pcD + 7.92 mm

rollerTopCircumference = pi * rtD = pi * (pcD + 2 * rRad) = pi * (pcD + 7.92) mm

Now, for the final circle / n-gon to describe, we need the tooth height above the pin centers. I would expect this to be positive on a new chain ring and negative on a worn one:

# Circle / n-gon of the tooth tips

t = tooth tip height above pin centers (negative if below)

Perimeter of n-gon of tooth tips = 2 * n * (pcRad + t) * sin (180 / n)

tipDiameter = 2 * tRad = pcD + 2 * t

tipCircumference = pi * tD = pi * (pcD + 2 * t)

Alternatively, to make this computation a bit easier (yet slightly less accurate on a worn chain ring), you can measure your own individual tooth spacing. Ideally they would be slightly longer than the chain pitch, but that will change as the chain wears:

# Circle / n-gon of the tooth tips - Alternate

tSpacing = average distance between tooth tips

Perimeter of n-gon of tooth tips = n * tSpacing

tipRadius = tSpacing / (2 sin (180 / n))

tipDiameter = 2 * tRad = tSpacing / sin (180 / n)

tipCircumference = pi * tD = pi * tSpacing / (sin (180 / n))

• A small correction to Ehryk's formulas related to valley floors and tips. According to , a 40 series chain has roller diameter of 7.77mm (0.306 inches). Ehryk's is for a 41 series chain. : en.wikipedia.org/wiki/Roller_chain – user18940 Apr 3 '15 at 17:25

## EDIT:

I posted this question on math.se, and got an interesting answer, which basically confirms Lantius' answer as the more accurate mathematical model, and mine as a practical approximation for the bicycle world.

With only the number of teeth, no.

But given the number of teeth, and the required spacing from tip to tip of each tooth to match the chain for the brand of chain ring used, you can easily determine the circumference.

With the circumference, it's simple math to determine the diameter.

Divide the diameter by Pi (3.14159 to the 5th decimal)

C = D/3.14159

So if the number of teeth is 53, and the spacing is 12.75mm, we have a circumference of 675.75 millimeters.

675.75 millimeters divided by 3.14159 gives a diameter of 215.1 millimeters. Converted and rounded to 2 places, it's 8.46 inches.

I've measured the diameter of a 53 tooth Shimano chain ring, and it is 8.51 inches. So I believe my math should be as accurate as the tolerances in my measurements. • Of course, with a chainring you have the question of what is "the diameter" -- how do you measure it? When calculated from the above formula you should get the diameter of the chain circle -- basically the circle that the chain pins describe -- not the innermost or outermost diameter. – Daniel R Hicks Aug 4 '11 at 11:17
• Actually, this number is based on the measurement with a vernier caliper from tip of tooth to tip of tooth. It is the circumference described by a circle placed to touch the tip of each tooth. And I did assume outside diameter, since that is what would matter for framebuilding. – zenbike Aug 4 '11 at 11:59
• And hope it's not elliptical :-) – Karl Aug 4 '11 at 12:15
• Yeah, now that I think about it a chain should be slightly loose on a chainring -- one way to (crudely) check for chain stretch is to pull out on the front-most link and see how much it gives -- should be about half a chain thickness. But still you wouldn't (in theory, at least) be calculating the outermost diameter with your formula. – Daniel R Hicks Aug 4 '11 at 12:19
• @Daniel R Hicks: How is that? It does in fact work, as I did the math, and checked it against a physical chain ring, and it matches. Am I not describing the process well enough, maybe? – zenbike Aug 4 '11 at 12:42