{"uid":"cap_M2pVGPb_RFB41D8eMiwtS","slug":"bicycle-chain-length-calculator-0b87ae06","name":"Bicycle Chain Length Calculator","description":"Chain length in links, rounded up to even, from chainstay length and chainring and cog teeth, with the exact figure.","url":"https://bike-calc.x402tookit.com/chain-length?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["chainstayMm","chainring","cog"],"properties":{"cog":{"type":"integer","description":"Rear cog teeth in use (the biggest cog, for a derailleur bike)"},"chainring":{"type":"integer","description":"Chainring teeth in use (the biggest, for a derailleur bike)"},"chainstayMm":{"type":"number","description":"Centre-to-centre distance between bottom bracket and rear axle in mm (typically 405 to 440)"},"pitchInches":{"type":"number","description":"Chain pitch in inches (default 0.5, standard bicycle chain)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"pairs":{"type":["null","number"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"exactLinks":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"pitchInches":{"type":["null","number"]},"chainLengthMm":{"type":["null","number"]},"chainstayInches":{"type":["null","number"]},"toothDifference":{"type":["null","number"]},"chainLengthInches":{"type":["null","number"]},"linksRoundedUpEven":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7aCgnPREVHjBAh9b6A0oF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the required bicycle chain length in links (rounded up to the nearest even number) from chainstay length, chainring teeth, and rear cog teeth.","exampleAgentPrompt":"What chain length do I need for my bike — the chainstay is 425mm, I'm running a 50-tooth chainring and an 11-tooth rear cog? Give me the number of links rounded up to the nearest even number.","exampleUseCases":[{"title":"New bike chain sizing at home","prompt":"I'm replacing the chain on my road bike. The chainstay is 420mm, the big chainring has 52 teeth and the biggest cog is 32 teeth. How many links do I need for the new chain?"},{"title":"Custom single-speed build chain sizing","prompt":"I'm building a single-speed and need to figure out my chain length — chainstay is 415mm, chainring is 46 teeth, cog is 16 teeth. How many links should I cut the chain to?"},{"title":"Mountain bike chain length after cassette swap","prompt":"Just swapped to a wider range cassette on my mountain bike. Chainstay is 438mm, chainring is 34 teeth, biggest cog is 51 teeth. Tell me how many links my chain needs to be, rounded up to an even number."}],"resultDescription":"Returns the chain length in whole links rounded up to the nearest even number, the exact (unrounded) link count, chain length in millimetres and inches, the chainstay converted to inches, the tooth difference between chainring and cog, and the chain pitch used in the calculation.","failureModes":["Missing required parameters (chainstayMm, chainring, or cog) returns a validation error","Non-integer values for chainring or cog teeth may be rejected","Chainstay values outside the typical 405–440mm range may still compute but could yield unrealistic results","Unusual chain pitch values (other than standard 0.5 inch) require explicit pitchInches parameter or default is assumed"],"whenToPreferThis":"Choose this endpoint when you need a quick, formula-based chain length calculation from known drivetrain geometry — specifically chainstay length plus chainring and cog tooth counts. It is ideal for bike builds, chain replacements, or drivetrain changes where the user already knows their frame and gearing specs. Prefer this over manual calculation or generic cycling guides when you need a precise link count ready to act on.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:15:03.248Z","isFirstParty":false,"canonicalSlug":"bicycle-chain-length-calculator-0b87ae06"}