Leap Year Checker

A leap year occurs when an extra day (February 29) is added to the calendar to keep it synchronized with Earth's orbit around the Sun. The Gregorian calendar uses a three-part rule: a year is a leap year if it is divisible by 4, except for century years (ending in 00), which must be divisible by 400. This is why 2000 was a leap year but 1900 was not. Our leap year checker explains exactly which rule applies to any year you enter, helps you find the next upcoming leap year, browse past leap years, and list every leap year between two dates.

star 4.9
New

Leap Year Checker calculator

Quick:

calendar_month Upcoming Leap Years

2024 ✓ Was a leap year
2028 ✓ Next leap year
2032 ✓ Leap year
2036 ✓ Leap year
2040 ✓ Leap year
2044 ✓ Leap year
2096 ✓ Leap year
2100 ✗ NOT a leap year

rule The 3-Part Rule

1.

Divisible by 4

2024 ÷ 4 = 506 ✓ — base rule

2.

Except century years

1900 ÷ 100 = 19 ✗ — exception

3.

Unless divisible by 400

2000 ÷ 400 = 5 ✓ — override!

(y%4==0 && y%100!=0)
|| y%400==0

lightbulb Quick Facts

  • Leap year = 366 days (extra Feb 29)
  • Earth's year ≈ 365.2425 days
  • 97 leap years every 400 years
  • 2100, 2200, 2300 are NOT leap years
  • Next 400-year leap: 2400

The Formula

The Gregorian calendar corrects for the fact that Earth takes approximately 365.2425 days to orbit the Sun. Adding one day every 4 years slightly overcorrects, so century years (divisible by 100) skip the leap day, except every 400 years when the correction is needed again.

Leap year if: (year % 4 == 0 AND year % 100 ≠ 0) OR (year % 400 == 0)

lightbulb Variables Explained

tips_and_updates Pro Tips

1

The year 2000 was a leap year because it is divisible by 400 — this confused many early computers.

2

Leap years always fall on even years ending in 0, 4, 8, or (sometimes) 2 and 6.

3

February 29 birthdays are celebrated on February 28 or March 1 in non-leap years depending on local tradition.

4

The next century-year exception is 2100 — NOT a leap year despite being 4 years after 2096.

5

Adding a leap day every 4 years corrects for ~6 hours/year Earth takes beyond 365 days.

A leap year checker determines whether any given year contains an extra day — February 29 — based on the Gregorian calendar's precise three-part rule. Earth takes approximately 365.2422 days to complete one orbit around the Sun, meaning a standard 365-day year gradually drifts out of sync with astronomical seasons. Without correction, the calendar would shift by about one full day every four years, and after several centuries, winter would arrive in what the calendar calls summer. The leap year system adds an extra day every four years to compensate, but this slightly overcorrects (adding 0.0078 days too many per cycle), so century years are excluded unless they are divisible by 400. The complete rule: a year is a leap year if it is divisible by 4, unless it is also divisible by 100, unless it is also divisible by 400. This elegant algorithm reduces the average calendar year to 365.2425 days, keeping seasonal alignment accurate to within one day per 3,236 years.

The Three-Part Gregorian Leap Year Algorithm

The leap year rule consists of three nested conditions that progressively refine calendar accuracy.

  • First, any year divisible by 4 is a candidate leap year — this basic cycle corrects for the 0.2422-day annual surplus.
  • Second, century years (divisible by 100) are excluded from leap years because the four-year correction overcounts by 0.0078 days per cycle, accumulating to about 3 extra days every 400 years.
  • Third, years divisible by 400 are restored as leap years, putting back one of those three skipped days.

The result: 400 years contain exactly 97 leap years (not 100), producing an average year length of 365.2425 days.

Recent examples illustrate the rule:

  • 2024 was a leap year (divisible by 4, not a century year).
  • 1900 was NOT a leap year (divisible by 100 but not 400).
  • 2000 WAS a leap year (divisible by 400).

The next century-year exception is 2100, which will not be a leap year despite being divisible by 4.

Historical Origins and Calendar Reform

The Julian calendar, introduced by Julius Caesar in 45 BCE, used a simpler rule: every fourth year is a leap year, period. This produced an average year of 365.25 days — close but not close enough. Over 1,600 years, the Julian calendar drifted 10 days from astronomical reality. By the 1500s, the spring equinox fell on March 11 instead of March 21, disrupting the calculation of Easter.

Pope Gregory XIII commissioned the Gregorian calendar reform in 1582, which skipped 10 days (October 4 jumped to October 15) and introduced the century/400-year exceptions.

Catholic countries adopted it immediately, but Protestant and Orthodox nations resisted for decades to centuries — Britain and its colonies did not switch until 1752, requiring an 11-day skip by that point. Russia did not adopt the Gregorian calendar until 1918. Today, the Gregorian calendar is the international civil standard used by virtually every country.

Leap Year Facts and Edge Cases

People born on February 29 — called leaplings — face unique practical challenges. Approximately 4.1 million people worldwide have a February 29 birthday, representing about 1 in 1,461 people. In most legal jurisdictions, leaplings age on March 1 in non-leap years for purposes like driver's licenses and voting eligibility, though some countries use February 28. The odds of being born on February 29 are slightly less than 1/1,461 because hospitals historically scheduled fewer induced deliveries and cesarean sections on leap day.

Programmers must handle leap years carefully — the 2000 bug concerned whether systems would correctly identify 2000 as a leap year (divisible by 400) rather than excluding it as a century year.

Leap seconds, a separate concept, are occasionally added to UTC to account for the slowing of Earth's rotation, but these are unrelated to the leap year calendar correction.

What Is a Leap Year and Why Does February Get an Extra Day?

