A leap year is a calendar year with 366 days instead of 365, adding February 29 to keep the calendar aligned with Earth's orbit. Under the Gregorian rule, any year divisible by 4 is a leap year, except century years, which must be divisible by 400. So 2024 was a leap year, 2028 is next, 2100 will not be, and 2000 was. The extra day corrects a mismatch between our clock and the sky that would otherwise push the seasons out of place by roughly one day every four years.
That answer is simple. The reasoning behind it is not. The leap year rule is a layered correction system built over more than two millennia, and each layer exists because the previous one left a measurable error. Understanding when leap years occur, and why the exceptions matter, requires looking at the actual length of a year, the arithmetic of fractions, and the small but real drift that no integer-day calendar can fully erase.
The orbital mismatch leap years correct
Earth does not complete one orbit in exactly 365 days. Measured against the sun, a tropical year—the time from one March equinox to the next—lasts about 365.2422 days. That figure is not a round number, and it is not fixed forever. It shifts slowly because Earth's axial tilt wobbles and its orbit is perturbed by the moon and planets.
The problem is arithmetic. A calendar counts whole days. The sky does not. If you build a calendar with exactly 365 days, you fall behind the seasons by about 0.2422 days per year. That sounds trivial, roughly 5 hours and 49 minutes. Over a century it compounds to about 24 days. Over four centuries, roughly 97 days.
The consequence is not abstract. Planting schedules, religious observances tied to equinoxes, and the simple expectation that July is summer in the Northern Hemisphere all depend on the calendar tracking the sun. A calendar that drifts would eventually place winter in what we now call June. Leap days are the mechanism that absorbs the fractional remainder and keeps the calendar locked to the seasons.
The Julian calendar, introduced by Julius Caesar in 46 BCE, handled this with a single rule: add one day every four years. That assumes a year of 365.25 days. The real value is 365.2422. The difference is about 0.0078 days per year, or roughly 11 minutes. Small, but it accumulates.
How the Gregorian rule layers three corrections
The Gregorian calendar, introduced by Pope Gregory XIII in 1582, refined the Julian rule by adding two exceptions. The full rule has three tiers, and each tier exists to remove a specific error.
Tier one: every year divisible by 4 gets a leap day. This is the baseline correction, adding 0.25 days per year on average. It overshoots the true 0.2422 by about 0.0078 days annually.
Tier two: century years (divisible by 100) are skipped unless they also satisfy tier three. This removes three leap days every 400 years, subtracting 0.0075 days per year on average. After tier two, the average year length is 365.2425 days. That is remarkably close to the tropical year of 365.2422—off by just 0.0003 days per year, or about 26 seconds.
Tier three: century years divisible by 400 remain leap years. This restores the leap day for years like 1600 and 2000, preventing the rule from overcorrecting. Without tier three, the calendar would lose roughly one day every 3,333 years in the opposite direction.
The genius of the rule is that it approximates an irrational orbital period using a fraction with a small denominator. The Gregorian average of 365 + 1/4 − 1/100 + 1/400 equals 365.2425. That is a convergent of the true value, and it is accurate enough that the residual error is measured in seconds per year rather than minutes.
One plain-language way to hold it: the calendar adds a day almost every four years, skips a few of those additions at centuries, and puts one back every 400 years.
Quantified drift across calendar systems
The difference between calendar systems is best seen in accumulated error over long spans. Each system's average year length determines how far it drifts from the tropical year.
| Calendar system | Average year length (days) | Error vs tropical year (days/year) | Drift per 1,000 years | Leap rule |
|---|---|---|---|---|
| Egyptian civil (365) | 365.0000 | −0.2422 | ~242 days | None |
| Julian (365.25) | 365.2500 | +0.0078 | ~8 days | Every 4 years |
| Gregorian (365.2425) | 365.2425 | +0.0003 | ~0.1 day | 4, except centuries, except 400s |
| Revised Julian (365.242222) | 365.2422 | ~0.00002 | ~0.007 day | 4, with 900-year exception |
| Iranian Solar Hijri | 365.2422 | ~0.00002 | ~0.007 day | Complex 33-year cycle |
The Julian calendar's 8-day drift per millennium is why Gregory's reform was necessary. By 1582, the Julian calendar had accumulated about 10 days of error since the Council of Nicaea in 325 CE, which had fixed the date of Easter. The Gregorian reform removed those 10 days by jumping from October 5 to October 15, 1582. That is why the calendar reform is sometimes described as deleting ten days from history.
The Revised Julian calendar, used by some Orthodox churches, achieves slightly better accuracy than Gregorian by using a 900-year cycle instead of a 400-year cycle. Its average year is 365.242222 days, marginally closer to the tropical year. The difference between Gregorian and Revised Julian is about one day every 40,000 years—far beyond any practical concern.
The counterintuitive century exception
The most commonly misunderstood part of the leap year rule is the century exception. Many people learn "every four years" and never learn the century skip. That produces a specific error: they expect 1900 and 2100 to be leap years when they are not.
The logic is subtle. If you add a leap day every four years without exception, you add 25 days per century. But the true shortfall per century is about 24.22 days. So a pure four-year rule overcorrects by roughly 0.78 days per century. The century skip removes one of those 25 leap days, bringing the century total to 24—still slightly under the true 24.22, which is why the 400-year exception puts one back.
The 400-year exception means that, in any 400-year span, there are exactly 97 leap years: 100 years divisible by 4, minus 4 century years (100, 200, 300, 400), plus 1 (the 400 year itself). That gives 97 leap days per 400 years, or 0.2425 leap days per year—exactly the fractional remainder needed.
A practical way to check any year: if it is divisible by 400, it is a leap year. If it is divisible by 100 but not 400, it is not. If it is divisible by 4 but not 100, it is. Otherwise, it is not. This decision tree handles every year in the Gregorian calendar without ambiguity.
The counterintuitive detail is that the century exception was not designed to improve long-term accuracy in a theoretical sense. It was designed to correct a specific accumulated error that had already occurred by 1582 and to prevent recurrence. The rule is a patch on a patch, and it works because the arithmetic happens to converge.
Common misconceptions and boundary cases
Several persistent myths surround leap years, and each one misstates how the rule actually works.
Myth: every four years is a leap year. False. 1900 was not a leap year, and 2100 will not be. The four-year rule has two exceptions. Myth: February 29 is the only leap day. False in a technical sense. The leap day is inserted as February 29 in the Gregorian calendar, but other calendars place the extra day elsewhere—the Iranian calendar adds a day to the last month, and the Hebrew calendar adds an entire leap month in seven of every 19 years. Myth: leap years affect birthdays born on February 29. True in a legal sense in some jurisdictions, which define the birthday as February 28 or March 1 in non-leap years. The choice varies by country and is a matter of civil law, not astronomy. Myth: the leap year rule is fixed forever. False. The Gregorian calendar drifts about one day every 3,333 years relative to the tropical year. Proposed reforms, such as dropping a leap day every 4,000 years, would extend accuracy but have not been adopted. Myth: leap seconds and leap days are the same thing. False. Leap seconds adjust atomic time to Earth's rotation, which varies irregularly. Leap days adjust the calendar year to the orbital year, which is stable over human timescales. They are separate correction systems.
The boundary cases matter for computing and scheduling. A program that calculates dates using a simple four-year rule will misplace events in 1900, 2100, and every century year not divisible by 400. That is why date libraries use explicit Gregorian logic rather than modular arithmetic on the year alone.
Practical actions for date handling and scheduling
For anyone building software, planning recurring events, or checking a calendar, the leap year rule can be implemented and verified with a few concrete steps.
Use the full decision tree: divisible by 400, or divisible by 4 and not by 100. Do not rely on year modulo 4 alone. Test against known boundary years: 1600 (leap), 1700 (not), 1900 (not), 2000 (leap), 2100 (not), 2400 (leap). For February 29 birthdays, confirm the legal convention in the relevant jurisdiction before setting a default date. For recurring annual events, decide explicitly whether February 29 events fire on February 28 or March 1 in non-leap years. For astronomical or historical calculations, use a library that supports Julian and Gregorian calendars separately, since dates before 1582 may follow Julian rules in some sources. For long-term projections, note that the Gregorian rule is accurate to about one day in 3,333 years, which is sufficient for civil use but not for precision astronomy.
The threshold to remember is 400. Any year divisible by 400 is a leap year regardless of the century rule. Any century year not divisible by 400 is not a leap year regardless of the four-year rule. Every other year divisible by 4 is a leap year. That single threshold resolves the apparent contradictions in the rule.
Limitations and what the rule cannot fix
The Gregorian leap year rule is accurate but not exact. Its residual error of about 0.0003 days per year means the calendar will drift by roughly one day every 3,333 years relative to the tropical year. That drift is far smaller than the Julian error but not zero, and it is not the only source of mismatch.
Earth's rotation is also slowing, and the length of the day is increasing by roughly 1.7 milliseconds per century. That change affects the relationship between solar time and atomic time, which is why leap seconds are occasionally inserted. Leap seconds are unrelated to leap days but serve a similar purpose: keeping human timekeeping aligned with astronomical reality.
The tropical year itself is not constant. It is decreasing by about 0.5 seconds per century due to changes in Earth's orbit and the moon's tidal influence. That means the ideal leap year rule would slowly change over millennia, and no fixed integer rule can track it indefinitely. The Gregorian calendar is a compromise optimized for a span of a few thousand years, which is the relevant horizon for civil use.
For most practical purposes, the Gregorian rule is sufficient. It keeps the equinox within about a day of its nominal date for thousands of years, which is more than adequate for agriculture, scheduling, and civil law. The remaining error is a matter for astronomers and long-term calendar reformers, not for anyone checking whether 2028 has a February 29.