# Bicycle Gearing & Fit Calc Gear ratios and speed, cadence, gear tables, chain length, wheel circumference, climb grades, saddle height and frame size. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://bike-calc.x402tookit.com/openapi.json - x402 manifest: https://bike-calc.x402tookit.com/.well-known/x402 - Catalog (free): https://bike-calc.x402tookit.com/catalog - Health (free): https://bike-calc.x402tookit.com/health - Uptime (free): https://bike-calc.x402tookit.com/uptime ## Endpoints (8) ### GET /cadence-for-speed — $0.02 Cadence needed to hold a target speed in a given gear, and the chainring-to-cog ratio needed for a speed at a cadence. Params: speedKmh?: number, speedMph?: number, chainring?: integer, cog?: integer, cadence?: number, wheel?: string, circumferenceMm?: number Example: https://bike-calc.x402tookit.com/cadence-for-speed?speedKmh=35&chainring=50&cog=17 ### GET /chain-length — $0.02 Chain length in links, rounded up to even, from chainstay length and chainring and cog teeth, with the exact figure. Params: chainstayMm: number, chainring: integer, cog: integer, pitchInches?: number Example: https://bike-calc.x402tookit.com/chain-length?chainstayMm=420&chainring=50&cog=28 ### GET /climb-gradient — $0.02 Gradient percent and angle from rise and distance, plus climbing rate (VAM) and the time to climb at a given rate. Params: riseMeters: number, distanceMeters: number, vam?: number, timeMinutes?: number Example: https://bike-calc.x402tookit.com/climb-gradient?riseMeters=600&distanceMeters=8000&vam=1200 ### GET /frame-size — $0.02 Rough bike frame size (seat tube cm and S/M/L) from inseam by bike type, with a height-based letter size cross-check. Params: inseam: number, bikeType?: string, unit?: string, heightCm?: number Example: https://bike-calc.x402tookit.com/frame-size?inseam=80&bikeType=road&heightCm=175 ### GET /gear-ratio — $0.02 Gear ratio, gear inches, development per pedal turn and speed at a cadence for a chainring and cog on a given wheel. Params: chainring: integer, cog: integer, wheel?: string, circumferenceMm?: number, diameterInches?: number, cadence?: number Example: https://bike-calc.x402tookit.com/gear-ratio?chainring=50&cog=17&wheel=700x25c&cadence=90 ### GET /gear-table — $0.02 Gear inches and speed at a cadence for every chainring and cog in a drivetrain, with the range, steps and duplicate gears. Params: chainrings: string, cogs: string, wheel?: string, circumferenceMm?: number, cadence?: number Example: https://bike-calc.x402tookit.com/gear-table?chainrings=50%2C34&cogs=11%2C12%2C13%2C14%2C15%2C17%2C19%2C21%2C24%2C28 ### GET /saddle-height — $0.02 Starting saddle height from inseam by the LeMond (0.883) and Hamley (1.09) rules, plus the Holmes knee-angle check. Params: inseam: number, unit?: string Example: https://bike-calc.x402tookit.com/saddle-height?inseam=80&unit=cm ### GET /wheel-size — $0.02 Rolling circumference and diameter for common tyre sizes, or an estimate from rim bead diameter and tyre width in mm. Params: tyre?: string, bsdMm?: number, tyreWidthMm?: number Example: https://bike-calc.x402tookit.com/wheel-size?tyre=700x25c ## Terms Bicycle arithmetic computed locally from the numbers given, using standard formulas and common fit rules of thumb, provided as is. Fit formulas (saddle height, frame size) are starting points only: a professional bike fit accounts for flexibility, injury and riding style. Wheel circumference is best measured by rolling the loaded wheel one turn. Not a safety inspection of a bicycle.