Leap Year Calculator
- Test 1 — divisible by 4: 2,028 mod 4 = 0 (yes).
- Test 2 — century rule: 2,028 mod 100 = 28 — not a century year, test 3 does not apply.
- Test 3 — divisible by 400: 2,028 mod 400 = 28.
- Verdict: 2,028 is a leap year with 366 days, and February has 29 days; the next leap year after it is 2,032.
A leap year calculator tells you whether any year you enter is a leap year or a common year, and it shows the full reasoning behind that answer in one place. Type in any year and the tool applies the Gregorian leap-year rule: a year is a leap year if it is divisible by 4, except century years, which are leap years only if divisible by 400. The calculator then returns a clear yes-or-no result along with the day count, the length of February, and the next leap year that follows. For example, it confirms that 2028 is a leap year with 366 days, a 29-day February, and a next leap year of 2032, while 2100 is a common year because it is divisible by 100 but not by 400, leaving February with 28 days and making the next leap year 2104.
This method is the accepted standard because it corrects a real problem with the older Julian calendar, whose simpler every-four-years rule averaged 365.25 days and had drifted about 10 days by 1582. The Gregorian reform removed those 10 days and introduced the century rule, bringing the average calendar year to 365.2425 days, close to the tropical year of about 365.2422 days, an error of roughly one day in 3,000 years. That is why 2000 was a leap year, divisible by 400, which restores the leap day the century rule removes, with the next leap year after it being 2004. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every result yourself.
Worked examples
A straightforward leap year
Primary result: Leap year — 2028 divides by 4 and is not a century, so February has 29 days and the next leap year is 2,032. (2028)
| Year 2,028 | Leap year |
| Days in the year | 366 |
| Days in February | 29 |
| Next leap year | 2,032 |
The century trap
Primary result: Common year — 2100 divides by 4 and by 100 but not by 400, so it skips its leap day; the next leap year is 2,104. (2100)
| Year 2,100 | Common year |
| Days in the year | 365 |
| Days in February | 28 |
| Next leap year | 2,104 |
The exception to the exception
Primary result: Leap year — 2000 divides by 400, which restores the leap day the century rule took away. (2000)
| Year 2,000 | Leap year |
| Days in the year | 366 |
| Days in February | 29 |
| Next leap year | 2,004 |
Why years need an extra day
A true solar year is not a neat 365 days. It lasts about 365.2422 days, the time Earth takes to complete one orbit around the Sun. Because a calendar must track that orbit using whole days, it cannot match the solar year exactly. If every year had 365 days, the calendar would fall behind by roughly a quarter of a day each year. After four years the drift would reach one full day; after a century the seasons would shift by about 25 days. The challenge is one of approximation: how to keep a calendar built from whole days aligned with a natural cycle measured in fractions of a day.
The Gregorian calendar solves this with a three-part leap-year rule. A year is a leap year if it is divisible by 4, except century years, which are leap years only if divisible by 400. This layered approach adds just enough extra days to correct the drift without overcorrecting. The rule makes the average calendar year 365.2425 days, close to the tropical year of about 365.2422 days. The remaining error amounts to roughly one day in 3,000 years. Before Pope Gregory XIII introduced the reform in 1582, Western Europe used the Julian calendar, which applied a simpler every-four-years rule. That system averaged 365.25 days and had drifted about 10 days by 1582. The Gregorian reform removed those 10 days and introduced the century rule to prevent the same drift from recurring.
The century rule is what separates the Gregorian system from the Julian one. Century years divisible by 4 would normally be leap years, but the rule skips them unless they are also divisible by 400. The year 2000 was a leap year because it is divisible by 400, which restores the leap day the century rule removes. The next leap year after 2000 was 2004. In contrast, 2100 is a common year. It is divisible by 4 and by 100 but not by 400, so it skips its leap day. February 2100 has 28 days, and the next leap year is 2104, eight years after 2096. That eight-year gap is the mechanism that keeps the calendar from drifting ahead of the Sun.
A leap year calculator applies these rules automatically. Rather than counting days or checking divisibility by hand, you can enter any year and learn whether it has 365 or 366 days. The year 2028 is a leap year because it is divisible by 4 and not a century year, so February 2028 has 29 days and the year has 366 days. The next leap year after 2028 is 2032. Understanding why these adjustments exist makes the results easier to interpret: each leap day is a correction, and each skipped century year is a correction to the correction, bringing the calendar back in line with the 365.2422-day year it is built to follow.
The Gregorian rule
The Gregorian leap-year rule applies three tests in order, using remainders from division. First, divide the year by 4. If there is a remainder, the year is a common year and you stop. If it divides evenly, the year is usually a leap year — unless it is a century year. Second, for century years (those ending in 00), divide by 100. If there is a remainder, the year is not a century year and remains a leap year. If it divides evenly, the year is a century year and you apply the third test. Third, divide that century year by 400. If there is a remainder, the century rule removes the leap day and the year is common. If it divides evenly, the 400 exception restores the leap day and the year is a leap year.
Walking through 2028 shows the rule at its simplest. Dividing 2028 by 4 gives 507 with no remainder, so it passes the first test. Because 2028 does not end in 00, it is not a century year, and the second and third tests never come into play. Verified: 2028 is a leap year with 366 days and a 29-day February. The next leap year after it is 2032.
The year 2100 is the century trap that catches people who only check divisibility by 4. Dividing 2100 by 4 gives 525 with no remainder, so it passes the first test. But 2100 ends in 00, making it a century year, so the second test applies: dividing by 100 gives 21 with no remainder. Now the third test decides. Dividing 2100 by 400 gives 5 with a remainder of 100. Because that remainder is not zero, the century rule removes the leap day. Verified: 2100 is a common year. February 2100 has 28 days, and the next leap year is 2104, eight years after 2096.
The year 2000 demonstrates the 400 exception that saves century years when they align with a 400-year cycle. Dividing 2000 by 4 gives 500 with no remainder. It ends in 00, so divide by 100: the result is 20 with no remainder. Now the third test: dividing 2000 by 400 gives 5 with no remainder. That clean division restores the leap day the century rule would otherwise remove. Verified: 2000 was a leap year, and the next leap year after it is 2004.
These three tests are what any reliable leap year calculator performs behind the scenes. The rule makes the average calendar year 365.2425 days, close to the tropical year of about 365.2422 days — an error of roughly one day in 3,000 years. The Julian calendar's simpler every-four-years rule averages 365.25 days and had drifted about 10 days by 1582, when the Gregorian reform removed them and introduced the century rule.
Worked examples
The three years below show how the leap year calculator applies the Gregorian rule to ordinary years, skipped century years, and restored century years. Each example confirms whether the year is a leap year, how many days it contains, the length of February, and the next leap year that follows.
The year 2028 is a leap year because it is divisible by 4 and is not a century year. February 2028 has 29 days, the full year has 366 days, and the next leap year after it is 2032.
The year 2100 is a common year. It is divisible by 4 and by 100 but not by 400, so it skips its leap day. February 2100 has 28 days, and the next leap year is 2104, eight years after 2096.
The year 2000 was a leap year because it is divisible by 400, which restores the leap day the century rule removes. The next leap year after 2000 is 2004.
These examples illustrate why the century exception matters. The Gregorian leap-year rule makes the average calendar year 365.2425 days, close to the tropical year of about 365.2422 days, an error of roughly one day in 3,000 years. The Julian calendar's simpler every-four-years rule averages 365.25 days and had drifted about 10 days by 1582, when the Gregorian reform removed them and introduced the century rule.
| Year | Leap year? | Days in year | February length | Next leap year |
|---|---|---|---|---|
| 2028 | Yes | 366 | 29 days | 2032 |
| 2100 | No | 365 | 28 days | 2104 |
| 2000 | Yes | 366 | 29 days | 2004 |
The century trap
Most people remember the basic rule: a year divisible by 4 is a leap year. That works fine for 2028, which is divisible by 4 and not a century year, so it gets 366 days and a 29-day February. The next leap year after 2028 is 2032, right on schedule. But the Gregorian leap-year rule has a second clause that catches people off guard: century years are leap years only if they are divisible by 400. That extra condition is what creates the century trap.
Consider 2100. It is divisible by 4, so the simple every-four-years logic says it should be a leap year. But 2100 is also divisible by 100 and not by 400, so the century rule kicks in and strips away its leap day. February 2100 has 28 days, and 2100 is a common year. The previous leap year is 2096, and the next one is 2104. That means there is an eight-year gap with no leap day at all — the longest stretch without a 29-day February in the Gregorian calendar. The same thing will happen in 2200 and 2300, because both are divisible by 100 but not by 400.
The year 2000 shows the other side of the rule. Because 2000 is divisible by 400, the century exception does not apply, and the leap day is restored. The next leap year after 2000 is 2004, the normal four-year pattern continuing without interruption. A reliable leap year calculator has to account for both branches of the rule, or it will wrongly flag 2100, 2200, and 2300 as leap years.
The century rule exists because a pure every-four-years cycle overcorrects. The Julian calendar used that simpler approach, averaging 365.25 days per year, but the tropical year is about 365.2422 days. That small mismatch added up: by 1582 the Julian calendar had drifted about 10 days out of step with the seasons. The Gregorian reform removed those 10 days and introduced the century exception to slow the drift. The refined calendar averages 365.2425 days per year, close enough that the remaining error amounts to roughly one day in 3,000 years.
The eight-year gap from 2096 to 2104 is the vivid consequence of that correction. Without the century rule, 2100 would be a leap year and the gap would stay at four years. Instead, the calendar skips a leap day precisely when the every-four-years pattern would have added too much time. That single skipped day is what keeps the calendar aligned with the tropical year over the long run.
A short history of the fix
The problem began with a simpler system. The Julian calendar, introduced in ancient Rome, used an every-four-years leap-year rule that produced an average calendar year of 365.25 days. That average was slightly too long compared with the tropical year of about 365.2422 days — the time it takes Earth to complete one orbit around the Sun. The gap added up slowly, about one day every 128 years, and by 1582 the calendar had drifted roughly 10 days out of step with the seasons.
Pope Gregory XIII fixed the drift in two moves. First, the reform removed 10 days from the calendar to realign it with the Sun. Second, it introduced the century rule that still governs our calendar today. Under the Gregorian leap-year rule, a year is a leap year if it is divisible by 4, except century years, which are leap years only if divisible by 400. That change trims three leap days every 400 years, bringing the average calendar year down to 365.2425 days. That figure sits close to the 365.2422-day tropical year, leaving an error of roughly one day in 3,000 years.
The century rule is what sets the Gregorian calendar apart, and a leap year calculator applies it automatically. Consider 2000: divisible by 400, so it restores the leap day the century rule removes, and the next leap year after it is 2004. Now consider 2100: divisible by 4 and by 100 but not by 400, so it skips its leap day entirely. February 2100 has 28 days, and the next leap year is 2104, a full eight years after 2096. A year like 2028 is more straightforward — divisible by 4 and not a century, it is a leap year with 366 days, a 29-day February, and the next leap year after it is 2032.
The reform was not adopted everywhere at once. Catholic countries switched soon after 1582, but Protestant and Orthodox regions held out for decades or even centuries. Britain and its American colonies did not adopt the Gregorian calendar until 1752, by which time the drift had grown to 11 days. The change sparked confusion and, in some accounts, public protest. Despite the bumpy rollout, the underlying math was sound, and the same rule still determines every leap year we mark today.
Limits: proleptic use
This leap year calculator applies the Gregorian leap-year rule proleptically, meaning the rule is extended backward beyond its official adoption in 1582 and forward without regard for when different countries actually switched calendars. In reality, the Gregorian calendar was adopted at different times across the world, and some regions did not make the change for centuries. This tool does not attempt to track those varying historical adoption dates. Instead, it applies the same standard rule to every year you enter, treating the entire timeline as if the Gregorian calendar had always been in place.
The Gregorian leap-year rule itself is straightforward: a year is a leap year if it is divisible by 4, except century years, which are leap years only if divisible by 400. That century exception is what separates the Gregorian calendar from the older Julian calendar, which used a simpler every-four-years rule. The Julian system averaged 365.25 days per year and had drifted about 10 days by 1582, when the Gregorian reform removed those 10 days and introduced the century rule to correct the drift. The Gregorian rule makes the average calendar year 365.2425 days, close to the tropical year of about 365.2422 days, leaving an error of roughly one day in 3,000 years.
Because the rule is applied proleptically here, you can use this calculator for years before 1582, but the results will not match how people at the time actually counted days. For example, the year 1200 would be treated as a leap year under the Gregorian rule because it is divisible by 400, even though the Gregorian calendar did not exist yet. Similarly, the year 1300 would be treated as a common year because it is a century year not divisible by 400, even though under the Julian calendar in use at the time it would have been a leap year. This approach gives you consistent, predictable results across the full range of years, but it is not a reflection of historical practice.
A few verified examples show how the rule works in practice. The year 2028 is a leap year because it is divisible by 4 and is not a century year; it has 366 days, a 29-day February, and the next leap year after it is 2032. The year 2100 is a common year because it is divisible by 4 and by 100 but not by 400, so it skips its leap day; February 2100 has 28 days, and the next leap year is 2104, eight years after 2096. The year 2000 was a leap year because it is divisible by 400, which restores the leap day the century rule removes; the next leap year after it is 2004. These examples illustrate the three cases the rule covers: ordinary leap years, skipped century years, and restored quadricentennial years.
FAQs
How do I know if a year is a leap year?
Apply three tests: divisible by 4, centuries excluded unless divisible by 400. 2028 passes the first test and is a leap year.
Is 2100 a leap year?
No. 2100 is divisible by 100 but not by 400, so it is a common year with a 28-day February. The next leap year is 2104.
Was 2000 a leap year?
Yes. It is divisible by 400, the exception that restores the leap day, so February 2000 had 29 days.
Why do leap years exist?
To keep the calendar in step with the seasons. Without leap days the calendar would drift about a day every four years against the tropical year.
When is the next leap year after 2028?
2032. Leap years come every four years in this stretch of the calendar, uninterrupted by any century boundary.
How accurate is the Gregorian rule?
The Gregorian average year is 365.2425 days against a tropical year of about 365.2422, off by roughly a day in 3,000 years.