What is a leap year calculator?
A leap year calculator checks any year against the Gregorian leap year rule and tells you whether that year is a leap year of 366 days or a common year of 365 days, showing the working step by step instead of giving a bare yes or no. People arrive here with short, exact questions. Is 2028 a leap year? Is 2026 a leap year, and if not, when is the next leap year? How many leap years are there between two years? Was 1900 a leap year, and will 2100 be one? A good leap year calculator answers all of those at once: the verdict for a single year, the step-by-step divisibility tests behind it, the days in that year, the days in its February, the next leap year and the previous leap year, and a list and count of the leap years inside any range you choose. This page does all of that, in your browser, with nothing uploaded.
The question sounds trivial until a century year appears. Almost everyone learns the school version of the rule — a leap year comes every four years — and that version is right for the overwhelming majority of years anyone alive will ever check. It correctly calls 2024 and 2028 leap years and 2025, 2026 and 2027 common years. Where it fails is at the turn of a century. The year 1900 was not a leap year even though 1900 divides by 4, the year 2000 was a leap year even though century years are usually skipped, and the year 2100 will not be a leap year either. Those three cases are exactly where diaries, software, contracts and school answers go wrong, so this guide works them in full, with the arithmetic shown, and the calculator above applies the complete rule to every year you enter, not the shortened version.
Everything on this page uses one stated rule, applied consistently: the (proleptic) Gregorian rule, set out in the next section. Proleptic means the modern rule is projected backwards and forwards to years before and after the Gregorian calendar itself existed, which is the standard convention for calculators, software libraries and calendar conversions. It is exact for every modern date, and where history complicates matters — because different countries adopted the Gregorian calendar in different years — the history section below says so plainly rather than pretending a single rule describes what people at the time actually lived through.
The Gregorian rule, step by step
State the rule as the calculator applies it, in the order it applies it. Step one: is the year divisible by 400? If yes, it is a leap year, and you stop there. The year 2000 passes this test, because 2000 divided by 400 is exactly 5, so 2000 was a leap year. Step two: is the year divisible by 100? If a year reaches this step — meaning it failed the 400 test — and it does divide by 100, it is not a leap year, and you stop there. The year 1900 fails here: 1900 divided by 100 is exactly 19, but 1900 divided by 400 is 4.75, so 1900 was a common year. The year 2100 fails the same way, because 2100 divided by 400 is 5.25. Step three: is the year divisible by 4? For every year that is not a century year, this is the only test that matters. If it divides exactly by 4, it is a leap year, like 2024 and 2028. If it does not, it is a common year, like 2026, where 2026 divided by 4 is 506.5.
Notice why the order matters. Testing divisibility by 4 first and stopping there would call 1900 and 2100 leap years, which is the single most common leap year error. Testing the century exception without the 400 exception would call 2000 a common year, which is the second most common. The three tests only give the right answer for every year when they are applied in the order above: 400, then 100, then 4. The calculator shows all three answers for your year — divisible by 4, yes or no; divisible by 100, yes or no; divisible by 400, yes or no — so you can watch the rule reach its verdict rather than taking the verdict on trust.
| Year | Divisible by 4? | Divisible by 100? | Divisible by 400? | Verdict |
|---|---|---|---|---|
| 2028 | Yes (2028 / 4 = 507) | No | No | Leap year, 366 days |
| 2026 | No (2026 / 4 = 506.5) | No | No | Common year, 365 days |
| 2024 | Yes (2024 / 4 = 506) | No | No | Leap year, 366 days |
| 2000 | Yes | Yes | Yes (2000 / 400 = 5) | Leap year, 366 days |
| 1900 | Yes | Yes (1900 / 100 = 19) | No (1900 / 400 = 4.75) | Common year, 365 days |
| 2100 | Yes | Yes | No (2100 / 400 = 5.25) | Common year, 365 days |
Read the table as a checklist for any year of your own. Multiples of 4 that are not century years, which is most of the years anyone checks, are settled by the first column alone. Century years are the only years where the last two columns decide the answer, and they are also the only years where quick mental rules and sloppy software disagree with each other. If you remember nothing else from this section, remember this: a year ending in 00 is a leap year only when its first digits form a number divisible by 4 — 2000 qualifies because 20 divides by 4, while 1900 and 2100 do not because 19 and 21 do not.
How this leap year calculator works
The tool has two checkers that share the same rule engine. The first checker takes a single year and returns the full picture for that year: the verdict, leap year or common year, as the headline; the three divisibility tests with their arithmetic; the days in that year, 366 or 365; the days in its February, 29 or 28; and the next leap year after it and the previous leap year before it. The page opens on 2028, a leap year, so the first thing you see is a complete worked example you can verify against the rule table above before trusting the tool with a year of your own.
The second checker takes a range — a start year and an end year — and lists every leap year inside it, in order, with a count. Enter 2000 and 2030 and it returns the eight leap years 2000, 2004, 2008, 2012, 2016, 2020, 2024 and 2028, and the count 8. The range is inclusive at both ends, which is the convention most people expect when they ask how many leap years there are between two years: if either endpoint is itself a leap year, it is counted. If you enter the range backwards, with the later year first, the calculator swaps the two and tells you it has done so, rather than returning an empty list and leaving you to guess why.
Both checkers update live as you type, with no calculate button to hunt for, and everything runs locally in your browser tab. The copy and download buttons save the verdict, the step-by-step tests and the range list as a plain text file, which is handy when a leap year answer needs to go into a school assignment, a planning document or a test report. Nothing you enter is sent anywhere, and there is no history of the years you have checked stored on any server.
Worked examples: 2028, 2026, 2000, 1900 and 2100
Worked examples are the honest core of a calculator page, because they let you check the tool before you rely on it. Start with the question people ask most: is 2028 a leap year? Yes. The year 2028 divided by 4 is exactly 507, so it passes the divisible-by-4 test, and because 2028 is not a century year — it does not end in 00 — the century tests never come into play. The year 2028 therefore has 366 days, February 2028 has 29 days, and 29 February 2028 is a real date that will appear in diaries and calendars. Its neighbouring leap years are 2024 before it and 2032 after it, the ordinary four-year spacing.
Now the opposite case: is 2026 a leap year? No. The year 2026 divided by 4 is 506.5, which is not a whole number, so 2026 fails the only test that applies to it and is a common year of 365 days with a 28-day February. Because 2026 sits exactly halfway between two leap years, its result also demonstrates the next-and-previous feature: the next leap year after 2026 is 2028, two years ahead, and the previous leap year before it was 2024, two years behind. Anyone born on 29 February 2024, or planning around a 29 February date, is working with exactly these neighbours.
The century examples are the ones that separate the full Gregorian rule from the school version. The year 2000 was a leap year. It ends in 00, so it must face the century tests, and it passes the strongest of them: 2000 divided by 400 is exactly 5. So February 2000 had 29 days, and software that treated 2000 as a common year produced real bugs at the time. The year 1900 was not a leap year. It divides by 4 and by 100, but 1900 divided by 400 is 4.75, so the exception removed it and February 1900 had 28 days in the Gregorian calendar. The year 2100 will not be a leap year for the same reason — 2100 divided by 400 is 5.25 — which creates the longest gap in the modern calendar: after 2096, the next leap year is 2104, eight years later. Enter each of these years above and the calculator shows the identical figures, test by test.
Leap years from 2000 to 2050
The table below lists every leap year from 2000 to 2050, the span most planning, schooling and software questions actually cover. There are 13 of them in this half-century. The pattern inside the span is perfectly regular — one leap year every four years, with no interruption — because the only century year in the span, 2000, passes the divisible-by-400 test and keeps its leap day. The regularity is a property of this particular span, not of the calendar in general: run the same table across 2100 and the rhythm breaks for eight years, as the worked examples above show.
| Leap year | Divisible by 4 | Days in year | Days in February |
|---|---|---|---|
| 2000 | 2000 / 4 = 500 (also / 400 = 5) | 366 | 29 |
| 2004 | 2004 / 4 = 501 | 366 | 29 |
| 2008 | 2008 / 4 = 502 | 366 | 29 |
| 2012 | 2012 / 4 = 503 | 366 | 29 |
| 2016 | 2016 / 4 = 504 | 366 | 29 |
| 2020 | 2020 / 4 = 505 | 366 | 29 |
| 2024 | 2024 / 4 = 506 | 366 | 29 |
| 2028 | 2028 / 4 = 507 | 366 | 29 |
| 2032 | 2032 / 4 = 508 | 366 | 29 |
| 2036 | 2036 / 4 = 509 | 366 | 29 |
| 2040 | 2040 / 4 = 510 | 366 | 29 |
| 2044 | 2044 / 4 = 511 | 366 | 29 |
| 2048 | 2048 / 4 = 512 | 366 | 29 |
Two uses for this table are worth calling out. First, it is a quick fraud check on any other leap year source: if a list of leap years between 2000 and 2050 contains a year that is not in this table, or misses one that is, that source is wrong, because within this span the rule and the four-year rhythm agree completely. Second, it shows why the range count works the way it does. A 2000-to-2030 range catches the first eight rows of the table, a 2000-to-2050 range catches all thirteen, and extending the end year to 2052 adds nothing, because 2052, not 2050 or 2051, is the next leap year after 2048 — a detail the range checker gets right automatically and mental arithmetic often does not.
Counting leap years in a range
Asking how many leap years fall inside a span of years is a different job from checking one year, and it is where off-by-one errors breed. The two decisions that decide the count are whether the endpoints are included and whether a skipped century year falls inside the span. This calculator includes both endpoints, and states so wherever the count appears. That is why 2000 to 2030 gives 8 and not 7: both 2000 at the start and 2028, the last leap year before the end year 2030, are inside the range, and a range that began in 2001 instead would correctly give 7, because it would exclude 2000.
Across long spans, the count follows a rhythm worth knowing. Every 400-year cycle of the Gregorian calendar contains exactly 97 leap years: 100 multiples of 4, minus the three century years in each cycle that fail the 400 test. So a span of exactly 400 consecutive years always contains 97 leap years, a span of 100 years usually contains 24 or 25 depending on whether its century year passes the 400 test, and a span of four years usually contains exactly 1 — except the four-year spans that straddle a skipped century year, such as 2097 to 2100, which contain none. If a count from any source cannot be reconciled with those benchmarks, the source is applying a different rule or different endpoints, and the difference is findable by testing its answer on 2000 to 2030, where the correct count is 8.
Why leap years exist: the 365.2422-day problem
Leap years exist because the calendar is trying to fit an awkward astronomical number into whole days. One year — the time the Earth takes to return to the same point in its seasonal cycle — lasts about 365.2422 days. A calendar that simply used 365 days every year would fall behind the seasons by about a quarter of a day each year: one day every four years, about a month every 120 years, and a full season over a few centuries. Planting dates, harvest festivals and eventually the calendar months themselves would slide through the seasons, which is precisely the drift that calendar reformers kept being called in to fix.
Adding one extra day every four years is the obvious repair, and it is a good one, but it slightly overcorrects: it assumes a year of 365.25 days, which is about 0.0078 days too long, roughly one extra day every 128 years. The Gregorian century rules are the fine adjustment on top of that repair. Skipping the leap day in three century years out of four removes three of those excess days every 400 years, bringing the average calendar year to 365.2425 days — within about 0.0003 days, or roughly 26 seconds a year, of the solar year. That is why the full rule has the shape it does: the divisible-by-4 test does the heavy lifting, and the 100 and 400 tests are a small, precise correction, not bureaucratic decoration.
The extra day itself is placed in February for historical reasons — the Roman calendar, from which the modern month structure descends, treated the end of February as the end of the year, so the inserted day went there — and February's short length is a relic of that same history. The practical consequence today is simple: 29 February is the only date that does not occur every year, which is why leap year checks cluster around it, from people born on that date deciding when to celebrate in common years, to payroll, rental and subscription systems that must decide what a monthly charge means in a February with one extra day.
Julian vs Gregorian, and when countries switched
The rule on this page has a predecessor, and confusing the two explains many wrong answers in older books and documents. The Julian calendar, introduced by Julius Caesar in 45 BCE, used the simple rule: every year divisible by 4 is a leap year, no exceptions. Its average year of 365.25 days was a great improvement on what came before, but the small excess over the true 365.2422 days accumulated to about ten days by the sixteenth century, pushing the spring equinox noticeably earlier in the calendar than it should have been.
The Gregorian reform, promulgated by Pope Gregory XIII in 1582, fixed both the drift and the rule. It removed ten days from October 1582 to realign the equinox, and it added the century tests so the drift would not return: century years would be leap years only when divisible by 400. Crucially for anyone reading historical dates, the Gregorian calendar was adopted in different years in different countries. Catholic countries including Spain, Portugal and much of Italy switched in 1582 itself. Britain and its colonies did not switch until 1752, by which time eleven days had to be skipped. Russia switched in 1918 and Greece in 1923, and some regions used the Julian calendar for civil purposes later still.
That staggered adoption is why this page describes its rule honestly as the proleptic Gregorian rule. When you check a year such as 1700, the calculator answers the question as the Gregorian rule states it — 1700 was not a Gregorian leap year — even though in Britain, still on the Julian calendar in 1700, February of that year did have 29 days locally. Neither answer is a mistake; they are answers about two different calendars. For every modern year, and for the historical record as modern references standardise it, the Gregorian answer is the one in general use, and it is the one this calculator gives. Dates recorded locally before a country's switch need a historian's conversion, not a leap year check, and the limits section below says the same in shorter form.
Next and previous leap years, and the eight-year gap
Most single-year checks are really a search in disguise: someone checking 2026 usually wants to know that the next leap year is 2028, and someone checking a past year often wants the previous one. That is why the result panel shows both neighbours with every verdict, computed by the same rule rather than by simply adding and subtracting four. Adding four works almost always — from 2028 it correctly gives 2032 — but it fails exactly where the rule itself gets interesting. From 2096, adding four gives 2100, which is not a leap year; the next leap year after 2096 is 2104. A neighbour computed by the rule handles that automatically, and a neighbour computed by arithmetic on fingers does not.
The eight-year gap around a skipped century year is the longest wait the Gregorian calendar ever imposes, and it has real consequences for the people most attached to 29 February. Someone born on 29 February 2096 would wait eight years for the date to occur again, celebrating on 28 February or 1 March in the seven common years between — the same choice every leap-day-born person already makes in ordinary common years, just for longer. The calculator's next-and-previous figures also expose a useful consistency check: for any year you check, the neighbours must themselves pass the rule, so if a tool ever names 2100 as the next leap year after 2096, the tool is using the Julian rule whatever it claims.
Where leap years actually matter
Leap years matter anywhere a year is assumed to have a fixed length. Software is the famous case: date libraries, payroll systems and interest calculations must all decide what happens on 29 February and how many days a given year contains, and the century tests are a standard source of defects because they trigger so rarely that code can run for decades before meeting one. The year 2000 was a live test of exactly this, because systems that had implemented only part of the rule disagreed about whether February 2000 had a 29th day.
Ordinary life meets the same arithmetic more quietly. A yearly salary divided into daily rates, a rental or subscription priced by the day, an insurance period, a school or training plan counted in days, and interest that accrues daily all produce slightly different figures in a 366-day year than in a 365-day year, and the difference is correct, not an error, when the year genuinely is a leap year. Sports and civic calendars run on the rhythm too: the Summer Olympic Games and several other four-yearly events are traditionally held in leap years, a pattern that holds precisely because leap years mark the four-year cycle so reliably outside the century exceptions. And for the roughly one person in 1,461 born on 29 February, the leap year check is personal: it decides whether their actual birth date appears on the calendar that year at all.
What this calculator cannot do
This calculator applies the proleptic Gregorian rule to the year numbers you enter, and that is the whole of what it does. It cannot tell you which calendar a historical document was written under: a February date recorded in Britain in 1700 or Russia in 1900 may follow Julian rules locally, and converting such a date is a historical question, not a divisibility question. It does not predict any future reform of the calendar; proposals to adjust the rule further exist, because even the Gregorian average year is very slightly long, but no change has been adopted, and 2100 will be a common year under the rule in force. It also says nothing about luck, personality or fortune: a leap year is a calendar correction, and claims that leap years are lucky or unlucky are folklore, not calendar facts, so this page makes none.
It also cannot rescue a year entered in the wrong form. Years are entered as plain numbers in the modern numbering system, with no year zero in the historical BC and AD sequence — astronomers use a numbering with a year 0, which shifts BC years by one — so a check for a year before 1 CE should be read as the proleptic calculation it is, not as a statement about a historical calendar. Within its stated job, though, the calculator is exact: the rule is finite, the tests are shown, and every verdict on this page, including 2000, 1900 and 2100, can be reproduced by hand from the three divisibility steps in the rule section above.
Sources and References
- Wikipedia - Leap year, the Gregorian rule, its history and its exceptions
- Wikipedia - Gregorian calendar, its structure, reform and adoption by country
- Wikipedia - Julian calendar, the earlier every-four-years leap rule
- Wikipedia - Proleptic Gregorian calendar, extending the Gregorian rule beyond its adoption
- timeanddate.com - Leap Year, which years are leap years and why they occur
- National Institute of Standards and Technology (NIST) - Time and Frequency Division
- MDN Web Docs - JavaScript Date reference, background for the in-browser calculation
Every figure in this guide was calculated with this page own stated rule, the proleptic Gregorian rule, so you can reproduce each one exactly by entering the same years above. Source note and substitutions, disclosed plainly: the Britannica leap year page was checked as a candidate source but returned a 403 error on direct request, and the Royal Museums Greenwich leap year page returned a 404 error, so both were substituted with the verified Wikipedia proleptic Gregorian calendar page and the timeanddate.com leap year page listed above. Exactly seven sources are listed, and every one was verified live with an HTTP 200 response before use.