S
SoSimple.tools
Calendar math

Leap Year Calculator

Type a year to see whether it has 366 days, which test decides it, and when the previous and next leap years fall. Or list every leap year between two years

Runs in your browser: what you enter stays on your device

Your year

Whole years from 1583 to 9999 (Gregorian calendar)

Result
Leap year
2028 is a leap year

Divisible by 4 and not a century year, so it is a leap year.

The three tests
Divisible by 4?
2028 ÷ 4 → remainder 0
Yes
Divisible by 100?
2028 ÷ 100 → remainder 28
No
Divisible by 400?
—
Not needed
Days in the year
366
Days in February
29
February 29
Tuesday, February 29, 2028
Share this tool

How to use it

  1. Choose Check a year to test one year, or List a range to see every leap year between two years.
  2. Type a year from 1583 to 9999, or use the − and + buttons to step one year at a time. “Use this year” fills in the current year.
  3. Read the verdict, the three divisibility tests with their remainders, the days in the year and in February, and the weekday of February 29.
  4. Tap the previous or next leap year to jump straight to it, or press Copy Result to paste the answer into a message.

Worked example

Take 2100. 2100 ÷ 4 leaves remainder 0, so the first test passes. 2100 ÷ 100 leaves 0, so it is a century year and the second test passes too. 2100 ÷ 400 leaves 100, so the last test fails: 2100 is not a leap year, February has 28 days and the year has 365. The previous leap year is 2096 and the next is 2104. For the range 2000–2100 the tool shows 25 leap years in 101 years, which is 101 × 365 + 25 = 36,890 days, and lists 2100 as the one century year that is skipped.

Methodology

The rule. A year is a leap year when it is divisible by 4, except that century years (divisible by 100) are leap years only when they are also divisible by 400. In code: (y % 4 = 0 and y % 100 ≠ 0) or y % 400 = 0. That is why 1900 and 2100 are common years while 2000 and 2400 are leap years. In every 400-year cycle the pattern gives 100 − 4 + 1 = 97 leap years, so a cycle holds 400 × 365 + 97 = 146,097 days, exactly 20,871 weeks, and the average year is 146,097 ÷ 400 = 365.2425 days. The tropical year, the time between two March equinoxes, is about 365.2422 days, so the calendar drifts by roughly one day in 3,000 years. The older Julian calendar added a leap day every 4 years without exception, an average of 365.25 days, which drifts about one day per 128 years; that drift led to the Gregorian reform of 1582, when October 4 was followed by October 15. To count leap years in a range, the tool uses floor(y/4) − floor(y/100) + floor(y/400), which counts the leap years up to year y, and subtracts two such counts, so it never loops through the range to count.

Range and limits The tool works for whole years from 1583 to 9999. Before 1582 the Julian rule applied, and countries switched at different times (Great Britain and its colonies in 1752), so applying the Gregorian rule to older dates would mislead. Outside the range the tool shows “—”.
What it does not do It follows the calendar rule only. It does not give legal answers about the birthdays of people born on February 29, which depend on local law, and it does not deal with leap seconds, a separate matter of clock time. Excel deliberately treats 1900 as a leap year for compatibility with older spreadsheets; this tool does not.

Sources and documentation

The rule and the 400-year cycle come from the first two entries, the Julian comparison and the 1582 reform from the Wikipedia articles (secondary sources), and the 1900 detail from Microsoft. Pages were consulted in October 2026.

Century years: who gets February 29?

The whole rule hides in the century years. These are the results the tool gives for the century years from 1700 to 2400, with the remainder after dividing by 400 that settles each one.

YearRemainder of year ÷ 400Leap year?
1700100No
1800200No
1900300No
20000Yes
2100100No
2200200No
2300300No
24000Yes

A short case. Marta was born on February 29, 2000. On February 29, 2028, she turns 28, but that is only her 7th birthday on her real birth date (2004, 2008, 2012, 2016, 2020, 2024 and 2028). Between the two dates she has lived 28 × 365 + 7 = 10,227 days, which is exactly 1,461 weeks, so both February 29, 2000 and February 29, 2028, fall on a Tuesday. Enter 2000 and 2028 in the tool to check the weekday yourself.

Related tools

Frequently asked questions

Is 1900 a leap year, and what about 2100? ▼

No to both. They are century years, divisible by 100 but not by 400 (1900 leaves a remainder of 300, 2100 leaves 100), so February has 28 days. 2000 was a leap year because 2000 ÷ 400 is exactly 5, and 2400 will be too. Between 1901 and 2099 the simple “every 4 years” habit gives the right answer, which is why the exception is easy to forget.

Why do leap years exist? ▼

A year is not a whole number of days: the Earth needs about 365.2422 days to come back to the same point in the seasons. A 365-day calendar would slip against the seasons by almost a day every 4 years. Adding a day in 97 of every 400 years makes the average year 365.2425 days, close enough that the drift is about a day over thousands of years. The rule is a good compromise, not an exact fit.

When are the next leap years? ▼

From 2028 the leap years run 2028, 2032, 2036 and 2040; February 29, 2028, is a Tuesday and 2032 a Sunday. A gap of four years is normal, and the only longer gap is eight years, which happens around a skipped century year, for example from 2096 to 2104. Use the previous and next buttons in the tool to jump from one leap year to the next.

Does the calculator work for years before 1583? ▼

No. The Gregorian calendar was introduced in 1582 and countries adopted it at different times, so before that the rule would not match the calendar people actually used. The tool shows “—” outside 1583–9999 instead of a number that could mislead. For historical dates you first need to know which calendar the place used.