# 6 rules for calculating leap years

*Published 2026-08-31.*

> Learn the mathematical rules behind leap years, including the century exceptions, historical calendar changes, and how to calculate accurate dates.

**Canonical:** https://onlinecalculator.me/blog/leap-year-checklist/
**Companion calculator:** https://onlinecalculator.me/math/leap-year/

The Earth takes roughly 365.2422 days to complete one orbit around the sun. That trailing decimal causes a lot of trouble. If we just stuck to a flat 365-day calendar, the seasons would slowly slide out of place. Adding one extra day every four years seems like the obvious fix, and for most of our day-to-day lives, that rule works. But a flat four-year cycle assumes the solar year is exactly 365.25 days long. It is not. That slight overestimation is why the Gregorian calendar uses a cascading set of mathematical rules to keep human time aligned with planetary reality.

## The basic four-year cycle

The most common calendar rule we learn as kids is that any year divisible by four gets a February 29. For a standard year like 2024 or 2028, this math checks out perfectly. You just divide the year by four. 

Take 2024 as an example: 2024 ÷ 4 = 506. 

Since 506 is a whole number, 2024 is a leap year. If you only ever look at dates within a normal human lifespan, you can usually stop there. But as we established, adding a full day every four years actually overcorrects the calendar. It assumes an extra 0.25 days per year, rather than the actual 0.2422 days. Over time, that tiny fraction adds up, which forces the calendar to make a few adjustments at the turn of a century.

## The century exceptions

If the year ends in "00," the standard divide-by-four rule no longer applies. To offset that slight overestimation of the solar year, the Gregorian calendar intentionally skips three leap days every 400 years. It accomplishes this by ignoring century years unless they meet a much stricter requirement.

The actual rule is: If a year is divisible by 100, it is not a leap year—unless it is also cleanly divisible by 400.

Take the year 2100 as an example.
First, check the four-year rule: 2100 ÷ 4 = 525. It passes.
Next, check the century rule: 2100 ÷ 100 = 21. Because it is a century year, this rule overrides the first one.
Finally, check the 400-year exception: 2100 ÷ 400 = 5.25. Since this does not result in a whole number, the year fails the final test.

Because it fails that 400-year exception, 2100 will not be a leap year. It will only have 365 days.

Now, apply that same logic to the year 2000.
2000 ÷ 4 = 500.
2000 ÷ 100 = 20.
2000 ÷ 400 = 5.

Because 2000 is cleanly divisible by 400, the century rule is overridden yet again. The year 2000 kept its extra day and was a leap year with 366 days. This 400-year cycle means most centuries contain exactly 24 leap years. However, a century that begins with a year divisible by 400, like 1600 or 2000, will contain 25 leap years.

## Historical dates before 1582

Before you run these formulas on historical dates, you have to verify which calendar people were actually using at the time. The Gregorian calendar was officially introduced in October 1582. Prior to that, much of the Western world relied on the Julian calendar. The Julian system was simpler: it just added a leap day every four years, with zero century exceptions.

If you are doing math for the year 1492 or 1066, modern software will often apply the Gregorian rules retroactively. This concept is called the proleptic Gregorian calendar. While mathematically consistent, it does not reflect the historical reality. The people alive in 1492 were using the Julian calendar, meaning their dates will not neatly align with a backward-projected modern calendar. If you are doing historical research, double-check your calendar system before trusting the math.

## Date math and legal birthdays

Knowing whether a specific year contains 365 or 366 days is highly relevant if you are using an age calculator or figuring out the exact duration between two dates. A leap year inserts a 366th day, shifting the total day count for any timespan that crosses February 29.

For people actually born on leap day—often called leaplings—this missing day complicates legal age calculations and birthday milestones. During non-leap years, leapling birthdays are typically recognized on either February 28 or March 1. The correct date usually depends on local law. Some jurisdictions state that a person legally ages up on the last day of February, while others mandate March 1. If your calculations involve legal deadlines, contract expirations, or age limits, you need to verify how the specific state or country handles the absent February 29.

## The remaining margin of error

Even with the 100-year and 400-year corrections, the Gregorian calendar is not mathematically perfect. Remember that the true solar year is about 365.2422 days. The Gregorian system averages out to 365.2425 days per year.

This means the calendar still overestimates the solar year by roughly 26 seconds per year. That tiny discrepancy is negligible in a single lifetime, but it steadily accumulates, resulting in roughly one full day of error every 3,300 years. For practical, day-to-day planning, this margin of error is perfectly acceptable. Still, it serves as a good reminder that calendar math is ultimately a human system trying to force the messy reality of planetary orbits into a predictable grid.

## Quick reference rules

If you need a fast way to verify a year by hand, follow this priority order. Work from the top of the table down. The first condition the year meets dictates the final result.

| Condition | Rule applied | Final result |
|---|---|---|
| Divisible by 400 | The 400-year rule | Leap year (366 days) |
| Divisible by 100 | The century rule | Standard year (365 days) |
| Divisible by 4 | The 4-year rule | Leap year (366 days) |
| None of the above | The standard rule | Standard year (365 days) |

Once you understand the priority of these rules, checking a calendar year becomes a basic process of elimination. You can test your numbers and verify the exact day counts using the [Leap Year Calculator](/math/leap-year/).

## Frequently asked questions

### Is the year 2100 a leap year?

No, the year 2100 is not a leap year. Even though it is divisible by four, it is also a century year. Century years are only leap years if they are cleanly divisible by 400, which 2100 is not.

### How often do leap years happen?

Leap years generally occur every four years to keep our calendar aligned with the solar year. However, the calendar skips three leap days every 400 years to correct a slight mathematical overestimation. This means century years are usually skipped unless they divide evenly by 400.

### When do leaplings legally celebrate their birthdays?

People born on February 29 typically celebrate their birthdays on February 28 or March 1 during non-leap years. The legally recognized date depends on local jurisdiction. Some states mandate the last day of February, while others require March 1 for legal milestones.


---

Part of [onlinecalculator.me](https://onlinecalculator.me/) — free calculators that run entirely in your browser.
