Why Do We Have Leap Years?

Last edited Oct 14, 2026 · 4 min read

Every few years, February gets a 29th day. It looks like a small calendar quirk, but it fixes a real mismatch between how we count days and how Earth moves around the Sun. The rule behind it is also more interesting than "every four years," and NASA lays out the math.

1. The problem: a year is not a whole number of days

NASA Space Place explains the two motions involved. A day is the time Earth takes to spin once on its axis, about 24 hours. A year is the time Earth takes to orbit the Sun once. The trouble is that a year does not contain a whole number of days.

NASA's Glenn Research Center gives the precise figure for the tropical year, the time from one spring equinox to the next, which is the year that tracks the seasons: 365 days, 5 hours, 48 minutes, and 46 seconds, or 365.2422 days.

A calendar needs a whole number of days, so most years get 365. That leaves almost a quarter of a day uncounted every year.

2. What happens if you ignore it

NASA Space Place describes the result. The missing hours add up into days, then weeks, then months. Eventually, in a few hundred years, July would fall in winter for people who are used to July being a summer month. The calendar would drift away from the seasons it is supposed to track.

3. The first fix: one extra day every four years

The simplest correction is to add one day every fourth year. Three years have 365 days and the fourth has 366. The Glenn Research Center works out the average:

(3 x 365 + 366) / 4 = 365.25 days

NASA notes this system was introduced in the Roman Empire by Julius Caesar around 46 BC. It is called the Julian calendar.

4. The leftover error

365.25 is close to 365.2422, but not equal. The Julian calendar year is 0.0078 days too long, which is about 11 minutes and 14 seconds per year.

Eleven minutes sounds harmless, but it adds up. The Glenn Research Center calculates the total drift between 46 BC and 1582 AD:

0.0078 x (1582 + 46) = about 12.7 days

By the 1500s, the calendar had slipped well away from the seasons.

5. The Gregorian fix: skip some century years

In 1582, Pope Gregory XIII reformed the calendar with a sharper rule. A year is a leap year if:

  1. it is divisible by 4,
  2. except century years (like 1700, 1800, 1900), which are leap years only if they are also divisible by 400.

Some examples:

Year Divisible by 4? Century year? Divisible by 400? Leap year?
2024 yes no not needed yes
1900 yes yes no no
2000 yes yes yes yes
2100 yes yes no no

So the year 2000 was a leap year, but 1900 was not, and 2100 will not be.

6. Checking the new average

The Glenn Research Center shows why this works by looking at a 1,200-year block:

  • 300 years are divisible by 4, including all 12 century years.
  • Only 3 of those 12 century years are divisible by 400.
  • That removes 9 leap years, leaving 291 leap years and 909 ordinary years.

The new average year is:

(291 x 366 + 909 x 365) / 1,200 = 365.2425 days

That differs from the tropical year by only 0.0003 days per year, which adds up to one day of error about every 3,333 years.

7. The day people lost 10 days

To bring the seasons back into line, the switch to the new calendar skipped 10 days. NASA's Glenn page describes it: in the countries that adopted it in October 1582, Thursday, October 4, was followed by Friday, October 15. Britain and its colonies did not switch until September 1752, by which time an additional day of correction was needed.

8. Other planets need leap years too

NASA Space Place notes that the same problem shows up on almost every planet, since orbits and spins rarely line up neatly. On Mars, a year is about 668.6 sols (Martian days). A Martian calendar would need leap years more often than not: over a 10-year period, 4 years would have 668 sols and 6 would be leap years with 669.

9. Key takeaways

  • Earth's orbit takes about 365.2422 days, so a 365-day calendar slowly drifts away from the seasons.
  • Adding a leap day every four years gives an average of 365.25 days, which is about 11 minutes too long per year.
  • The Gregorian rule skips leap years in century years not divisible by 400, so 1900 was not a leap year but 2000 was.
  • That rule averages 365.2425 days, which drifts by only one day in about 3,333 years.
  • Switching calendars in 1582 required skipping 10 days, from October 4 straight to October 15.

Sources

  1. NASA Space Place, What Is a Leap Year?
  2. NASA Glenn Research Center, Calendar Calculations
CategoriesScience for the Curioussciencecalendarastronomynasa