Skip to content

Leap Years Explained: The Math Behind February 29

Earth takes 365.2422 days to orbit the sun. Here is the elegant rule the Gregorian calendar uses to stay aligned, why 2000 was a leap year but 1900 was not, and what leap seconds add on top.

· 9 min read · Gabriel

Fun facts about leap years
Table of Contents

Why we need leap years at all

A "year" in the everyday sense is one full circuit of Earth around the sun. Astronomers call this the tropical year — the time from one vernal equinox to the next — and its current length is about 365.24219 mean solar days. A "day" is the time Earth takes to rotate once on its axis with respect to the sun, about 86,400 seconds. The two numbers are not whole multiples of each other, and that mismatch is the entire reason calendars are complicated.

If we used a flat 365-day year, the calendar would slip about a quarter of a day each year. After four years it would be a day off. After 100 years it would be 25 days off. Within a few centuries, Christmas would have wandered into autumn. The job of a leap-year rule is to insert extra days at just the right rate so the average calendar year matches the tropical year as closely as possible.

Caesar's first attempt

The Julian calendar, introduced by Julius Caesar in 45 BCE, took the simplest possible approach: add one day every four years. That gives an average year of 365.25 days. Compared to the true value of 365.2422 it overshoots by about 11 minutes and 14 seconds. Eleven minutes is invisible inside any one human lifetime, but it accumulates to about three days every 400 years. By the 16th century the Julian calendar was about ten days out of sync with the seasons, which is why the Gregorian reform had to delete ten days from October 1582.

The Gregorian rule

The Gregorian calendar keeps the four-year rule but adds two corrections:

  1. A year is a leap year if it is divisible by 4.
  2. Except: it is not a leap year if it is divisible by 100.
  3. Except the exception: it is a leap year if it is divisible by 400.

So 1996 was a leap year (divisible by 4). 1900 was not (divisible by 100, not by 400). 2000 was (divisible by 400). 2100, 2200, and 2300 will not be. 2400 will be. Over a 400-year cycle the Gregorian calendar contains 97 leap years instead of 100, giving 146,097 days, an average year of 365.2425 days. The error against the true tropical year is now only about 27 seconds per year, or one full day every 3,236 years.

Why February?

Why is the extra day added to February of all months? The answer is Roman, not astronomical. In the pre-Julian Roman calendar, February was the last month of the year and was already short and irregular, used as a kind of buffer for calendar adjustments performed by the pontifices. When Caesar's reform fixed the month lengths, the leap day was added at the end of February — originally as a "doubled" sixth day before the kalends of March, which is where the term bissextile year comes from.

The 1712 Swedish disaster

Sweden famously botched its calendar transition. Rather than dropping ten days at once like Catholic Europe, Sweden decided in 1700 to gradually skip every Julian leap day for 40 years. They skipped February 29 in 1700 — and then forgot, and observed the leap day in 1704 and 1708 anyway. The country was now one day off from both the Julian and the Gregorian calendar. To get back in sync with the Julian calendar, Sweden added an extra day in 1712, giving it a unique February 30, 1712. It finally switched to the Gregorian calendar in 1753.

Leap seconds: a different problem

Leap years correct for the mismatch between Earth's orbit and a 365-day calendar. Leap seconds correct for something else entirely: the gradual slowing of Earth's rotation. Tidal friction with the Moon, post-glacial rebound, and core-mantle coupling all change the rotation rate of the planet slightly and unpredictably. As a result, the mean solar day is currently about 1 to 2 milliseconds longer than 86,400 SI seconds.

Atomic clocks, however, tick at a perfectly steady rate, defined since 1967 by the resonance frequency of the cesium-133 atom. To keep civil time (UTC) within 0.9 seconds of astronomical time (UT1), the International Earth Rotation and Reference Systems Service occasionally announces a leap second. Twenty-seven leap seconds have been added between 1972 and the time of writing, all positive. Leap seconds have caused enough chaos in computer systems that the General Conference on Weights and Measures voted in 2022 to abolish them by or before the year 2035.

What about leap-year birthdays?

A baby born on February 29 — sometimes called a "leapling" — has a real birthday only every four years. Different jurisdictions handle this differently for legal purposes. In the UK, leaplings are legally considered to age on March 1 in non-leap years. In New Zealand the law uses February 28. The Gilbert and Sullivan operetta The Pirates of Penzance hinges on a leapling whose 21-year apprenticeship is written to expire on his 21st birthday rather than his 21st year — which means he must serve until 1940.

Could the rule be even better?

Yes, slightly. Several proposed refinements would skip one additional leap day every 4,000 years (Madler, 1864) or every 3,200 years, which would push the calendar's drift below one day per 100,000 years. None has been adopted, because the existing error is far smaller than the natural variation in Earth's orbital and rotational behavior over those timescales.

Further reading

  • Richards, E. G. Mapping Time: The Calendar and Its History (Oxford University Press, 1998).
  • Seidelmann, P. K. (ed). Explanatory Supplement to the Astronomical Almanac, 3rd edition (University Science Books, 2013).
  • Nelson, R. A., et al. "The leap second: its history and possible future." Metrologia 38, 509–529 (2001).

← Back to all articles