The Gregorian calendar adds an extra day, February 29, to most years divisible by 4 in order to keep the calendar aligned with Earth’s actual orbit around the sun. Without this adjustment, the calendar would gradually drift out of sync with the seasons, since a year doesn’t consist of a perfectly round number of days. Understanding the specific rule — and why it’s more complicated than “every four years” — explains why some century years like 1900 skip leap day entirely while others like 2000 don’t.
Why Leap Years Exist at All
A calendar year is meant to track the tropical year — the actual time it takes Earth to complete one orbit around the sun, which is approximately 365.2422 days. Since a calendar can only use whole numbers of days, a plain 365-day year falls short of the true tropical year by about 0.2422 days annually. Left uncorrected, this small gap would compound significantly over time — over a century, the calendar would drift from the seasons by about 24 days, meaning the start of spring would gradually shift from around March 20 to April 13. Adding a leap day periodically corrects for this mismatch, keeping calendar dates aligned with the actual astronomical seasons.
The Basic Rule
The Gregorian leap year rule follows three simple conditions applied in sequence:
- If the year is divisible by 4, it’s a leap year…
- …unless it’s also divisible by 100, in which case it’s not a leap year…
- …unless it’s also divisible by 400, in which case it is a leap year after all.
Applied straightforwardly: 2024 is divisible by 4 but not 100, so it’s a leap year. 1900 is divisible by both 4 and 100, but not 400, so it’s not a leap year. 2000 is divisible by 4, 100, and 400, so it is a leap year. This is why century years are the exception to watch for — most people correctly assume “divisible by 4” but forget that century years need to also clear the 400 test.
Why the Rule Needed Extra Exceptions
The earlier Julian calendar, which the Gregorian calendar replaced, simply added a leap day every four years without exception — including every century year. That approach over-corrected, adding roughly three too many leap days every 400 years, which caused the calendar to drift out of alignment with the seasons over centuries. When Pope Gregory XIII introduced the reformed calendar in 1582, the added rule eliminating three out of every four century leap years fixed this overcorrection, while realigning the calendar so spring reliably began around March 21.
The Math Behind the 400-Year Cycle
The Gregorian system produces exactly 97 leap years in every 400-year cycle. Here’s how that number is reached: within 400 years, there are 100 candidate years divisible by 4, but three of the four century years within that span (those not divisible by 400) are excluded, leaving 97 leap years. This works out to an average calendar year length of 365.2425 days — remarkably close to the true tropical year of about 365.2422 days, off by only around 0.0003 days per year, or roughly one day of drift every 3,200 years. That’s a dramatic improvement over the Julian calendar’s drift rate of about one day every 128 years.
A Quick Reference
To check whether any given year is a leap year:
- Not divisible by 4 → common year (no leap day)
- Divisible by 4, not by 100 → leap year
- Divisible by 100, not by 400 → common year (no leap day, despite being divisible by 4)
- Divisible by 400 → leap year
Using this, upcoming leap years include 2028, 2032, and 2036, while 2100 will not be a leap year, since it’s divisible by 100 but not 400 — meaning anyone born in 2096 won’t see another February 29 land on a “round” century boundary again until 2104.
An Even Finer Correction Some Have Proposed
Because the Gregorian average of 365.2425 days still isn’t a perfect match for the true tropical year, a small residual drift of about one day every 3,200 years remains. Some astronomers and hobbyist calendar reformers have informally proposed an additional rule — treating years divisible by 4000 as common years rather than leap years — to correct this remaining discrepancy even further. This 4000-year rule has no official governmental or astronomical authority behind it, though, and isn’t part of the internationally recognized Gregorian calendar; it remains a theoretical refinement discussed mostly among calendar enthusiasts rather than an adopted standard.
Join The Discussion
The 4/100/400 leap year rule is one of those systems most people follow without ever learning the reasoning behind it, until a tricky century-year question stumps them. Did you know the rule had century-year exceptions before reading this, or has a “is this a leap year” question ever caught you off guard? Share your thoughts, coding gotchas you’ve run into with leap year logic, or questions about how other calendar systems handle this same problem.