Calculate the exact bicycle chain length in links and inches from chainstay length, chainring, and rear cog, plus how many links to remove from a new chain.
Bicycle Chain Length Formula
CL = 2*C + F/4 + R/4 + 1
CL = 2*sqrt(C^2 + (0.0796*(F-R))^2) + (F+R)/4
- CL is the required chain length (inches)
- C is the chainstay length (inches), measured from the center of the bottom bracket to the center of the rear axle
- F is the number of teeth on the largest front chainring
- R is the number of teeth on the largest rear cog
The first equation is the standard sizing rule for derailleur bikes. It wraps the chain around the largest chainring and largest cog, doubles the chainstay, and adds 1 inch so the rear derailleur has enough slack to take up the difference across all gear combinations. The calculator uses this equation when you select the derailleur option with a largest cog of 36 teeth or smaller. When you select the wide-range 1x option for cassettes with a 42 tooth or larger cog, the allowance changes from 1 inch to 2 inches, which matches the shop practice of adding 4 rivets instead of 2 on dedicated 1x drivetrains.
The second equation is the rigorous version. It computes the exact geometric length of a chain wrapped around two sprockets, treating them as circles connected by straight chain runs, with 0.0796 converting the tooth count difference into inches of radius. The calculator uses it with no added allowance for the single speed and fixed gear mode, since there is no derailleur to feed extra chain through, and also reports it as the theoretical minimum in the derailleur modes.
Chain length in inches then converts to links. Each link spans a half inch of pitch, so the calculator divides CL by 0.5 and rounds up to the next even number, because a chain can only close by joining an inner plate to an outer plate. The compare function subtracts your required link count from the as-sold link count of a new chain and reports how many links to remove before installation.
Typical Chainstay Lengths and New Chain Sizes
If you cannot measure the chainstay directly, the table below gives typical ranges by bike type. Use it to sanity check your measurement or to get a working estimate, then measure before you make the final cut.
| Bike type | Typical chainstay (in) | Typical chainstay (mm) |
|---|---|---|
| Road race | 15.7 to 16.3 | 400 to 415 |
| Endurance road | 16.1 to 16.5 | 410 to 420 |
| Gravel | 16.5 to 17.5 | 420 to 445 |
| Cross-country MTB | 16.9 to 17.3 | 430 to 440 |
| Trail and enduro MTB | 17.0 to 17.7 | 432 to 450 |
| Touring | 17.3 to 18.1 | 440 to 460 |
| Track and fixed gear | 14.8 to 15.6 | 375 to 395 |
| BMX (20 inch wheels) | 12.8 to 13.8 | 325 to 350 |
New chains are sold longer than almost any bike needs, and the as-sold length varies by brand and drivetrain. The table below lists typical link counts as packaged, which is the number the calculator compares against when it tells you how many links to remove.
| Drivetrain | Typical as-sold length |
|---|---|
| Shimano 9, 10, and 11 speed (road and MTB) | 116 links |
| Shimano 12 speed MTB | 126 links |
| SRAM Eagle 12 speed MTB | 126 links |
| SRAM road AXS 12 speed | 120 links |
| KMC 8 to 12 speed | 114 to 118 links |
| Single speed and BMX (1/8 inch) | 112 links |
Check the packaging for the exact count before cutting, since manufacturers change lengths between chain models.
Example Problems
Example 1: road bike with a derailleur. The chainstay measures 16.25 inches, the largest chainring has 50 teeth, and the largest cog has 30 teeth. Applying the formula gives CL = 2(16.25) + 50/4 + 30/4 + 1 = 32.5 + 12.5 + 7.5 + 1 = 53.5 inches. Dividing by 0.5 gives 107 links, which rounds up to the next even number, 108 links, or 54 inches of chain. If you bought a 116 link chain, you would remove 8 links before installing it.
Example 2: single speed bike. The chainstay measures 15 inches, the chainring has 44 teeth, and the rear cog has 16 teeth. The rigorous equation gives CL = 2 x sqrt(15^2 + (0.0796 x 28)^2) + 60/4 = 2 x sqrt(225 + 4.97) + 15 = 30.33 + 15 = 45.33 inches. Dividing by 0.5 gives 90.7 links, which rounds up to 92 links to keep the count even, for a final length of 46 inches. On a single speed you would then slide the axle back in the dropouts to set the final tension.
Frequently Asked Questions
What happens if my chain is too long or too short? A chain that is too long sags in the smallest gear combinations, shifts sluggishly, and can slap the frame or drop off the chainring on rough ground. A chain that is too short is worse: in the largest ring and largest cog it stretches the rear derailleur past its capacity, which can tear the derailleur off its hanger, bend the hanger, or snap the chain under load. If you are between sizes, err one link pair longer, since the derailleur can take up slack but cannot create it.
Do I count the master link in the total? Yes. The master link, or quick link, replaces a normal outer link, so it counts as one link in the final total. When cutting the chain, break it so both ends finish in inner plates, then the quick link supplies the last outer link. If you are comparing against an old chain, snap the master link into the new chain first so you are matching complete lengths.
How do I size a chain for a full-suspension mountain bike? The distance between the bottom bracket and rear axle grows as the suspension compresses, a behavior called chain growth. Size the chain at the point of maximum chain growth, which on most frames means letting the air out of the shock or disconnecting it and compressing the linkage fully, then measuring the chainstay in that position. A chain sized to the uncompressed length can pull the derailleur apart on a hard bottom-out.
