The Tropical Year, Cut in Wheels
A day wheel drives a wheel for the year
Gains 0.707 s a year
A whole day in 122,200 years
The trains before yours, engraved from the 1530s. See The Complication
The Train
One turn of the driver in 16 seconds
Other Trains
The same ratio, cut with other wheels
Set the Ratio
Your ratio, and the teeth your workshop cuts
The Tree
One tree holds every fraction, in order
- Cuts with your teeth
- A prime too large for your wheels
- Needs more pairs
Brocot's Table
The tree's best fractions, with Brocot's error
| Fraction | Value | Brocot's Error | Drift a Year | Cut |
|---|
Closest Trains
The closest ratios your teeth can cut
| Ratio | Pairs | Drift a Year | Train | Draw |
|---|
How It Is Cut
Three steps, each checked against a published table
Every positive fraction appears exactly once in the Stern–Brocot tree, in order. The tree starts at 1/1, between the bounds 0/1 and 1/0, and each step takes the mediant of the two bounds, the fraction whose numerator is the sum of theirs and whose denominator is the sum of theirs, then moves toward the target. Moritz Stern described the tree in 1858. Achille Brocot, a Paris clockmaker, found it on his own and published it in 1861 as a way to choose gear trains, because the fractions closest to a target, for their size, all lie on the path down to it.
Brocot kept a column of errors beside the path: for a fraction p/q and a target N/D, A = D·p − N·q. A mediant's error is the sum of its parents', so the column fills by addition, and its sign says which side of the target the fraction falls. Divided by q·N it is the relative error, and over a tropical year of 365.24219 days it is the drift.
A fraction is only worth having if it factors. A train of three pairs turns its last arbor once for every (product of the driven wheels) ÷ (product of the drivers) turns of the first, so p/q can be cut when some multiple of p and the same multiple of q are each a product of three tooth counts inside the limits. The page lists every product of up to three tooth counts, and for each one tries the products on either side of the target. The closest ratio found that way is the closest any train inside the limits can cut, whether or not it is a node of the path. The path then shows which closer fractions were out of reach, and names the prime that put them there: 1,461/4 is a closer year than 365/1, and 1,461 = 3 × 487.
mediant of a/b and c/d (a + c) / (b + d)
Brocot's error A = D·p − N·q
relative error e = A / (q·N)
drift a year Δ = T·(1 / (1 + e) − 1), with T = 365.24219 days
a train of three pairs p / q = (z2·z4·z6) / (z1·z3·z5)
| Check | Published | This Page | Source |
|---|
The test suite runs the same checks, and two more by brute force: every best approximation the path gives for eight targets against every denominator up to 3,000, and the train search against every train inside small limits, one by one. The worst agreement is the 59-tooth moon disc, a day out in 2 years and 7.7 months against a source that gives 2 years and 7 months.
What It Does Not Do
- Ratio only. No tooth form, module, centre distance, strength or friction: a train that is right on paper can still be unbuildable. The drawing uses one module for every wheel so the sizes compare.
- At most three pairs, and wheels of 4 to 200 teeth. Camus's year was published with four pairs; the page finds a three-pair train instead.
- The search is exhaustive inside the limits and runs in the page, so wide limits on a slow phone take a second or two. The status line says what it is checking.
- A decimal is read as the exact fraction it writes: 365.24219 is 36,524,219/100,000. Targets carry at most 15 digits.
- The drift assumes the first wheel turns at exactly its stated rate. No train keeps better time than the clock that drives it.
- The 2008 AMS column on Brocot carries a copying slip in its three-pair train for Camus's year (358,688 for 358,668). Recomputed, that train is 4.95 s a year slow, not two millionths of a second. The receipts above print the corrected figure.
Sources
- A. Brocot, "Calcul des rouages par approximation, nouvelle méthode", Revue chronométrique 3 (1861), 186–194; a separate printing dated 1862 is on Gallica, public domain.
- M. A. Stern, "Ueber eine zahlentheoretische Funktion", Journal für die reine und angewandte Mathematik 55 (1858), 193–220.
- D. Austin, "Trees, Teeth, and Time: The mathematics of clock making", AMS Feature Column, December 2008, retrieved 2026-10-08: Brocot's table for 23/191, and Camus's year.
- R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. (1994), §4.5.
- T. Freeth et al., "Decoding the ancient Greek astronomical calculator known as the Antikythera Mechanism", Nature 444 (2006), 587–591: 235 lunar months and 254 sidereal months in 19 years.
- B. Homes, "Complications: Moonphase", Worn & Wound, 26 December 2017, retrieved 2026-10-08: the 59-tooth disc and the 122-year disc.
- OEIS A063674 and A063673, best approximations of π; A002485, A002486, A007676, A007677, convergents of π and e; CC BY-SA 4.0, retrieved 2026-10-08.
- Wikipedia, Stern–Brocot tree, Tropical year (365.24219 days), Lunar month (29.530588861 days), Sidereal time (86,164.0905 s), Inch (25.4 mm exactly) and Antikythera mechanism (27.321661 days); CC BY-SA 4.0, retrieved 2026-10-08.