Home › Leap Years and How They Affect Date Math
Leap Years and How They Affect Date Math
By The Editors, Encore Editorial, Updated June 21, 2026
A leap year has 366 days instead of 365, with the extra day inserted as February 29. Any date span that crosses February 29 in a leap year is one day longer than the equivalent span in a non-leap year. The date calculator on this site handles leap years automatically, but understanding the rule helps you catch errors in manual calculations.
Why leap years exist
Earth takes approximately 365.2422 days to orbit the sun. A calendar with exactly 365 days per year would drift by about a quarter of a day per year, which adds up to roughly 1 full day every 4 years. Left uncorrected, the calendar would drift from the seasons: after 730 years without leap years, June 21 would fall in what we now call winter.
The Gregorian calendar corrects for this by adding one day (February 29) every 4 years. But 365.25 is still not exact: the true orbital year is 365.2422 days, not 365.25. The difference is small, but it adds up. To correct for it, century years (1800, 1900, 2100) are not leap years even though they are divisible by 4. However, years divisible by 400 (1600, 2000, 2400) are leap years, which fine-tunes the calendar further.
The three-part leap year rule
A year is a leap year if:
- It is divisible by 4, and
- It is either not divisible by 100, or it is divisible by 400.
In plain language:
- Every 4 years is usually a leap year: 2020, 2024, 2028, 2032...
- But century years (1800, 1900, 2100, 2200) are exceptions: not leap years.
- But 400-year years (1600, 2000, 2400) override the century exception: leap years.
For all practical date calculations in the range of 2000 to 2099, the simple rule works: if the year is divisible by 4, it is a leap year. 2024 is a leap year. 2025, 2026, 2027 are not. 2028 is a leap year.
Upcoming leap years
| Year | Leap year? | Note |
| 2024 | Yes | February 29, 2024 existed |
| 2025 | No | |
| 2026 | No | Current year |
| 2027 | No | |
| 2028 | Yes | Next leap year |
| 2032 | Yes | |
| 2100 | No | Century year; divisible by 4 but not 400 |
How a leap year shifts your date calculations
Whenever a date span crosses February 29 in a leap year, the result is one day longer than the same span in other years. Two examples:
- January 1 to March 1, 2026 (not a leap year): 59 days
- January 1 to March 1, 2024 (leap year): 60 days
If you are manually calculating a span that runs through February of an even year, confirm whether that year is a leap year before finalizing your count.
Worked examples crossing February in different years
| Start date | End date | Days | Leap year? |
| January 15, 2024 | March 15, 2024 | 60 | Yes; Feb 29 included |
| January 15, 2026 | March 15, 2026 | 59 | No; Feb has 28 days |
| February 28, 2024 | March 1, 2024 | 2 | Yes; Feb 29 is between these dates |
| February 28, 2026 | March 1, 2026 | 1 | No; Feb 28 is immediately followed by March 1 |
| December 1, 2027 | March 1, 2028 | 91 | Yes; crosses into leap year February |
Leap day birthdays: February 29
People born on February 29 exist. There are roughly 5 million of them worldwide. In non-leap years, they celebrate on February 28 or March 1 by custom. Legally, the rules vary. In many US states and in UK law, a person born February 29 is considered to have their birthday on March 1 in non-leap years for age-of-majority purposes. When counting this person's age in days, you must account for the fact that their birth date itself is a leap day that most years skip entirely.
For practical purposes: to find someone's age in days if they were born February 29, 2000, enter that exact date into the date calculator as the start date. It handles February 29 as a valid input date.
Leap years in software and spreadsheets
Most modern spreadsheet applications and programming languages handle leap years correctly. Excel, Google Sheets, Python's datetime module, and JavaScript's Date object all recognize February 29 in leap years. One historical exception: Excel treats 1900 as a leap year (it was not), a known bug introduced for Lotus 1-2-3 compatibility. For dates after 1900, this does not affect your calculations.
When building date logic in any system, test your calculations with dates around February 28-29 of a leap year to confirm the system handles them correctly.
Related guides
See how to calculate days between two dates for the core calculation that leap years can affect. See date duration: years, months, and days explained for how to break out a full date span that includes partial years.
Frequently asked questions
What is a leap year?
A leap year is a year with 366 days. The extra day is February 29. Leap years keep the calendar aligned with Earth's orbit around the sun.
How do you know if a year is a leap year?
A year is a leap year if it is divisible by 4. Exception: century years (1800, 1900, 2100) are not leap years. Exception to the exception: 400-year years (1600, 2000, 2400) are leap years. For 2001 through 2099, divisibility by 4 is the only rule you need.
What happens to a February 29 birthday in non-leap years?
By custom, people born on February 29 celebrate on February 28 or March 1. Legal age calculations typically use March 1 in non-leap years, but this varies by jurisdiction.
How does a leap year affect a date calculation?
Any span crossing February 29 in a leap year is one day longer than the same span in a non-leap year. January 1 to March 1 is 59 days in a non-leap year and 60 days in a leap year.
When is the next leap year?
The next leap year is 2028. After that: 2032, 2036, 2040. The year 2100 will not be a leap year despite being divisible by 4.