The problem every calendar has to solve is awkward: a year is not a whole number of days. The time Earth takes to circle the sun and return to the same season is about 365.2422 days - 365 days, 5 hours, 48 minutes and change. A calendar must use whole days, so every calendar is really a scheme for hiding that leftover fraction of a day before it piles up and pushes the seasons out of place.
The Gregorian calendar hides the fraction better than any system before it. It does so with a leap year rule that looks slightly fussy on paper and turns out to be almost perfect in practice. Understanding it takes about two minutes, and it starts with the calendar it replaced.
The Julian calendar and its slow drift
Julius Caesar introduced the Julian calendar in 45 BC. Its rule was beautifully simple: a year has 365 days, and every fourth year gets one extra day, February 29. That makes the average year 365.25 days long. Against the real solar year of about 365.2422 days, the Julian year runs roughly 11 minutes too long.
Eleven minutes sounds like nothing. But calendars are patient, and errors compound. The Julian calendar gains about one full day every 128 years, or roughly 3 days every 400 years. By the 1500s it had been running for over sixteen centuries and had drifted about 10 days. The spring equinox, which the church used to set the date of Easter and which had fallen on March 21 in the year 325, was now arriving on March 11. Harvest festivals, saints' days and eventually everyday scheduling were all sliding away from the seasons they were named for.
The reform of 1582: ten days that never happened
Pope Gregory XIII fixed the problem in two moves. The first was a one-time correction to undo the accumulated drift. In the countries that adopted the reform immediately - Italy, Spain, Portugal, France and a few others - people went to bed on Thursday, October 4, 1582 and woke up on Friday, October 15, 1582. Ten dates, October 5 through October 14, simply never existed in those countries. Notice what did not change: the weekdays. Thursday was followed by Friday, exactly as always. Only the numbers on the calendar jumped, which is why the seven-day week has run unbroken through the whole reform.
The second move was the leap year rule that prevents the drift from coming back, and it is the rule your phone still uses today.
The leap year rule, stated once and completely
Here is the entire system in one paragraph. A year is a leap year if its number is divisible by 4. Except: a year divisible by 100 is not a leap year. Except again: a year divisible by 400 is a leap year after all. That is it. Everything else - month lengths, weekdays, your birthday - sits on top of those three sentences.
Run the rule over some real years. 2024 divides by 4, so it was a leap year. 2026 does not divide by 4, so February 2026 has 28 days. 1900 divides by 4 and by 100 but not by 400, so 1900 was not a leap year, even though people alive then might have expected one. 2000 divides by 400, so it was a leap year, which many people found surprising at the time. The next century year, 2100, will not be a leap year.
The arithmetic behind the rule is neat. In every 400-year cycle there are 100 multiples of 4, minus 4 century years, plus 1 year divisible by 400, which gives exactly 97 leap days. A 400-year cycle therefore has 400 x 365 + 97 = 146,097 days, and the average year works out to 365.2425 days. That is about 26 seconds longer than the solar year - close enough that the calendar will not be a full day wrong for roughly 3,000 years. As a bonus, 146,097 divides exactly by 7, so the Gregorian calendar repeats perfectly, weekdays and all, every 400 years. January 1, 2000 was a Saturday, and January 1, 2400 will be a Saturday too.
Why the switch took 170 years to cross the Channel
Not everyone adopted the new calendar in 1582. Protestant and Orthodox countries distrusted a reform that came from the Pope, and many kept the Julian calendar for generations. Britain and its colonies held out until 1752, by which time the drift had grown to 11 days. There, Wednesday, September 2, 1752 was followed by Thursday, September 14, 1752. The change is also why George Washington has two birthdays in the history books: he was born on February 11, 1731 under the old style, which converts to February 22, 1732 in the Gregorian system, the date now on his monuments. Russia did not switch until 1918, and Greece until 1923, which is why the Russian "October Revolution" of 1917 is commemorated in November by the modern calendar.
For everyday work this history has one practical consequence. Dates before your own country's switch were often recorded in the Julian system, so genealogists and historians convert them carefully. Any date from the last century, and any deadline you will ever be given at work, is pure Gregorian, and the rules in this guide apply exactly.
What this means for ordinary date math
Three habits follow from the system. First, February is the only month whose length moves, so any calculation crossing February in a leap year needs the rule above - our guide to leap years explained walks through the checks. Second, because the calendar repeats every 400 years and the week never breaks, weekday math is completely reliable: a date 180 days out always lands where the arithmetic says it lands. Third, when a contract says "days", it means days on this calendar, weekends included, unless it says business days - the distinction our guide to business days vs calendar days covers in full.
When you would rather not count month lengths on your knuckles, the date calculator applies the Gregorian rules for you, including the century exceptions most people forget. And for adding lengths of time rather than calendar dates, the time calculator on the homepage is the right tool.
Frequently asked questions
What is the difference between the Julian and Gregorian calendars?
The Julian calendar added a leap day every 4 years, giving an average year of 365.25 days. That is about 11 minutes too long, so the calendar drifted roughly 3 days every 400 years. The Gregorian calendar keeps most leap years but skips them in century years not divisible by 400, giving an average year of 365.2425 days, which stays in step with the seasons for thousands of years.
Why did October 1582 lose 10 days?
By 1582 the Julian calendar had drifted 10 days away from the seasons. To pull the spring equinox back to March 21, Pope Gregory XIII ordered a one-time correction: Thursday, October 4, 1582 was followed directly by Friday, October 15, 1582 in the countries that adopted the new calendar. The weekdays never skipped - only the date numbers jumped.
What is the Gregorian leap year rule?
A year is a leap year if it is divisible by 4, except that century years are only leap years if they are divisible by 400. So 2024 and 2028 are leap years, 1900 was not a leap year, and 2000 was. That rule produces exactly 97 leap days in every 400-year cycle.
When did Britain and America switch to the Gregorian calendar?
Britain and its colonies, including America, switched in 1752, by which time the drift had grown to 11 days. Wednesday, September 2, 1752 was followed by Thursday, September 14, 1752. George Washington was born on February 11 under the old calendar, which is why his birthday is now recorded as February 22, 1732.
How accurate is the Gregorian calendar?
Very. The average Gregorian year is 365.2425 days against a real solar year of about 365.2422 days, an error of roughly 26 seconds per year. It will take around 3,000 years for the calendar to drift by a single day, which is why no replacement is planned.
