Skip to content
Everyday Utilities Free · No signup · Private · Instant results

Leap Year Checker

Check whether any year is a leap year, with the divisibility rules explained.

About the Leap Year Checker

This Leap Year Checker determines whether any given year is a leap year according to the Gregorian calendar rule, which was introduced by Pope Gregory XIII in October 1582. The rule is simple to state: a year is a leap year if it is divisible by 4, except for years divisible by 100, except for years divisible by 400. So 2000 was a leap year, 1900 was not, 2024 is, 2025 is not, 2100 will not be.

The reason leap years exist is that the Earth’s orbit around the Sun takes approximately 365.2422 days, not exactly 365. Adding one extra day every 4 years (the Julian calendar, introduced by Julius Caesar in 45 BCE) overcorrects to 365.25 days — an error of about 11 minutes per year. Over 16 centuries, this error accumulated to 10 days, causing the spring equinox to drift from March 21 to March 11. Pope Gregory XIII’s reform dropped 10 days (October 4, 1582 was followed by October 15, 1582) and introduced the ‘century’ rule to keep the calendar aligned with the solar year.

The Gregorian rule gives an average year length of 365 + 1/4 - 1/100 + 1/400 = 365.2425 days, which is 0.0003 days (about 26 seconds) longer than the actual solar year. The remaining drift will accumulate to about 1 day every 3,300 years — a problem for our descendants but not for any practical planning horizon.

How It Works

The leap-year check is implemented in JavaScript as: (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0). The modulo operator % returns the remainder of integer division, so year % 4 === 0 means ‘year is divisible by 4’.

The rule has three parts: (1) divisible by 4 → candidate leap year, (2) divisible by 100 → not a leap year (overrides rule 1), (3) divisible by 400 → leap year (overrides rule 2). The result is true (leap year) for years like 2000 (divisible by 4, by 100, and by 400) and false for years like 1900 (divisible by 4 and 100 but not by 400).

The ‘find next leap year’ function starts at year + 1 and increments until it finds a leap year. The ‘find previous leap year’ starts at year - 1 and decrements. For most years, the next leap year is 4 years away (e.g. from 2023, the next leap year is 2024). But for years just before a century non-leap (e.g. 2097, 2098, 2099, 2100 is NOT a leap year), the next leap year is 8 years away (2104).

The optional ‘range’ mode scans years from year-5 to year+5 and lists the leap years in that window. This is useful for spotting patterns — the 4-year gap is consistent except around century boundaries.

Worked Examples

2024 is a leap year (divisible by 4, not divisible by 100, so rule 1 applies). February 2024 has 29 days. Previous leap year: 2020. Next leap year: 2028.

2025 is NOT a leap year (not divisible by 4). Previous leap year: 2024. Next leap year: 2028.

2000 WAS a leap year (divisible by 4, by 100, AND by 400 — rule 3 overrides rule 2). This was the first quadricentennial leap year since 1600, and the first under the Gregorian calendar (the calendar was introduced in 1582, and 1600 was the first year divisible by 400 after the reform).

1900 was NOT a leap year (divisible by 4 and 100, but not by 400 — rule 2 overrides rule 1, and rule 3 does not apply). This is a classic test case: 1896 was a leap year, 1904 was a leap year, but 1900 was not. The 8-year gap from 1896 to 1904 is the longest gap between consecutive leap years in the Gregorian calendar.

2100 will NOT be a leap year (same rule as 1900). If you are planning a long-term calendar that includes 2100, this is the next ‘century non-leap’ year — relevant for any system that schedules events on February 29.

When to Use This Tool

  • Validating February 29 birthdays — if a user claims February 29 as their birthday, verify the year is a leap year.
  • Scheduling recurring annual events on February 29 (rare but real — some contracts use leap day as a milestone).
  • Software testing — leap-year edge cases are a common source of date-arithmetic bugs; test 1900, 2000, 2024, 2100.
  • Calendar design — printed calendars need to know whether February has 28 or 29 days.
  • Payroll processing — salaried employees on annual salary are sometimes paid more per day in leap years (366 vs 365 pay periods).
  • Teaching the Gregorian calendar and the history of calendar reform.
  • Long-term planning (century-scale) — e.g. capital depreciation schedules that span multiple centuries.

Limitations & Disclaimer

This tool implements the Gregorian leap-year rule (divisible by 4, except centuries, except quadricenturies). It does not support the Julian calendar (which was used in much of Europe before 1582 and in Russia before 1918) or other calendar systems (Hebrew, Islamic, Persian, Chinese) that have different leap rules. For dates before the Gregorian reform, the tool gives the ‘proleptic Gregorian’ answer — treating the Gregorian calendar as if it had applied retroactively — which is consistent with ISO 8601 but historically inaccurate. The astronomical year 0 (between 1 BCE and 1 CE in the proleptic Gregorian calendar) is supported via JavaScript’s Date object but has no historical analog. See our disclaimer for full terms.

Frequently Asked Questions

Why do we have leap years?

Because the Earth’s orbit around the Sun takes about 365.2422 days, not exactly 365. Without leap years, the calendar would drift by about 24 days per century — the spring equinox would shift from March 21 to February 25 over 100 years. Leap years add an extra day every 4 years (mostly) to keep the calendar aligned with the seasons.

Why is 2000 a leap year but 1900 is not?

The Gregorian rule says: divisible by 4 (yes, leap), except centuries (no, not leap), except quadricenturies (yes, leap). 1900 is divisible by 4 and by 100, but not by 400 — so rule 2 (century exception) applies and 1900 is NOT a leap year. 2000 is divisible by 4, 100, AND 400 — so rule 3 (quadricentennial exception to the exception) applies and 2000 IS a leap year.

What is the Julian calendar and why was it replaced?

The Julian calendar (introduced by Julius Caesar in 45 BCE) added a leap year every 4 years, giving an average year of 365.25 days. The actual solar year is 365.2422 days, so the Julian calendar gained about 11 minutes per year. Over 16 centuries, this accumulated to a 10-day drift. Pope Gregory XIII’s reform (1582) dropped 10 days and added the century rule to prevent future drift.

When was the Gregorian calendar adopted?

Catholic countries adopted it in 1582 (Italy, Spain, Portugal, Poland). Protestant countries adopted it later (Germany and the Netherlands in 1700, UK in 1752). Russia adopted it in 1918 (after the Bolshevik Revolution), Greece in 1923. The last country to switch was Turkey, in 1926. For dates before each country’s adoption, historians use the Julian calendar.

Will there ever be a year with no leap day?

Yes — 2100, 2200, 2300, 2500, etc. (all century years not divisible by 400). These years have 365 days, not 366. The 8-year gap between 2096 and 2104 is the longest gap between leap years in the Gregorian calendar. The 4-year gap is the most common.

Are there other calendars with different leap rules?

Yes — the Hebrew calendar adds a 13th month (Adar II) 7 times every 19 years. The Islamic calendar is purely lunar (354 days per year) with leap days added 11 times every 30 years. The Persian (Solar Hijri) calendar uses an astronomical rule based on the vernal equinox. The Chinese calendar adds an entire leap month roughly every 3 years. None of these is supported by this tool, which uses the Gregorian rule only.

Last updated: September 9, 2026  ·  Author: HT99 Tools Editorial Team