Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
The Gregorian calendar's leap year rule is more nuanced than the "every 4 years" shortcut most people learned in school: a year is a leap year if it's divisible by 4, EXCEPT century years (divisible by 100) — UNLESS that century year is also divisible by 400. That's why 2000 was a leap year but 1900 and 2100 are not, even though all three are divisible by 4. The reason this extra rule exists at all comes down to astronomy: Earth actually takes about 365.2425 days to orbit the sun, not a clean 365.25. Adding a leap day every 4 years (365.25 average) overcorrects very slightly, and over centuries that small overcorrection would add up to real calendar drift. The century-year exception (and the further 400-year exception to that exception) was introduced specifically to correct for this, keeping the Gregorian calendar accurate to within about one day every 3,300 years or so. This tool checks any year against the complete, correct rule and reports both whether it's a leap year and the exact day count (365 or 366 days) for that year, along with the reasoning behind the answer rather than just a bare yes or no.
How it works
Enter any year. The tool checks divisibility in the correct order: first, is the year divisible by 4? If not, it's not a leap year. If yes, is it also divisible by 100? If not, it is a leap year. If it is divisible by 100, is it also divisible by 400? If yes, it is a leap year (like 2000); if no, it is not (like 1900 or 2100). The tool reports which branch of the rule applied to your specific year, along with the resulting day count.
- Enter year.
- Click Calculate to see your results.
Examples
A simple leap year
2024 is divisible by 4 and not divisible by 100, so it is a leap year with 366 days — the straightforward case that covers the vast majority of leap years.
A century-year exception
1900 is divisible by 4 and by 100, but NOT by 400 — so it is NOT a leap year, unlike most other years divisible by 4, and it has only 365 days.
The 400-year exception to the exception
2000 is divisible by 4, by 100, AND by 400 — so despite being a century year, it IS a leap year with 366 days, the rare case that trips up the "every 100 years is not a leap year" shortcut.
Who should use it
- Checking whether February has 29 days in a given year.
- Date-math and scheduling logic that needs to handle leap years correctly.
- Verifying a century-year edge case in date-handling software.
Industry applications
- Software development (date/calendar logic)
- Education
Advantages
- Applies the complete, correct 3-part Gregorian rule.
- Shows the exact reasoning, not just a yes/no answer.
- Reports the resulting day count for the year.
Limitations
- Covers the Gregorian calendar only — other calendar systems use different leap-year rules.
Common mistakes to avoid
- Assuming every year divisible by 4 is automatically a leap year, missing the century-year exception.
- Assuming every century year (like 1900 or 2100) is never a leap year, missing the further exception for years divisible by 400.
- Forgetting to apply the rule when writing date-handling code, causing an off-by-one-day bug specifically in century years.
Best practices
- Use this for any date-math edge case involving February 29th or year-length calculations spanning a century boundary.
- When testing date-handling software, always include a century year (like 1900 or 2100) and a 400-divisible year (like 2000) as edge cases.
- Double-check any manually written leap-year logic against this full 3-part rule rather than relying on the simpler "every 4 years" approximation.
Tips
- If you're writing date-handling code, this rule (÷4 and not ÷100, or ÷400) is the exact logic to implement — test it against 1900, 2000, and 2100 as your edge cases.
- Remember that the century-year exception only changes the outcome for 3 out of every 400 years, so it's easy to overlook in casual testing.