Leap Year Checker
Check if any year is a leap year and find the next leap year.
Was this tool helpful?
Thanks for the feedback!
Enter a year and this checker tells you whether it is a leap year, how many days it has, how many days February has, and which year is the next leap year. It is a quick reference for students learning the calendar rule, programmers testing date code and anyone planning around 29 February.
The leap year rule
Under the Gregorian calendar, which the checker applies, a year is a leap year when:
- it is divisible by 4, and
- it is not divisible by 100, unless it is also divisible by 400.
| Year | Test | Leap year? |
|---|---|---|
| 2024 | Divisible by 4, not by 100 | Yes |
| 2026 | Not divisible by 4 | No |
| 1900 | Divisible by 100, not by 400 | No |
| 2000 | Divisible by 400 | Yes |
| 2100 | Divisible by 100, not by 400 | No |
For 2026 the checker reports 365 days, February with 28 days, and 2028 as the next leap year. Entering 2096 shows why the "next leap year" line is useful: the answer is 2104, not 2100, because 2100 is skipped.
Why the rule has three parts
The Earth takes about 365.2422 days to return to the same point in its seasons. The older Julian calendar added a leap day every four years, averaging 365.25 days, which is about 11 minutes too long each year. Over centuries that drift pushed the calendar out of line with the equinoxes, so in 1582 the Gregorian reform removed ten days and dropped three leap days every 400 years. Its average year of 365 + 1/4 − 1/100 + 1/400 = 365.2425 days is off by only about one day in more than 3,000 years.
Where leap years affect real calculations
- Financial years: an Indian financial year running from April 2027 to March 2028 contains 29 February 2028, so it has 366 days. Anything calculated per day, such as daily interest or per-day pay, can differ slightly from a normal year.
- Date arithmetic: "one year after 29 February 2028" has no exact match in 2029; software typically lands on 28 February or 1 March, depending on how it is written.
- Birthdays: the chance of being born on 29 February is about 1 in 1,461, the number of days in a four-year cycle. Most leap-day babies celebrate on 28 February or 1 March in other years.
- The Indian national calendar: the Saka calendar follows the same leap years, giving its first month, Chaitra, 31 days instead of 30 in a leap year.
Checking in code
The same test in most programming languages is (y % 4 === 0 && y % 100 !== 0) || y % 400 === 0. A classic bug is testing only divisibility by 4, which wrongly treats 1900 and 2100 as leap years. In spreadsheets, checking whether 29 February of the year is a valid date is a common shortcut.
Historical years and input limits
The checker applies the Gregorian rule to every year, including those before 1582. Historical records from before a country switched calendars used the Julian system, in which every fourth year was a leap year; 1500, for example, was a leap year then, although the checker reports it as a common year. Britain and its colonies switched only in 1752. Year 0 is not accepted, and decimals are rounded down to a whole year. To count days between two dates across February, try the Date Difference Calculator.