It is widely assumed that once every four years we experience a leap year in which the month of February encompasses 29 days instead of the typical 28. This is in fact, a myth. In reality, there are more complicated mathematics involved in calculating leap year, and a long history behind how this custom was established.

In order to fully understand the mathematics involved, it is first necessary to address two of the most common misconceptions about leap year:

First, many believe that a year is measured as the time that elapses between January 1st and December 31st. In fact, in terms of the civil calendar, a year is actually measured as the time that elapses between vernal (spring) equinoxes. The vernal equinox occurs in the spring when the length of day and night are equal. This is also called the solar year.

The second common misconception is that many believe the leap year system was created in order to keep the calendar in sync with the four seasons. However, the premise for a leap year system was actually based on religious considerations. The vernal equinox is an important date for the Roman Catholic faith in calculating the correct day to observe Easter. For Catholics, Easter falls on the first Sunday following the first full moon that follows the vernal equinox. The leap year system was therefore designed to keep the Roman Catholic calendar aligned with the vernal equinox.

Julius Caesar first announced the creation of a leap year calendar in 46 B.C. encompassing 365 days with a leap year every 4 years encompassing 366 days. This was intended to match the full length of time between vernal equinoxes, also known as the solar year, which is 365.242374 days. In order for this system to work, the average number of days in a year in the Julian calendar must be equal to the number of days in a solar year. To calculate this we follow these steps:

First, calculate the total number of days in 400 years under the Julian calendar system. The Julian calendar has a leap year once every four years, so in 400 years, there would be 100 leap years with 366 days:

(365 days x 300 years) + (366 days x 100 years) = 146,100 total days

Then, calculate the average number of days in a Julian year:

146,100 total days/400 years = 365.25 days per year, or 365 remainder 100. In modular arithmetic, this can be written as follows: 146,100 = 100(mod 400)

Recall from before that the length of the solar year is 365.242374 days. 365.25 is therefore very close to this number. As a result, this calendar system functioned well for many years and kept the Catholic calendar aligned with the vernal equinox. However, the difference between these decimals means that the Julian year was slightly longer than the solar year.

In order to determine how much time is equal to 0.242374 days we can multiply this decimal by 24 hours in a day:

0.242374 x 24 hours = 5.81 hours

Then, we multiply 0.81 by 60 minutes in an hour:

0.81 x 60 minutes = 48.6 minutes.

Then we multiply 0.6 by 60 seconds in a minute:

0.6 x 60 seconds = 36 seconds.

Therefore the solar year is about 5 hours, 48 minutes, and 36 seconds longer than 365 days. Now let’s calculate how much longer the Julian year is than 365 days. Recall that the average length of the Julian year is 365.25 days.

First, we multiply 0.25 by 24 hours in a day:

0.25 x 24 hours = 6 hours

Therefore, the Julian year is about 6 hours longer than 365 days. The difference between the solar year and the Julian year is therefore 11 minutes and 24 seconds.

As a result of this small discrepancy, by the 16th century, the Julian calendar had fallen about 10 days behind the solar calendar. Pope Gregory XIII noticed the disparity between the two calendars and issued a second reform in 1582 to correct the error. The new proposal was a bit more complicated than the Julian calendar, and is still the method that we use today. 365.25 was slightly longer than the solar year, so the new Gregorian calendar had to decrease the number of leap years. The Gregorian calendar therefore encompasses a leap year *almost *every four years, but not in century years that are not evenly divisible by 400. For example, the year 2000, which is evenly divisible by 400, is a leap year, but the year 2100, which is not evenly divisible by 400 is not a leap year.

Let’s see how accurate the Gregorian calendar is by following the same steps as before.

First, calculate the total number of days in 400 years under the Gregorian calendar system. The Gregorian calendar has only 97 leap years for every 400 years so there would by 97 years (instead of 100 like the Julian system) with 366 days:

(365 days x 303 years) + (366 days x 97 years) = 146,097 total days

Then, calculate the average number of days in a Gregorian year:

146,097 total days/400 years = 365.2425 days per year, or 365 remainder 97. This can be written using modular arithmetic as follows: 146,097 = 97 (mod 400)

The average number of days in the Gregorian calendar, 365.2425, is much closer to the number of days in a solar year. Therefore, this calendar system more accurately is able to align the Catholic calendar with the vernal equinox. Let’s calculate how much difference exists between these two year lengths.

We already know that the solar year is about 5 hours, 48 minutes, and 36 seconds longer than 365 days. Now, we need to calculate how much longer the Gregorian year is than 365 days.

First, we will multiply 0.2425 by 24 hours in a day.

0.2425 x 24 hours = 5.82 hours

Then, we multiply 0.82 by 60 minutes in an hour.

0.82 x 60 minutes = 49.2 minutes

Then, we multiply 0.2 by 60 seconds in a minute.

0.2 x 60 = 12 seconds.

Therefore, the Gregorian year is about 5 hours, 49 minutes, and 12 seconds longer than 365 days. The difference between the Gregorian year and the solar year is then much smaller: only 36 seconds.