Leap Year Calculator
The Rule Has Three Layers, Not One
Most people know that leap years happen every four years, but that rule alone would drift the calendar out of alignment with the solar year over centuries. The Gregorian calendar corrects for this with two additional exceptions layered on top of the basic rule, which is why century years like 1900 and 2100 are not leap years even though they're divisible by 4, while 2000 and 2400 are.
The Rule
1. Divisible by 4 → leap year
2. Unless also divisible by 100 → NOT a leap year
3. Unless also divisible by 400 → IS a leap year
2. Unless also divisible by 100 → NOT a leap year
3. Unless also divisible by 400 → IS a leap year
The Rule Applied to Real Years
| Year | Div. by 4 | Div. by 100 | Div. by 400 | Leap Year? |
|---|---|---|---|---|
| 1900 | Yes | Yes | No | No |
| 2000 | Yes | Yes | Yes | Yes |
| 2023 | No | No | No | No |
| 2024 | Yes | No | No | Yes |
| 2026 | No | No | No | No |
| 2100 | Yes | Yes | No | No |
| 2400 | Yes | Yes | Yes | Yes |
Century years are the only ones where the rule diverges from the simple "every 4 years" shortcut — 1900 and 2100 both break the every-4-years pattern, while 2000 and 2400 don't.
Where This Calculation Matters
- Software and financial date logic — systems that calculate age, interest accrual, or subscription periods need to handle February 29th correctly, and misjudging century years is a classic source of bugs.
- Long-range planning — anyone scheduling something for February 29th of a future year needs to confirm that year is actually a leap year first.
- Understanding calendar drift — the 100/400 exceptions exist because a year is roughly 365.2425 days, not exactly 365.25, and the extra correction keeps the calendar aligned with the seasons over centuries.
How to Use This Calculator
- Enter a year.
- Select Calculate to see whether it's a leap year, how many days it contains, and the nearest previous and next leap years.
Related Calculations
To see a full leap year's calendar grid, use the Calendar Calculator. For the exact span between two dates that might cross a leap day, see the Date Difference Calculator.