Leap Years Explained: The Gregorian Rule and Why 365.2425
A year is a leap year if divisible by 4, except centuries not divisible by 400. So 2000 and 2024 are leap years, 1900 and 2100 are not. Why 365.2425.
A year in the Gregorian calendar is a leap year if it is divisible by 4, except that century years are leap years only when divisible by 400. So 2024 and 2028 are leap years, 1900 and 2100 are not, and 2000 was. A leap year has 366 days because February gets a 29th day. Over any 400 consecutive years the rule produces 97 leap years, an average year length of exactly 365.2425 days.
The rule in three steps
Test a year in this order and stop at the first line that applies:
| Step | Test | Result |
|---|---|---|
| 1 | Divisible by 400? | Leap year (2000, 2400) |
| 2 | Divisible by 100? | Not a leap year (1900, 2100, 2200) |
| 3 | Divisible by 4? | Leap year (2024, 2028); otherwise not (2023, 2026) |
Most code writes this as year % 4 == 0 and (year % 100 != 0 or year % 400 == 0). A common bug is to stop at “divisible by 4”, which is right for every year from 1901 to 2099 and wrong for 1900 and 2100.
Why 365.2425
The calendar year is meant to stay in step with the seasons, which repeat in roughly 365.24 days. A plain 365-day year drifts by nearly a quarter of a day each year. Adding a leap day every 4 years gives an average of 365.25 days, which is slightly too long. The Gregorian rule corrects that by dropping 3 leap days in every 400 years:
365 + 1/4 − 1/100 + 1/400 = 365.2425
Each term has a plain meaning: one extra day every 4 years, minus one every 100, plus one back every 400. Counting years directly gives the same answer: in 400 years there are 100 multiples of 4, 4 multiples of 100 and 1 multiple of 400, so 100 − 4 + 1 = 97 leap years, and 400 × 365 + 97 = 146,097 days. Divided by 400 that is 365.2425.
The Julian-style rule of “every fourth year, no exceptions” averages 365.25, which is 0.0075 days a year longer. Over 400 years that is exactly the 3 days the Gregorian rule skips. A neat side effect is that 146,097 is divisible by 7 (it is 20,871 weeks), so the weekday pattern of the whole calendar repeats exactly every 400 years.
The century exceptions
| Year | Divisible by 4 | by 100 | by 400 | Leap year | Days in year | Days in February |
|---|---|---|---|---|---|---|
| 1700 | Yes | Yes | No | No | 365 | 28 |
| 1800 | Yes | Yes | No | No | 365 | 28 |
| 1900 | Yes | Yes | No | No | 365 | 28 |
| 2000 | Yes | Yes | Yes | Yes | 366 | 29 |
| 2100 | Yes | Yes | No | No | 365 | 28 |
The century exceptions make the number of leap years per century uneven:
| Years | Leap years in range |
|---|---|
| 1700–1799 | 24 |
| 1800–1899 | 24 |
| 1900–1999 | 24 |
| 2000–2099 | 25 |
| 2100–2199 | 24 |
From 2024 onward the leap years run 2024, 2028, 2032, 2036, 2040, 2044, 2048 and 2052, then continue every 4 years through 2096. After 2096 the next is 2104, because 2100 is skipped. That is a gap of 8 years instead of the usual 4.
Birthdays on February 29
A leap-day birthday comes around less often than people expect. A plain 4-year cycle has 1,461 days (3 × 365 + 366), with one February 29 in it. Across the full 400-year cycle there are 97 leap days in 146,097 days, so about one day in every 1,506 is a February 29.
- The calendar date itself only exists in leap years: from 29 February 2024 to 29 February 2028 is 1,461 days.
- Across the 2100 gap, 29 February 2096 to 29 February 2104 is 2,921 days.
- In other years, people and software differ on what to use. Adding 365 days to 29 February 2024 lands on 28 February 2025; adding 366 days lands on 1 March 2025. Date libraries pick one convention or the other, so check how your own tool treats “one year later”.
Which day counts for rules about ages or deadlines is a matter for the rules in question, not for the calendar.
Day-of-year and weekday effects
The leap day shifts everything after it by one day-of-year number and shifts weekdays across the year boundary:
| Measure | 2023 (common) | 2024 (leap) |
|---|---|---|
| 1 January falls on | Sunday | Monday |
| 28 February is day | 59 | 59 |
| 1 March is day | 60 | 61 |
| 1 March falls on | Wednesday | Friday |
| Days from 28 February to 1 March | 1 | 2 |
| Days from 1 February to 1 March | 28 | 29 |
| 31 December is day | 365 | 366 |
Two weekday rules follow. A date moves forward one weekday from one year to the next in a common year, and two weekdays when a 29 February sits between the two dates: 1 March 2023 was a Wednesday, 1 March 2024 a Friday. Twenty-eight years contain 7 leap days, 28 × 365 + 7 = 10,227 days, exactly 1,461 weeks, so the 2024 weekday layout returns in 2052.
The same effect matters for date arithmetic. From 1 March 2023 to 1 March 2024 is 366 days; from 1 March 2024 to 1 March 2025 is 365. A “365 days a year” shortcut for ages, subscriptions or interest is off by a day whenever a 29 February is crossed, which is why date tools count the calendar rather than multiplying.
Try it
To test any year, use the leap year calculator. To see the weekday for a date such as 29 February or 1 March, use the day of the week calculator, and to count how many days a span contains, with leap days included, the days between dates calculator. Every figure in this guide was computed with Python’s datetime module and fractions for the exact average, and the leap rule was checked against the standard library’s calendar.isleap for the years 1 to 9998.
For the day count itself, with and without a leap day in the range, see how to calculate the days between two dates.
Updated 2026-11-04