You've probably seen the question on a trivia night card or in a comment section argument: how many days in 100 years?Which means * Most people do the quick math — 365 times 100 — and call it 36,500. Done. Next question.
But that answer is wrong. And the reason it's wrong tells you something interesting about how we measure time.
What Is a Century, Really?
A century is just 100 years. That part's simple. The trouble starts when you try to pin down how many days* live inside those 100 years.
Here's the short version: a 100-year span contains either 36,524 or 36,525 days. Which one depends entirely on which* 100 years you're counting.
The Basic Math
Start with the foundation. A common year has 365 days. Multiply by 100 and you get 36,500. That's your baseline — but it ignores leap years entirely.
Leap years add a day every four years. February 29 shows up to keep the calendar aligned with Earth's orbit, which takes roughly 365.That's why 2422 days. Consider this: without that correction, the seasons would drift. After a few centuries, July would feel like December in the Northern Hemisphere.
So: 100 ÷ 4 = 25 leap years. Add 25 days to 36,500 and you get 36,525 days.
That's the answer most people settle on. It's also incomplete.
The Century Rule That Changes Everything
The Gregorian calendar — the one most of the world uses — has a catch. Century years (1700, 1800, 1900, 2000, 2100) are not leap years unless they're divisible by 400.
Read that again. It's the rule that trips everyone up.
- 1700, 1800, 1900 — not leap years
- 2000 — leap year (divisible by 400)
- 2100, 2200, 2300 — not leap years
- 2400 — leap year
This rule exists because the "leap year every 4 years" approximation slightly overcorrects. 0078-day difference compounds. Practically speaking, the real solar year is 365. So over 400 years, it adds up to about three extra days. That 0.25. 2422 days, not 365.Skipping three century leap years every 400 years fixes the drift.
Why It Matters: The Answer Depends on Your Start Date
This isn't trivia. If you're calculating date differences in software, planning a long-term project, or just trying to win a bar bet, the start and end years determine the answer.
Scenario A: January 1, 1901 – December 31, 2000
This 100-year block includes the year 2000 (a leap year) but excludes* 1900 (not a leap year). 1996, 2000. Leap years in this span: 1904, 1908, 1912... That's 25 leap years.
Total: 36,525 days.
Scenario B: January 1, 1900 – December 31, 1999
This block includes 1900 (not a leap year) and excludes 2000. Leap years: 1904 through 1996. That's 24 leap years.
Total: 36,524 days.
Scenario C: January 1, 2000 – December 31, 2099
Includes 2000 (leap), excludes 2100 (not leap). 25 leap years.
Total: 36,525 days.
Scenario D: January 1, 2001 – December 31, 2100
Excludes 2000, includes 2100 (not leap). 24 leap years.
Total: 36,524 days.
See the pattern? Even so, any 100-year window that includes* a divisible-by-400 year (like 2000) gets 36,525 days. Any window that straddles* a non-leap century year (1900, 2100, 2200, 2300) gets 36,524. No workaround needed.
How It Works: The Leap Year Algorithm
If you're building this logic into code or a spreadsheet, here's the actual rule set. It's simpler than it looks.
If you found this helpful, you might also enjoy how many minutes is 10 miles or how long is a billion minutes.
The Three-Step Test
For any given year:
- If the year is not divisible by 4 → common year (365 days)
- If the year is divisible by 100 but not by 400 → common year (365 days)
- Otherwise → leap year (366 days)
That's it. Still, three conditions. The second one is the only tricky part.
Pseudocode
function isLeapYear(year):
if year % 4 != 0:
return false
if year % 100 == 0 and year % 400 != 0:
return false
return true
Counting Leap Years in a Range
To count leap years between year A and year B (inclusive):
leapCount = 0
for y from A to B:
if isLeapYear(y):
leapCount += 1
totalDays = (B - A + 1) * 365 + leapCount
For a 100-year span, you can optimize. But the loop is fast enough for any modern language — 100 iterations is nothing.
Common Mistakes: What Most People Get Wrong
Mistake 1: Assuming Every 4th Year Is a Leap Year
This is the big one. They forget the century exception. People hear "leap year every 4 years" and stop listening. Then they're off by a day when calculating date differences across 1900 or 2100.
I've seen production bugs from this. A billing system that charged for an extra day every century. Now, a license expiration that drifted. It happens.
Mist
Mistake 2: Ignoring Exact Date Boundaries Within Leap Years
Even if you correctly identify leap years, another common error is failing to account for whether the leap day (February 29) actually falls within your date range. That said, for instance, if you're calculating the days between March 1, 2000, and February 28, 2001, the leap day of 2000 won’t be included—despite 2000 being a leap year. This oversight leads to undercounting by one day per affected leap year.
Similarly, a period from January 1, 1900, to February 28, 1901, skips the non-leap day of 1900 entirely, but someone might mistakenly add an extra day because they’re thinking in whole years rather than precise dates. Always verify whether the leap day is within* your start and end dates, not just whether the year itself is a leap year.
Mistake 3: Forgetting Historical Calendar Changes
The Gregorian calendar (which introduced the modern leap year rules) wasn’t universally adopted until the 20th century. Countries like Russia and Greece switched as late as 1918 and 1923, respectively. If your project
Mistake 3: Forgetting Historical Calendar Changes
About the Gr —egorian calendar (which introduced the modern leap year rules) wasn’t universally adopted until the 20th century. And countries like Russia and Greece switched as late as 1918 and 1923, respectively. And if your project involves historical dates, this matters. Before the Gregorian reform, the Julian calendar was in use, which had a simpler rule: every year divisible by 4 was a leap year, with no exceptions for centuries. Basically, dates before the adoption of the Gregorian calendar may follow different leap year logic entirely.
Additionally, when countries transitioned to the Gregorian system, they often skipped days to align with the new calendar. Here's one way to look at it: Britain and its colonies dropped 11 days in September 1752. These adjustments can create gaps or overlaps in date sequences, making it critical to account for local calendar reforms when working with historical data.
Conclusion
While the leap year algorithm itself is straightforward, real-world applications demand careful attention to edge cases and historical context. That's why always validate leap years against the three-step test, confirm whether leap days fall within your date range, and consider historical calendar shifts when dealing with older data. Whether you’re building a date calculator, auditing a legacy system, or simply curious about calendar quirks, understanding both the rules and their limitations ensures accuracy. With these practices, you’ll avoid the pitfalls that have tripped up developers and mathematicians for centuries.