EthicalFusion

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:

  1. it is divisible by 4, and
  2. it is not divisible by 100, unless it is also divisible by 400.
YearTestLeap year?
2024Divisible by 4, not by 100Yes
2026Not divisible by 4No
1900Divisible by 100, not by 400No
2000Divisible by 400Yes
2100Divisible by 100, not by 400No

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.

Frequently asked questions

Is 2100 a leap year?
No. It is divisible by 100 but not by 400, so it is a common year with 365 days. After 2096, the next leap year is 2104.
When is the next leap year after 2026?
2028, followed by 2032, 2036 and 2040.
Why was 2000 a leap year but 1900 was not?
Century years are leap years only when divisible by 400. 2000 passes that test and 1900 does not.
How many days are in a leap year?
366, because February has 29 days instead of 28.
Does the checker work for years before 1582?
It applies the modern Gregorian rule to every year, so results for dates before a country adopted that calendar can differ from historical Julian records.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.