# Why we have leap days

Contributed by
Feb 28, 2008
<?xml encoding="utf-8" ??>

Warning: this post has math in it. A lot. Some of it might even be correct. If you are mathophobic, then you might want to skip to the end, where I reveal what Rosebud means.

And for those of you who are incredibly anal, yes, I know I kinda lost track of significant digits about 2/3 of the way through this. I was using a calculator, and just used whatever numbers it gave me to the last decimal place, leaving off for the most part trailing 0s. Sue me. I'm free on February 29th, 4800.

When I was a kid, I had a friend whose birthday was on February 29th. I used to rib him that he was only 3 years old, and he would visibly restrain himself from punching me. Evidently he heard that joke a lot.

Of course, he was really 12. But since February 29th is a leap day, it only comes once every four years.

And why is it only a quadrennial event?

Duh. Astronomy!

We have two basic units of time: the day and the year. Of all the everyday measurements we use, these are the only two based on concrete physical events: the time it takes for the Earth to spin once on its axis, and the time it takes to go around the Sun. Every other unit of time we use (second, hour, week, month) is rather arbitrary. Convenient, but they are not based on independent, non-arbitrary events.

It takes roughly 365 days for the Earth to orbit the Sun once. If it were exactly 365 days, we'd be all set! Our calendars would be the same every year, and there'd be no worries.

But that's not the way things are. There are not an exactly even number of days in a year; there are about 365.25 days in a year. That means every year, our calendar is off by about a quarter of a day, an extra 6 or so hours just sitting there, left over. After four years, then, the yearly calendar is off by roughly one day:

4 years at 365 (calendar) days/year = 1460 days, but

4 years at 365.25 (physical) days/year = 1461 days.

So after four years the calendar is behind by a day. That means to balance it out again we add that day back in once every four years. February is the shortest month (due to some Caesarian shenanigans), so we stick the day there, call it February 29th, the Leap Day, and everyone is happy.

Except...

The year is not exactly 365.25 days long. Our official day is 86,400 seconds long. I won't go into details on the length of the year itself (you can read a wee bit about it here), but the year we now use is called a Tropical Year and it is 365.242190419 days long. With malice aforethought -- my calculator won't hold that many digits -- let's round it to 365.2421904.

So it's a bit short of 365.25. That hardly matters, right?

Actually, it does, over time. Even that little bit adds up. After four years, we don't have 1461 physical days, we have

4 years at 365.2421904 (real) days/year = 1460.968762 days.

That means that when we add a whole day in every four years, we're adding too much! We should really only add 0.968762 days. But that's a bit of a pain, so we add in a whole day.

So even though we add a Leap Day in to balance the calendar, it's still a bit off. It's a lot better, for sure, but it's still just a hair out of whack. This time, it's ahead (since we added a whole day which is too much) by

1 - .968762 days = 0.031238 days, or about 45 minutes.

That's not a big deal, but you can see that eventually we'll run into trouble again. The calendar gains 45 minutes every 4 four years. After we've had 32 leap years (128 years of calendar time) we'll be off by a day again!

So we need to adjust our calendar again. But 128 years is hard to remember, so it was decided to round that down to 100 years. After a century, we'll have added that extra 45 minutes in 25 times (every four years for 100 years = 25 leap years). To be precise, after 100 years the calendar will be off by

25 x 0.031238 days = 0.780950 days.

That's close enough to a whole day.

Confused yet? Here's another way to think about. After 100 years, we'll have had 25 leap years, and 75 non leap years. That's a total of

(25 leap years x 366 days/leap year) + (75 years x 365 days/year) = 36,525 calendar days.

But in reality we've had 100 years of 365.2421904 days, or 36524.2421904 days. So now we're off by

36,525 - 36524.21904 = .78096

which, within roundoff error, is the number I got above. Woohoo.

So after 100 years, the calendar has gained almost a whole day on the physical number of days in a year. That means we have to stop the calendar and let the spin of the Earth catch up. To do this, every 100 years we don't add in a leap day! To make it simpler, we only do this in years divisible by 100. So 1700, 1800, and 1900 were not leap years, we didn't add an extra day, and the calendar edged that much closer to matching reality.

But notice, he says chuckling evilly, that I didn't mention the year 2000. Why not?

Because even this latest step isn't quite enough. Remember, after 100 years, the calendar still isn't off by a whole number. It's ahead by 0.78095 days. So when we subtract a day by not having leap year every century, we're overcompensating; we're subtracting too much. We're behind now, by

1 - 0.780950 days = 0.21905 days.

Arg! So every 100 years, the calendar lags behind by 0.21905 days. If you're ahead of me here (and really, I can barely keep up with myself at this point), you might say "Hey! That number, if multiplied by 5, is very close to a whole day! So we should put the leap day back in every 500 years, and then the calendar will be very close to being right on the money!"

What can I say? My readers are very smart, and you're exactly correct. So, of course, that's not how we do things.

Instead, we add the leap day back in every 400 years! Why? Because if there is a stupid way to do something, that's how it will be done.

After 400 years, we've messed up the calendar by 0.21905 days four times (once every 100 years for 400 years), and so after four centuries the calendar is behind by

4 x 0.21905 days = 0.8762 days

and that's close enough to a whole day. So every 400 years February 29th magically appears on the calendar, and once again the calendar is marginally closer to being accurate.

As a check, let me do the math a second way, in the same method I did for the leap century gambit above. In 400 years we've had 303 non-leap years, and 97 leap years. The total number of days is therefore

(97 leap years x 366 days/leap year) + (303 years x 365 days/year) = 146,097 calendar days.

400 x 365.2421904 days = 146096.8762

We can see the remainder is 0.8762 days, which checks with the previous calculation, and so I'm confident I've done this right. (phew)

Of course, the calendar's still not completely accurate at this point, because now we're ahead again. We've added a day, when we should have added only 0.8762 days, so we're ahead now by

1 - 0.8762 days = 0.1238 days.

Funny thing is, no one worries about that. There is no official rule for leap days with cycles bigger than 400 years. I think this is extremely ironic, because the amount we are off every 400 years is almost exactly 1/8th of a day! So after 3200 years, we've had 8 of those 400 year cycles, so we're ahead by

8 x 0.1238 days = 0.9904 days.

If we then left leap day off the calendars again every 3200 years, we'd only be behind by 0.0096 days! That's phenomenally accurate. I can't believe we stopped at 400 years.

But despite that, we're done! We can now, finally, see how the Leap Year Rule works:

What to do to figure out if it's a leap year or not:

We add a leap day every 4 years, except for every 100 years, except for every 400 years. In other words...

If the year is divisible by 4, then it's a leap year, UNLESS

it's also divisible by 100, then it's not a leap year, UNLESS FURTHER

the year is divisible by 400, then it is a leap year.

So 1996 was a leap year (The Little Astronomer was almost born on leap day that year, in fact). 1997, 1998, and 1999 were not. 2000 was a leap year, because even though it is divisible by 100 it's also divisible by 400.

1700, 1800, and 1900 were not leap years, but 2000 was. 2100 won't be, nor 2200, nor 2300. But 2400 will be.

This whole 400-year thingy was started in the year 1582 by Pope Gregory XIII. That's close enough to the year 1600 (which was a leap year!), so in my book, the year 4800 should not be a leap year.

But who listens to me? If you've gotten this far without blowing out your cerebrum, then I guess you listen to me. All this is fun, in my opinion, and if you have gotten this far you know as much about leap years as I do.

Which is probably too much. All you really need to know is that this year is a leap year, and we'll have plenty more for some time. You can go through my math and check me if you'd like...

Or you can just believe me. Call it a leap of faith.