Calendar Approximations via Continued Fractions

Summary: The Julian, Gregorian, and other intercalation rules approximate the ratio of the tropical year to one civil day. Expressing this ratio as a continued fraction (Add. I, Art. 20) and reading off its convergents yields all “best” intercalation rules — and lets one judge the Gregorian rule against alternatives.

Sources: additions-1

Last updated: 2026-05-10


The Underlying Ratio

According to M. de la Caille (used by Lagrange in Add. I, Art. 20), the tropical year is

Its excess over is . The ratio

(in seconds: ). After years, the accumulated excess is exactly days, so a perfect calendar would intercalate extra days every years.


Continued-Fraction Expansion

Reducing via the Euclidean algorithm yields the partial quotients

Building convergents:

0441
17297
21338
3312831
4116139
5162704655
612865694
7155691349
8158640020929

Each convergent states an intercalation rule: add days every years.


Reading Off Calendar Rules

ConvergentReadingStatus
1 day every 4 yearsJulian calendar (45 BC); slightly too generous
7 days every 29 yearsSlightly too few intercalations
8 days every 33 yearsIranian/Khwārizmī solar calendar; very close
31 days every 128 yearsSlightly too generous
39 days every 161 yearsBest convergent with
655 days every 2704 years

By the alternation theorem, even-indexed convergents under-intercalate and odd-indexed convergents over-intercalate.


Where Does the Gregorian Rule Fit?

The Gregorian calendar (1582) intercalates days every years — i.e., the rate — which is not a convergent of de la Caille’s .

Why? Because the Gregorian reformers used Copernicus’s slightly different year length, , giving the ratio . Reducing this gives partial quotients , with convergents

Among these, is also absent — Lagrange notes that would only appear as a semi-convergent between and , and even then it sits between the two intermediate fractions and . So the Gregorian rule is not optimal even on its own intended ratio — Lagrange remarks that it would have been more accurate to intercalate 90 days every 371 years instead.


Optimality Critique

By the best-approximation theorem (best-rational-approximations):

  • approximates de la Caille’s year better than any rational with denominator , including the Gregorian .
  • If one prefers to keep as the cycle length, the optimal numerator (per the theorem) would be the principal convergent or semi-convergent whose denominator is closest to from below.

Lagrange refrains from taking a position on which year-length estimate is correct, since astronomers were still debating this in his time. His point is methodological: the CF furnishes all candidate intercalation rules in increasing order of accuracy, and one chooses among them according to what cycle length is socially convenient.


Modern Note

Modern measurements give the tropical year as days, slightly less than de la Caille’s . The CF of the modern excess produces convergents close to but not identical with Lagrange’s; the Gregorian is now slightly too generous, and the “right” rate is closer to — vindicating the Persian solar calendar’s choice.