Leap Year Checker
Enter any year and see instantly whether it's a leap year, exactly why, and which leap years come next. Everything runs in your browser — nothing you type is sent anywhere.
The leap year rule, explained
A year is a leap year if it's divisible by 4 —
with one exception. Century years (years ending
in 00, like 1900 or 2100) are leap years only if
they're also divisible by 400. In code, that's:
(year % 4 === 0 && year % 100 !== 0) || year % 400 === 0
This exists because Earth's orbit takes about 365.2422 days, not a clean 365.25 — adding a leap day every 4 years alone would overcorrect the calendar by roughly 3 days every 400 years, so the century rule quietly removes 3 of those 100 leap days to keep things aligned.
Worked examples
| Year | ÷ 4 | ÷ 100 | ÷ 400 | Leap year? |
|---|---|---|---|---|
| 2024 | yes | no | — | Yes |
| 1900 | yes | yes | no | No (century exception) |
| 2000 | yes | yes | yes | Yes (exception's exception) |
| 2023 | no | — | — | No |
| 2100 | yes | yes | no | No (century exception) |
Not divisible by 4 at all (like 2023 or 2025) is disqualified immediately — the century check only ever matters for years that pass the first test.
Frequently asked questions
Why isn't every year divisible by 4 a leap year?
Because a real solar year is about 365.2422 days, not exactly 365.25. Adding a leap day every 4 years (365.25 average) overcorrects slightly, so the calendar drops 3 leap days every 400 years to compensate: century years (1700, 1800, 1900, 2100...) skip the leap day unless they're also divisible by 400. That's why 2000 was a leap year but 1900 and 1800 were not.
Was the year 2000 a leap year?
Yes. 2000 is divisible by 4 (2000 ÷ 4 = 500) and it's a century year (divisible by 100), but it's also divisible by 400 (2000 ÷ 400 = 5), so the century exception's exception applies and it IS a leap year.
Was the year 1900 a leap year?
No. 1900 is divisible by 4 (1900 ÷ 4 = 475), so it looks like it should be a leap year — but it's also a century year (divisible by 100) and it is NOT divisible by 400 (1900 ÷ 400 = 4.75), so the century exception applies and 1900 was a common, 365-day year.
What is a leap year for, exactly?
Earth takes roughly 365.2422 days to orbit the Sun, but calendar years count whole days. Without correction, the calendar would drift out of sync with the seasons by about a day every 4 years — after a few centuries, "summer" months would land in winter. Adding February 29 on leap years keeps the calendar aligned with the astronomical year to within about one day every 3,300 years.
How many days does February have in a leap year?
29 days instead of the usual 28 — February 29 is the leap day itself, and it's the only date on the calendar that doesn't exist in three out of every four years.