📅 Leap Year Calculator
A leap year calculator that checks any year against the Gregorian calendar rule and lists every leap year in a date range.
Leap years from 2026 to 2046 (5)
2028, 2032, 2036, 2040, 2044
What Leap Year Calculator Does
The Gregorian leap year rule looks like a simple "every 4 years" pattern until the century exception shows up, and that exception exists for a precise astronomical reason: Earth's orbit takes about 365.2422 days, not exactly 365.25. Adding a leap day every 4 years without exception would overcorrect, drifting the calendar out of sync with the seasons by about 3 days every 400 years — the divisible-by-400 exception for century years removes exactly enough leap days to fix that drift.
How to Use Leap Year Calculator
- Enter a year to check whether it is a leap year
- See the previous and next leap years
- Enter a range to list every leap year within it
Formula Used by Leap Year Calculator
Gregorian leap year rule
Leap year if (year % 4 = 0 AND year % 100 ≠ 0) OR (year % 400 = 0)
Worked example
Testing 1900, 2000, and 2024
- 1900: divisible by 4 and by 100, but not by 400 → not a leap year
- 2000: divisible by 4, by 100, AND by 400 → leap year
- 2024: divisible by 4, not by 100 → leap year
Result: 1900 = no, 2000 = yes, 2024 = yes
How to Read Your Result
The century exception is rare enough to catch people off guard
Century years only occur once every 100 years, and only 1 in 4 of those (the ones divisible by 400) are actually leap years — 1700, 1800, and 1900 were all NOT leap years despite being divisible by 4, which surprises people who only remember the simple "every 4 years" version of the rule.
The Gregorian calendar is still not perfectly synced to the solar year
Even with the 400-year correction, the Gregorian calendar drifts by about 1 day every 3,236 years relative to the true solar year — a remaining error small enough that no further correction has been formally adopted into civil calendars.
Limitations & Accuracy Notes
- This calculates leap years under the modern Gregorian calendar rule (adopted in 1582 and later, at different times in different countries) — historical dates before a given country's adoption used the older Julian calendar, which has a simpler (and less accurate) every-4-years rule with no century exception.
- Range queries are capped at 500 years to keep the output readable.