Leap Year Calculator

Leap Year Calculator

Popular AI Skill PRO

Enter Calculation

Formula

Leap Year⇔(Yearmod4=0∧Yearmod100≠0)∨(Yearmod400=0)\text{Leap Year} \iff \left(\text{Year} \bmod 4 = 0 \;\wedge\; \text{Year} \bmod 100 \neq 0\right) \;\vee\; \left(\text{Year} \bmod 400 = 0\right)
Usage stats

Advertisement

Results

Year: 2000
Leap Year
Is Leap Year? Yes
Days in Year 366

Report an error on this page

What This Leap Year Calculator Does

This Leap Year Calculator tells you whether any year follows the rules of the Gregorian calendar (used internationally for civil dates) for being a leap year — a year with 366 days instead of 365, with February 29 added. It works in two modes: check a single year, or scan a whole year range to list and count every leap year in between.

How to Use It

Choose your Calculation Type first:

  • Single Year – enter one value in the Year field (defaults to 2024). The tool returns whether it's a leap year and how many days that year has (365 or 366).
  • Year Range – enter a Start Year and End Year (defaults 2020–2030). The tool lists every leap year in that span and shows the total years, the leap-year count, and the non-leap-year count.

The Formula Explained

A year is a leap year when this exact rule is true:

  • It is divisible by 4 and not divisible by 100, or
  • It is divisible by 400.

In other words:

$$\text{Leap Year} \iff \left(\text{Year} \bmod 4 = 0 \;\wedge\; \text{Year} \bmod 100 \neq 0\right) \;\vee\; \left(\text{Year} \bmod 400 = 0\right)$$

(year % 4 == 0 && year % 100 != 0) || (year % 400 == 0). The "divisible by 100 but not 400" exception is what makes 1900 an ordinary year while 2000 is a leap year. For a range, the calculator simply applies this test to every year from start to end and collects the matches.

Advertisement
Flowchart of leap year decision rules based on divisibility by 4, 100, and 400
The decision flow for determining a leap year using the divisibility rules.

Worked Example

Set Calculation Type to Year Range, Start Year = 2020, End Year = 2030. Testing each year:

$$\text{Leap Count} = \sum_{y=S}^{E} \big[\,\text{IsLeap}(y)\,\big]$$
  • Leap years found: 2020, 2024, 2028
  • Total years: \(2030 - 2020 + 1 = 11\)
  • Leap-year count: 3
  • Non-leap-year count: \(11 - 3 = 8\)

If you instead checked the single year 2024, the result is "leap year" with 366 days.

Calendar comparison of February in a common year and a leap year
A leap year adds February 29, making the year 366 days long.

Leap Year Reference Table: Century Years and Recent Decades

This calculator applies the Gregorian leap-year rule, the rule used by the civil calendar of most countries today. A year is a leap year when it is divisible by 4, except century years, which must also be divisible by 400:

$$\text{leap} \iff \left(Y \bmod 4 = 0 \;\wedge\; Y \bmod 100 \neq 0\right) \;\vee\; \left(Y \bmod 400 = 0\right)$$

Note that other calendar systems (for example the Hebrew, Islamic, Ethiopian and Iranian calendars) use entirely different intercalation rules, and the older Julian calendar made every 4th year a leap year with no century exception — so the values below apply to the Gregorian (or proleptic Gregorian) calendar only.

Table 1 — Century years: the exception that catches people out

Year ÷ 4? ÷ 100? ÷ 400? Leap year? Days in year
1600 Yes Yes Yes Yes 366
1700 Yes Yes No No 365
1800 Yes Yes No No 365
1900 Yes Yes No No 365
2000 Yes Yes Yes Yes 366
2100 Yes Yes No No 365
2200 Yes Yes No No 365
2300 Yes Yes No No 365
2400 Yes Yes Yes Yes 366

Only 1 century year in 4 is a leap year. Because 1900 was skipped and 2000 was not, software written in the 20th century that used the simple "divisible by 4" test happened to be right for 2000 — and is wrong again for 2100.

Table 2 — Every leap year from 2000 to 2100

