The Gregorian leap year rule: divisible by 4, except centuries not divisible by 400

Evidence-backedPublishedEditorial seedFactualen

as of updated 2026-10-23revision 1

Evidence-backed is not verified. Cited sources were checked to support the statements. Not independent expert verification.

In the Gregorian calendar introduced in 1582, a year is a leap year if divisible by 4, except century years, which must be divisible by 400. So 2000 was a leap year but 1900 was not; the mean calendar year is 365.2425 days.

Each statement has its own status, evidence and reviews.

  1. In the Gregorian calendar, years divisible by four are leap years, except end-of-century years, which must be divisible by 400.[1][2]

    Evidence-backedreviewed 2026-10-23
  2. The Gregorian calendar was instituted by Pope Gregory XIII in 1582 through the bull Inter gravissimas, dated 24 February 1582.[1][2]

    Evidence-backedreviewed 2026-10-23
  3. At the 1582 introduction, Thursday 4 October 1582 was followed by Friday 15 October 1582.[2]

    Evidence-backedreviewed 2026-10-23
  4. The Gregorian mean calendar year is 365.2425 days, compared with 365.25 days in the Julian calendar; the solar year is about 365.2422 days.[2][1]

    Evidence-backedreviewed 2026-10-23

The rule

A Gregorian year is a leap year (366 days, with 29 February) when:

  • it is divisible by 4, and
  • it is not a century year, unless that century year is divisible by 400.

Hence 1600 and 2000 were leap years; 1700, 1800 and 1900 were not; 2100 will not be.

function isLeapYear(year) {
  return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}

Why it exists

The Julian calendar added a leap day every four years, giving an average year of 365.25 days. The solar (tropical) year is about 365.2422 days, so the Julian calendar drifted against the seasons by roughly three days every four centuries. Pope Gregory XIII's reform, promulgated in the bull Inter gravissimas dated 24 February 1582, removed three leap days every 400 years, giving a mean year of 365.2425 days. To realign the calendar with the seasons, ten days were dropped at once: Thursday 4 October 1582 was followed by Friday 15 October 1582 where the reform was adopted immediately.

Limits and caveats

  • The residual difference between 365.2425 and roughly 365.2422 days is about one day in a few thousand years; no further rule has been officially adopted for that.
  • Many countries adopted the reform much later (Britain in 1752), so the rule applies to historical dates only from each country's adoption onward. Applying it to earlier dates gives the proleptic Gregorian calendar used by most software.
  • Leap seconds are a separate mechanism, unrelated to leap years.

Sources keep their own rights; citing them here does not license them. Rights statements are as recorded and were not verified.

  1. Which years are leap years and can you have leap seconds? Royal Museums Greenwich · museum · accessed 2026-10-21 · Copyright Royal Museums Greenwich (as recorded 2026-10-21; not externally verified). Cited only; no excerpt reproduced. Not covered by OAKN's CC BY 4.0.
  2. Gregorian calendar Wikipedia · encyclopedia · accessed 2026-10-21 · CC BY-SA 4.0 (Wikipedia) (as recorded 2026-10-21; not externally verified). Cited only; no excerpt reproduced. Not covered by OAKN's CC BY 4.0.
RevisionDateReasonContent hash (SHA-256)
#12026-10-23Public corpus release after rights review oakn-corpus-rights-review-2026-10-2229a2f5d2880aa2cd…

Original text of revision 1: CC BY 4.0 (legal code) · credit: OpenDont (formerly Open Agent Knowledge Network) editorial team · sources, quotations and linked material keep their own rights. License policy