A leap year is a calendar year containing 366 days instead of the usual 365, with the extra day added as February 29.

This adjustment exists because Earth does not orbit the Sun in a whole number of days — it takes roughly 365.2422 days, according to the US Naval Observatory. If the calendar ignored that leftover quarter-day, the seasons would slowly slide out of alignment with the dates, and after about 700 years, December would fall in what we now call summer. Adding one day every four years absorbs most of that surplus.

February was chosen for the extra day because, in the ancient Roman calendar it descended from, February was the last and shortest month of the year, as Encyclopaedia Britannica notes.

How to Check If a Year Is a Leap Year (Step by Step)

To check any year, apply the Gregorian rule in three ordered steps.

  • Step 1: divide the year by 4 — if there is a remainder, it is not a leap year and you can stop.
  • Step 2: if it divides evenly by 4, check whether it is also divisible by 100; if it is not, it is a leap year.
  • Step 3: if it is divisible by 100, check divisibility by 400 — divisible means leap year, not divisible means common year.

Worked example: 2024 ÷ 4 = 506 with no remainder, and 2024 is not a century year, so 2024 is a leap year. Contrast 2023 ÷ 4 = 505.75, so 2023 is a common year. This tests basic divisibility, a concept Khan Academy covers in its arithmetic curriculum.

The Leap Year Formula and Modular Arithmetic Behind It

The leap year test is a compact expression in modular arithmetic: a year Y is a leap year when (Y mod 4 = 0 AND Y mod 100 ≠ 0) OR (Y mod 400 = 0). The 'mod' operator returns the remainder after division, a function Wolfram MathWorld defines as the congruence relation.

The two clauses combine so that the divisible-by-4 rule applies broadly, the divisible-by-100 clause carves out century years, and the divisible-by-400 clause restores every fourth century.

In most programming languages the percent sign (%) is the modulo operator, so the condition reads exactly as (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0). Because the logic is pure integer arithmetic, it requires no calendar lookup table and evaluates identically for any year, past or future.

How Many Leap Years Are in a 400-Year Cycle?

There are exactly 97 leap years in every 400-year Gregorian cycle, not 100.

The counting works like this: 400 ÷ 4 = 100 years divisible by 4, then subtract the 3 century years that are divisible by 100 but not 400 (such as 2100, 2200, and 2300), leaving 100 − 3 = 97. That gives an average calendar-year length of 365 + 97/400 = 365.2425 days, which is remarkably close to the astronomical year.

A full 400-year cycle therefore contains 400 × 365 + 97 = 146,097 days. A neat consequence: 146,097 is exactly divisible by 7 (146,097 ÷ 7 = 20,871), so the Gregorian calendar repeats its weekday pattern every 400 years, meaning any given date falls on the same weekday it did four centuries earlier.

What Years Are Leap Years? Recent and Upcoming Leap Years

Leap years generally fall on years divisible by 4. Recent leap years include 2016, 2020, and 2024, and the upcoming leap years are 2028, 2032, 2036, 2040, and 2044.

The pattern only breaks at century years: 1700, 1800, and 1900 were common years, while 2000 was a leap year because it is divisible by 400. Looking further ahead, 2100, 2200, and 2300 will all be common years, and the next century leap year will be 2400.

Because leap years land on even numbers ending in 0, 4, or 8 within a century, a quick shortcut for two-digit checks is to see whether the last two digits form a number divisible by 4 — as long as the year is not a century year needing the 400 test.

Real-World Uses of Leap Year Calculations

Leap year logic matters far beyond trivia.

  • Software developers must handle February 29 correctly in date libraries, scheduling systems, and financial software — a 2016 payment-processing glitch and the well-known Year 2000 concern both traced back to mishandled leap rules, where systems risked treating 2000 as a common year.
  • Payroll and interest calculations that use actual-day counts depend on knowing whether a year has 365 or 366 days.
  • Astronomers and calendar designers use the 365.2425-day average to keep civil time aligned with the tropical year.
  • Genealogists and historians converting dates across the 1582 Julian-to-Gregorian transition must account for differing leap rules.
  • Even birthday and age calculators need leap logic so that someone born on February 29 is handled consistently, a point relevant to leaplings tracking their legal age.

Common Mistakes When Checking Leap Years

  • The most frequent error is applying only the 'divisible by 4' rule and forgetting the century exceptions — this wrongly labels 1900 and 2100 as leap years when both are common years.
  • A second mistake is the reverse: assuming all century years are skipped, which incorrectly excludes 2000 and 2400 even though both are divisible by 400 and are true leap years.
  • A third pitfall is confusing leap years with leap seconds; leap seconds are irregular one-second adjustments to Coordinated Universal Time for Earth's rotation and follow no fixed pattern, unrelated to the calendar leap-day rule.
  • Finally, some people misremember Julian versus Gregorian rules for historical dates before 1582, when every fourth year was a leap year with no century exception, which can shift historical date conversions by several days.

Leap Year vs Leap Second: What's the Difference?

A leap year and a leap second solve two entirely different timekeeping problems.

A leap year adds a whole day (February 29) on a predictable schedule to keep the calendar aligned with Earth's ~365.2422-day orbit around the Sun. A leap second, by contrast, adds a single second to Coordinated Universal Time (UTC) on an irregular, unpredictable basis to compensate for the gradual and uneven slowing of Earth's rotation, as documented by the US Naval Observatory.

Leap seconds have been inserted only about two dozen times since 1972 and are announced just months in advance, whereas leap years follow a fixed 400-year mathematical rule you can compute centuries ahead. In late 2022, international timekeeping bodies voted to phase out the leap second by 2035, but the leap year rule remains unchanged and unaffected.

Frequently Asked Questions

sell

Tags