Leap Year Checker — Free Online
Check whether any year is a leap year using the exact Gregorian calendar formula. Also shows the previous and next leap years and total days in the year.
How to Use the Leap Year Checker
- Type any year into the input field — from 1 to 9999
- Click "Check Leap Year" to see the result immediately
- Leap years are highlighted in teal; non-leap years shown in gray
- The result also shows the previous and next leap years for reference
- Total days in the year (365 or 366) is displayed below the result
How the Leap Year Checker Works — The Formula
The Gregorian calendar uses a three-part rule to determine leap years. This rule was introduced in 1582 to correct the Julian calendar's accumulated drift of about 10 days.
isLeapYear(Y) =
(Y mod 4 = 0) ← divisible by 4 (basic rule)
AND
NOT (Y mod 100 = 0) ← EXCEPT century years
OR
(Y mod 400 = 0) ← UNLESS divisible by 400
Examples:
2024 → 2024÷4=506, 2024÷100≠0 → ✓ LEAP
1900 → 1900÷4=475, 1900÷100=19, 1900÷400≠0 → ✗ NOT LEAP
2000 → 2000÷400=5 → ✓ LEAP
Formula validated by Vipul Jaganiya, Computer Science expert in Calendar Mathematics and Timezone Engineering. This is the exact formula used in the proleptic Gregorian calendar, valid for all years.
Real-World Examples
| Year | Leap Year? | Days in Year | Reason |
|---|---|---|---|
| 2024 | ✓ Yes | 366 | Divisible by 4, not by 100 |
| 2026 | ✗ No | 365 | Not divisible by 4 |
| 2000 | ✓ Yes | 366 | Divisible by 400 |
| 1900 | ✗ No | 365 | Divisible by 100, not by 400 |
| 2100 | ✗ No | 365 | Divisible by 100, not by 400 |
| 2400 | ✓ Yes | 366 | Divisible by 400 |