The leap year rule
The Gregorian calendar adds a 29th day to February in leap years to keep the calendar aligned with the Earth's orbit. A year is a leap year if:
- it is divisible by 4,
- except years divisible by 100 are not leap years,
- unless they are also divisible by 400.
leap = (year mod 4 = 0 and year mod 100 ≠ 0) or year mod 400 = 0
So 2024 and 2028 are leap years, 1900 and 2100 are not, and 2000 was. The calculator shows each test for the year you enter.
Why we have leap years
A tropical (solar) year — the time between two March equinoxes — lasts about 365.2422 days. A calendar of exactly 365 days would drift by almost a quarter-day each year, about one month every 120 years, until the seasons no longer matched the months.
The Julian calendar (46 BC) added a leap day every 4 years, giving an average year of 365.25 days — slightly too long. By 1582 the error had grown to 10 days, so Pope Gregory XIII dropped 10 days and introduced the century rule. Skipping 3 leap days every 400 years gives an average of 365.2425 days, accurate to about one day in 3,200 years.
Examples
| Year | ÷ 4 | ÷ 100 | ÷ 400 | Leap? |
|---|---|---|---|---|
| 2024 | yes | no | — | Yes |
| 2026 | no | — | — | No |
| 1900 | yes | yes | no | No |
| 2000 | yes | yes | yes | Yes |
| 2100 | yes | yes | no | No |
Between 2000 and 2100 there are 25 leap years (2000, 2004, … 2096). People born on February 29 — "leaplings" — usually celebrate on February 28 or March 1 in common years; see the age calculator for how their age is counted.
Leap years in other calendars
The traditional Chinese lunisolar calendar handles the same problem differently: instead of a leap day it inserts a whole leap month (闰月) about 7 times every 19 years. The Islamic calendar is purely lunar and does not try to follow the seasons at all. This calculator applies the Gregorian rules used by civil calendars worldwide.
Frequently asked questions
Is 2100 a leap year?
No. 2100 is divisible by 100 but not by 400, so it is a common year with 365 days.
When is the next leap year?
The next leap year after 2026 is 2028, followed by 2032 and 2036.
How many days are in a leap year?
366 days, with February having 29 days instead of 28.
Was 2000 a leap year?
Yes. Although it is a century year, it is divisible by 400, so it was a leap year.
Last reviewed: