DailySmartTools
Dates and time

Why Leap Years Exist and How the Rule Works

Earth takes about 365.2422 days to orbit the Sun. The leap year rule is a way of keeping the calendar in step with the seasons.

By Editorial Team · Updated September 19, 2026 · 2 min read

A calendar year is 365 days, but the time Earth takes to go around the Sun, measured from one spring equinox to the next, is about 365.2422 days. That extra quarter of a day is the reason for leap years.

What goes wrong without them

If every year had exactly 365 days, the calendar would fall behind the seasons by roughly a day every four years. After a century the calendar would be about 24 days out, and dates such as the start of spring would slowly drift into winter.

The Julian solution

The Julian calendar, introduced in 45 BC, added a day every four years. That makes the average year 365.25 days, a little too long. The error is small, about 0.0078 days a year, but it adds up to about a day every 128 years. By the 1500s the calendar was roughly ten days ahead of the seasons.

The Gregorian correction

In 1582 the calendar was reformed, and the rule was refined so that some century years are not leap years.

A year is a leap year if:
  it is divisible by 4,
  except when it is divisible by 100,
  unless it is also divisible by 400.

So 2024 is a leap year, 1900 and 2100 are not, and 2000 was, because it is divisible by 400.

Over 400 years this gives 97 leap years instead of 100, so the average year is (400 × 365 + 97) ÷ 400 = 365.2425 days. That is within about 0.0003 days of the true value, an error of roughly one day in about 3,000 years.

Different countries switched at different times

Catholic countries adopted the reformed calendar in 1582, skipping ten days: 4 October was followed by 15 October. Other countries changed much later. Britain and its colonies switched in 1752, when 2 September was followed by 14 September, an 11-day jump. Because of this, historical dates before the switch can be given in either "old style" or "new style".

Why it matters for calculators

Leap years affect:

  • Age and date arithmetic. Someone born on 29 February has a real birthday only every fourth year.
  • Counting days across a February, which has 28 or 29 days.
  • Anniversaries, deadlines and contracts written in years rather than days.

Good tools count real calendar days instead of assuming every year has 365. The date difference calculator does this automatically.

Quick check

To test a year, divide by 4. If it is not divisible, it is not a leap year. If it is, and it is not a century year, it is a leap year. For century years, check divisibility by 400.

Frequently asked questions

Is 2100 a leap year?
No. It is divisible by 100 but not by 400.
How many days are in a leap year?
366, because February has 29 days.
Why is 29 February the extra day?
Because February is the shortest month, and by long tradition the added day goes at its end.

About the author

Editorial Team. The Editorial Team writes, checks and maintains every tool and guide on this site. The calculation logic behind the calculators is covered by automated tests, examples are worked out and re-checked before publishing, and pages are updated when we find a mistake or a rule changes. Corrections are welcome through the contact page.

How we write and check our content

Tools mentioned in this article

Keep reading