Leap Year Checker
Result
| Leap year? | ||
|---|---|---|
| Days in year |
Share on Social Media:
Leap Year Checker — The Full Rule, Not the Half One
"Divisible by 4" is the rule everyone half-remembers — and it's wrong for century years. This free checker applies the complete rule (4, except 100, except-except 400), gives an instant verdict for any year, shows which test decided it, and lists nearby leap years. In-browser, no signup.
The Complete Rule in Three Steps
| Test | Result | Example |
|---|---|---|
| Not divisible by 4 | Common year | 2023, 2025 |
| Divisible by 4, not by 100 | Leap year | 2024, 2028 |
| Divisible by 100, not by 400 | Common year | 1900, 2100 |
| Divisible by 400 | Leap year | 2000, 2400 |
The exceptions matter rarely but decisively: across 1600–2400, exactly three century years (1700, 1800, 1900) and (2100, 2200, 2300) are not leap years, while 2000 is. Miss this and long-range date math drifts.
Why the Calendar Needs This Complexity
A solar year is 365.2422 days. The plain 4-year rule averages 365.25 — too long by 0.0078 days, accumulating to a full day every ~128 years. The Gregorian century rule removes 3 leap days per 400 years, tuning the average to 365.2425 and holding the calendar aligned with the seasons for millennia. This 1582 refinement is why spring equinox still lands near March 20 today instead of drifting into summer.
The Programmer's Leap Year Bug
Countless systems have failed on this. The correct check is: (year % 4 == 0 && year % 100 != 0) || year % 400 == 0. Naive code using only % 4 silently miscalculates 1900 and 2100 — bugs that lie dormant for decades then break date arithmetic, billing cycles, and scheduling. February 29 also breaks age calculations and recurring-event logic that assumes every year has the same dates.
Free and Instant
Any year checked locally with full reasoning — for planners, developers, and the perennial "wait, is this a leap year?" moment.