📆 Leap Year Checker

Enter a year to check whether it's a leap year under the Gregorian calendar rule: divisible by 4, except century years, unless also divisible by 400.

The rule the checker applies

Three tests, in order, exactly as the Gregorian calendar defines them:

leap = (year % 4 == 0 AND year % 100 != 0) OR year % 400 == 0

So 2024 is a leap year, 1900 was not, and 2000 was. The century exception is the part people miss: 2100, 2200 and 2300 are all ordinary 365-day years, and only 2400 gets a 29 February. That is why the checker also prints the previous and next leap year - around a skipped century the gap is eight years, from 2096 straight to 2104, not the usual four.

Why the calendar is built this way

A solar year is about 365.2422 days. Adding a day every four years overshoots slightly, so three leap days are dropped every 400 years, giving an average of 365.2425 days - close enough to drift only about one day in 3,200 years. The Julian calendar had no century exception, which is how it fell ten days behind by 1582.

Years before 1582 are answered by the same arithmetic, so they describe the proleptic Gregorian calendar rather than the Julian one actually in use at the time. Historical dates from that period need care.

Frequently asked questions

Is 2100 a leap year?

No. It is divisible by 4 and by 100 but not by 400, so the century exception applies and February 2100 has 28 days.

Why was 2000 a leap year when 1900 was not?

2000 divides by 400 and 1900 does not. The 400 rule exists to put back one leap day in every four skipped centuries, which is what keeps the calendar aligned with the seasons.

How many days are in a leap year?

366 - 52 weeks and 2 days rather than the usual 52 weeks and 1 day, which is why a fixed date can jump forward two weekdays across a leap year instead of one.