Year ÷ 4? ÷ 100? ÷ 400? Leap year? Days in year
2000 Yes Yes Yes Yes 366
2004 Yes No No Yes 366
2008 Yes No No Yes 366
2012 Yes No No Yes 366
2016 Yes No No Yes 366
2020 Yes No No Yes 366
2024 Yes No No Yes 366
2028 Yes No No Yes 366
2032 Yes No No Yes 366
2036 Yes No No Yes 366
2040 Yes No No Yes 366
2044 Yes No No Yes 366
2048 Yes No No Yes 366
2052 Yes No No Yes 366
2056 Yes No No Yes 366
2060 Yes No No Yes 366
2064 Yes No No Yes 366
2068 Yes No No Yes 366
2072 Yes No No Yes 366
2076 Yes No No Yes 366
2080 Yes No No Yes 366
2084 Yes No No Yes 366
2088 Yes No No Yes 366
2092 Yes No No Yes 366
2096 Yes No No Yes 366

That is 25 leap years in the interval 2000–2100 inclusive. 2100 is skipped (divisible by 4 and by 100, but not by 400), so the next leap year after 2096 is 2104 — an 8-year gap instead of the usual 4. The same 8-year gap occurred between 1896 and 1904, and will occur again between 2196 and 2204. Anyone scheduling quadrennial events, amortising day-count conventions, or testing date code should treat 2096 → 2104 as the edge case.

Advertisement

Key Terms Explained

Leap year
A calendar year containing one extra day — 366 days instead of 365 — inserted to keep the calendar aligned with the Earth's orbit around the Sun.
Common year
An ordinary 365-day year with no extra day; February has 28 days.
February 29 (intercalary day)
The extra day added to a Gregorian leap year. "Intercalary" simply means inserted into the calendar; a person born on this date is often called a leapling.
Gregorian calendar
The calendar introduced in 1582 by Pope Gregory XIII in the papal bull Inter gravissimas, which added the century exception to the leap-year rule. Adoption was not simultaneous — Catholic states changed in 1582, Britain and its colonies in 1752, and some countries only in the 20th century.
Julian calendar
The earlier Roman calendar in which every 4th year was a leap year with no century exception, giving a mean year of exactly 365.25 days. It drifts roughly 1 day every 128 years relative to the seasons, which is what the Gregorian reform corrected.
Proleptic Gregorian calendar
The Gregorian rule extended backwards to dates before it existed (before 1582, or before a given country's adoption). Historians normally quote original Julian dates instead, so a "leap year" answer for an early year is a mathematical extension, not a historical fact.
Mean tropical year
The average time from one vernal equinox to the next, about 365.2422 days. This is the astronomical quantity the calendar is trying to track.
Mean Gregorian calendar year
The average length of a year under the Gregorian rule — 97 leap years in every 400: $$365 + \frac{1}{4} - \frac{1}{100} + \frac{1}{400} = 365.2425\ \text{days}$$ It differs from the mean tropical year by roughly 0.0003 day per year, i.e. about 1 day in some 3,000 years.
Leap second
A one-second adjustment occasionally added to UTC so that clock time stays close to the Earth's irregular rotation. Leap seconds are decided by the IERS and are unrelated to leap years — they follow no fixed rule and cannot be predicted from the year number.
Modulo and divisibility
The modulo operation \(Y \bmod n\) gives the remainder after dividing \(Y\) by \(n\); a remainder of 0 means \(Y\) is divisible by \(n\). For example \(2024 \bmod 4 = 0\) and \(2024 \bmod 100 = 24\), so 2024 passes the divisible-by-4 test and is not a century year — hence a leap year.

FAQ

Why isn't 2100 a leap year even though it's divisible by 4? Because it's also divisible by 100 but not by 400, so the exception rule removes it. The same applies to 1700, 1800 and 1900.

Is 2000 really a leap year? Yes. It's divisible by 400, which satisfies the second part of the rule, so it keeps February 29.

Does this work for years before 1582? The calculator applies the Gregorian rule to any year you enter, including a "proleptic" extension backwards. Historically the Gregorian calendar began in 1582, so earlier dates may differ from the older Julian system, which counted every fourth year as a leap year without the 100/400 exceptions.

Last updated:

Most popular in Time and Date

View all Time and Date calculators