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

1

Enter any year

Type a past, present, or future year into the input field.

2

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.

3

View upcoming leap years

Browse the list of the next several leap years starting from today.

4

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?
Earth takes approximately 365.24219 days to orbit the sun (one tropical year). A calendar year of 365 days falls behind the solar year by about 6 hours annually. After 4 years, the cumulative drift is ~24 hours — a full day. Adding a leap day every 4 years compensates for this accumulated drift and keeps the calendar aligned with the seasons.
Why is 1900 not a leap year but 2000 is?
The 4-year rule slightly overcorrects, adding too many days over centuries. Every 100 years, a leap day is skipped (removed) to correct this. But this correction is slightly too aggressive — every 400 years, the skipped leap day is added back. So: 1900 is divisible by 4 and by 100, but not by 400 → NOT a leap year. 2000 is divisible by 4, 100, AND 400 → IS a leap year. The next century exception after 2000 will be 2100 — NOT a leap year.
How many leap days will there be between 2000 and 2100?
From 2000 to 2099, the leap years are 2000, 2004, 2008, ... 2096 — that's 25 leap years × 1 day = 25 extra days. 2100 is NOT a leap year (divisible by 100 but not 400). So the 21st century (2001–2100) has exactly 24 leap days (2004, 2008, ... 2096), and the century started with a leap day in 2000 (which was the 20th century's last leap year).
What is a leap second and is it different from a leap day?
Yes, they are completely different mechanisms. Leap days are added to the Gregorian calendar to synchronize it with Earth's orbital period (one year). Leap seconds are added to UTC (Coordinated Universal Time) to synchronize atomic clock time with Earth's rotation (which slows slightly over time). As of 2024, 27 leap seconds have been added since 1972. Unlike predictable leap days, leap seconds are announced only 6 months in advance.
What happens to people born on February 29?
People born on February 29 are called 'leaplings.' For legal and practical purposes, their birthday in non-leap years is recognized as either February 28 or March 1 depending on jurisdiction. In most of the US and Canada, the legal birthday defaults to February 28. In the UK, the legal birthday is treated as March 1. Leaplings have technically had a 'true' birthday once every 4 years — a 40-year-old leapling has had only 10 February 29 birthdays.

Related Tools

Explore other tools in this category.

Looking for something else?