Leap Year Rules: How to Tell If a Year Is a Leap Year

A calendar page showing the month of February
Photo: “February calendar” by Photos Public Domain · Public domain · via Wikimedia Commons

Short answer

In the Gregorian calendar, a year is a leap year if it is divisible by 4, except years divisible by 100, unless they are also divisible by 400. So 2024 and 2028 are leap years, 1900 and 2100 are not, and 2000 was. A leap year has 366 days, with the extra day on 29 February. Count days across leap years with our free date difference calculator.

Leap years exist because the Earth does not take a whole number of days to go around the Sun. Without them, the calendar would slowly drift away from the seasons. The rule looks odd at first, with its exceptions, but each part has a clear reason.

The leap year rule in three steps

  1. If the year is divisible by 4, it is a leap year...
  2. ...unless it is divisible by 100, in which case it is not...
  3. ...unless it is also divisible by 400, in which case it is.
Year÷ 4?÷ 100?÷ 400?Leap year?
2026NoNoNoNo
2028YesNoNoYes
1900YesYesNoNo
2000YesYesYesYes
2100YesYesNoNo

A quick trick for the "divisible by 4" test: look only at the last two digits. If they divide by 4 (like 24, 28, 32 or 96), the whole year does.

Why we need leap years

The year of the seasons, called the tropical year, is about 365.2422 days long. A calendar of exactly 365 days would fall behind by almost a quarter of a day each year. After a century, the calendar would be about 24 days out, and the dates of the seasons would slowly drift through the months.

Why the exceptions for century years?

The older Julian calendar, introduced under Julius Caesar, added a leap day every four years without exception. That makes an average year of 365.25 days, a little too long, by about 11 minutes. Over centuries those minutes added up: by the 1500s the calendar had drifted by about ten days compared with the seasons.

In 1582 Pope Gregory XIII introduced the Gregorian calendar, which removes three leap days every 400 years by skipping leap years in century years not divisible by 400. That gives an average year of 365.2425 days, very close to the real value. The calendar now drifts by only about a day over several thousand years. Different countries switched at different times; Britain and its colonies, for example, changed in 1752.

Next leap years

Upcoming leap years are 2028, 2032, 2036, 2040, 2044 and 2048. The next century year that is not a leap year is 2100, so many people alive today will never see a skipped leap year.

Fun facts about the 400-year cycle

How leap years affect everyday maths

Birthdays on 29 February

People born on 29 February, sometimes called "leaplings", have a calendar birthday only once every four years. In other years, many celebrate on 28 February or 1 March. Which date counts for legal purposes, such as reaching an age limit, depends on local law, so check the rules where you live if it matters.

Leap seconds are different

Leap seconds were occasionally added to clocks to keep atomic time in step with the Earth's slightly irregular rotation. They have nothing to do with leap years, which keep the calendar in step with the Earth's orbit around the Sun.

Check it in code or a spreadsheet

The rule is easy to write as a test: a year is a leap year when (year divisible by 4 and not by 100) or (year divisible by 400). In Excel or Google Sheets, with the year in cell A1, this formula returns the answer:

=IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)<>0)),"Leap year","Not a leap year")

MOD gives the remainder after division, so MOD(A1,4)=0 means "divisible by 4". Try it with 1900, 2000 and 2028 to see all three parts of the rule at work. Programmers write the same test in one line in almost any language, and many date libraries include a ready-made leap-year function. Want a live countdown to the next 29 February? Set one with our countdown timer.

Frequently asked questions

Is 2026 a leap year?

No. 2026 is not divisible by 4. The next leap year is 2028.

Why was 2000 a leap year but 1900 was not?

Century years are leap years only if divisible by 400. 2000 is; 1900 is not.

Will 2100 be a leap year?

No. 2100 is divisible by 100 but not by 400.

How many days are in a leap year?

366 days, with the extra day on 29 February.

Why do we have leap years?

Because a year of seasons is about 365.2422 days. Leap years keep the calendar in step with the seasons.

Sources

💙 If VSH helps you, please share it and help us improve.