Quick Tools Logo Quick Tools

Leap Year Checker

Check whether a year is a leap year and find upcoming leap years.

Upcoming Leap Years

Leap Year Rules

  • A year is a leap year if it's divisible by 4
  • BUT if it's divisible by 100, it's NOT a leap year
  • UNLESS it's also divisible by 400, then it IS a leap year

Example: 2000 was a leap year (divisible by 400), but 1900 was not (divisible by 100 but not 400).

📘 How It Works

1

Divisibility by 4 Check

The first rule of the Gregorian calendar is that a year must be evenly divisible by 4 to be a leap year. This is checked using the modulo operator: year % 4 === 0. Most years that pass this test are leap years.

2

Century Year Exception

Years divisible by 100 are NOT leap years, even if divisible by 4. This exception exists because 365.25 days per year slightly overcompensates. For example, 1900 was not a leap year despite being divisible by 4.

3

400-Year Override

Years divisible by 400 ARE leap years, overriding the century exception. This fine-tunes the calendar to match Earth's actual 365.2422-day orbit. For example, 2000 was a leap year because it's divisible by 400.

4

Combined Rule Application

The complete formula is: (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0). This single expression implements all three rules, returning true for leap years and false otherwise.

5

Calendar Accuracy

This system keeps the Gregorian calendar synchronized with the solar year to within one day per 3,236 years. Without leap years, seasons would gradually shift through the calendar over centuries.

💡 Common Use Cases

Birthday on February 29

People born on February 29 ('leaplings') need to know when their actual birthday occurs. In non-leap years, they celebrate on February 28 or March 1.

Financial Calendar Planning

Accountants and financial planners need to account for the extra day in leap years when calculating daily rates, interest accrual, and annual budgets.

Software Development

Developers building date-handling systems must correctly implement leap year logic. Bugs in leap year calculation have caused notable system failures.

Historical Date Research

Historians and genealogists need to correctly count days in historical periods, accounting for leap years in both Gregorian and Julian calendars.

Educational Purposes

Students learning about calendars and astronomy can understand why we have leap years and practice the mathematical rules behind them.

Event Planning

Knowing upcoming leap years helps with long-term event planning, especially for recurring annual events that may be affected by the extra February day.

Related Time & Date Tools