Leap Year Calculator
Check if any year is a leap year and see upcoming leap years.
Leap Year Checker
Algorithm Rules:
- The year must be evenly divisible by 4;
- If the year can also be evenly divided by 100, it is not a leap year;
- Exception: if the year is also evenly divisible by 400, then it is a leap year.
How to Use
Enter any year
Type a past, present, or future year into the input field.
Check the three-rule result
See whether the year passes the divisible-by-4, by-100, and by-400 rules with the result clearly shown.
View upcoming leap years
Browse the list of the next several leap years starting from today.
Verify century year edge cases
Test years like 1900 and 2000 to understand the century exception rule.
What is a Leap Year?
A leap year contains one additional day (February 29th) to keep the calendar year synchronized with the astronomical year or seasonal year.
Real-World Examples & Use Cases
Software Date Validation and Testing
Developers writing date validation logic, calendar applications, and date arithmetic code need to test leap year handling. February 29 is a common edge case that reveals bugs in date input validation (accepting or rejecting 2024-02-29), date arithmetic (adding 1 year to Feb 29), and date sorting algorithms. A leap year checker helps developers quickly identify which test years to use: 2020, 2024 (leap years) and 1900, 2100 (century non-leap years) cover the important edge cases for software test suites.
Age and Anniversary Calculations
People born on February 29 (called 'leaplings') have birthdays only every four years in strict calendar terms. Legal systems handle this differently by jurisdiction — some consider Feb 28 the official birthday in non-leap years, others use March 1. Knowing whether a year is a leap year helps calculate ages for Feb 29 birthdays accurately. Similarly, couples with February 29 wedding anniversaries need to know which years to officially celebrate.
Calendar Planning and Scheduling Systems
Building calendar applications, scheduling tools, and recurring event systems requires correctly knowing which years have 366 days rather than 365. A recurring 'end of February' event must correctly land on February 28 or 29 depending on the year. Annual report deadlines, quarterly financial period end dates, and recurring billing cycles that use month-end dates are affected by whether February has 28 or 29 days in a given year.
Historical Research and Date Verification
Historians and genealogists working with historical records encounter dates that need leap year verification. Whether a particular year in a historical document was a leap year affects the calculation of exact dates from partial records. The Julian calendar had a simpler leap year rule (every 4 years, no century exception) than the Gregorian, causing historical confusion for dates before 1582 (when the Gregorian calendar was introduced) that require understanding both calendar systems.
How It Works
Gregorian Calendar Leap Year Rules: A year IS a leap year if: 1. Divisible by 4 (basic 4-year cycle) AND one of: a. NOT divisible by 100 (century exception) b. OR divisible by 400 (400-year exception) Boolean expression: isLeapYear = (year % 4 === 0) && ((year % 100 !== 0) || (year % 400 === 0)) Verification examples: 2024: 2024 % 4 = 0 ✓, 2024 % 100 ≠ 0 ✓ → LEAP YEAR 2023: 2023 % 4 = 3 ✗ → NOT a leap year 2000: 2000 % 4 = 0 ✓, 2000 % 100 = 0, 2000 % 400 = 0 ✓ → LEAP YEAR 1900: 1900 % 4 = 0 ✓, 1900 % 100 = 0, 1900 % 400 = 300 ✗ → NOT a leap year Why these rules? The solar year ≈ 365.24219 days Adding a leap day every 4 years: ≈ 365.25 days/year Removing leap day at centuries: ≈ 365.24 days/year Restoring at multiples of 400: ≈ 365.2425 days/year This keeps the calendar aligned with Earth's orbit Julian Calendar (pre-Gregorian): Simpler rule: divisible by 4 is always a leap year (No century exception — drifts about 1 day per 128 years)
Frequently Asked Questions
Why is every 4th year a leap year?▼
Why is 1900 not a leap year but 2000 is?▼
How many leap days will there be between 2000 and 2100?▼
What is a leap second and is it different from a leap day?▼
What happens to people born on February 29?▼
Related Tools
Explore other tools in this category.
Age Calculator
Calculate your exact age in years, months, and days based on your date of birth.
Age in Days & Hours
Find exactly how old you are in years, months, weeks, days, hours, and minutes.
Countdown Timer
Set a custom countdown with hours, minutes, and seconds. Pause, resume, and use quick presets.
Timezone Converter
Convert any date and time between world timezones. Includes a live clock mode and multi-zone comparison.
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa. Shows a live current timestamp.
Date Difference Calculator
Find the exact chronological difference in years, months, and days between two historical or future dates.