About the Leap Year Calculator
A calendar year is meant to track one trip of Earth around the Sun, but that orbit actually takes about 365.2422 days — not a clean 365. Left uncorrected, the calendar would drift out of sync with the seasons by roughly a day every four years. Leap years fix that drift by adding one extra day, February 29, to most years divisible by 4.
The Gregorian leap year rule
The Gregorian calendar, used almost everywhere today, applies three tests in order:
- Divisible by 4: the year is a leap year — unless it also passes the next test.
- Divisible by 100: the year is not a leap year — unless it also passes the next test.
- Divisible by 400: the year is a leap year after all.
So the full rule is: a year is a leap year if it's divisible by 4, except century years (divisible by 100), which are leap years only if also divisible by 400. That's why 2000 was a leap year, but 1900 and 2100 are ordinary 365-day years even though both are divisible by 4.
Why the extra correction is needed
A plain "every 4 years" rule alone would overcorrect: 365.25 days per year is slightly more than the true 365.2422-day tropical year, adding roughly 3 extra days every 400 years. Dropping 3 leap days per 400 years — the three century years not divisible by 400 — brings the average Gregorian year to 365.2425 days, within about 26 seconds of the actual tropical year. That's accurate enough that the calendar won't be a full day out of alignment with the seasons for roughly 3,300 years.
How many leap years occur
Under this rule, exactly 97 of every 400 consecutive years are leap years: 100 years divisible by 4, minus 4 century years not divisible by 400, plus the 1 century year that is divisible by 400 (100 − 4 + 1 = 97). This calculator counts leap years across any custom range using that same logic: (years divisible by 4) − (years divisible by 100) + (years divisible by 400).
A brief history
The Julian calendar (46 BCE) used a simpler rule — a leap year every 4 years, with no century exception — which drifted about 3 days every 400 years. By 1582 that drift had pushed the calendar 10 days out of alignment with the equinox, prompting Pope Gregory XIII's reform: the current century-year exception was introduced, and 10 days were skipped to realign the calendar.
Assumptions used here
This calculator applies the modern Gregorian rule to any year entered, including years before 1582 (a "proleptic" Gregorian calendar). If you're checking historical dates that were actually recorded under the Julian calendar — which some countries used as late as the early 20th century — the leap year pattern in force at the time was simpler (every 4 years, no century exception), so results here won't always match historical records for those years.