Days Between Two Dates

Include end date (add 1 day)

Add or Subtract from a Date

A Brief History of the Gregorian Calendar

For over sixteen centuries, much of Europe relied on the Julian calendar, introduced by Julius Caesar in 46 BCE. It assumed a solar year of exactly 365.25 days, which was remarkably close to the true value but not quite right. The actual tropical year is roughly 365.2422 days, and that small discrepancy of about 11 minutes per year gradually accumulated. By the late 1500s the calendar had drifted roughly ten days away from the astronomical seasons, throwing off the timing of Easter and other religious observances tied to the spring equinox.

In 1582, Pope Gregory XIII addressed the problem by issuing the papal bull Inter gravissimas. His reform made two key changes: ten days were dropped from October that year to realign the calendar with the equinox, and a refined leap-year rule was adopted. Under the new system, century years are only leap years when divisible by 400, so 1700, 1800, and 1900 were common years while 2000 remained a leap year. This simple adjustment reduced the average calendar year to 365.2425 days, an error of only about one day every 3,236 years.

Adoption of the Gregorian calendar was far from instant. Catholic nations such as Spain, Portugal, and Italy switched almost immediately in 1582, but Protestant and Orthodox countries held out for decades or even centuries. Britain and its American colonies did not adopt the new calendar until 1752, by which time 11 days had to be skipped. Russia waited until 1918, Greece until 1923, and Saudi Arabia only officially shifted its civil calendar to the Gregorian system in 2016. Today the Gregorian calendar serves as the international standard for civil timekeeping across nearly every country on Earth.

How Date Arithmetic Works

Adding or subtracting months from a date is less straightforward than it might seem, because months vary in length from 28 to 31 days. Most date libraries handle this by first adjusting the month number and then clamping the day if it overflows. For example, adding one month to January 31 initially gives "February 31," which does not exist, so the result is clamped to February 28 (or 29 in a leap year). This overflow-clamping approach is the most widely accepted convention, but it means that date arithmetic is not always reversible: adding one month and then subtracting one month from January 31 can land you on February 28 instead of returning you to the original date.

It is also worth distinguishing between calendar days and business days. Calendar days count every day on the calendar regardless of weekends or holidays, while business days typically exclude Saturdays, Sundays, and public holidays. The calculator on this page works with calendar days. If you need a business-day count, you would need to subtract weekends and any applicable holidays from the total. Because the list of holidays varies by country and sometimes by state or province, business-day calculations usually require a reference holiday schedule specific to your location.

Common U.S. Federal Holidays

HolidayDate
New Year's DayJanuary 1
Martin Luther King Jr. DayThird Monday in January
Presidents' DayThird Monday in February
Memorial DayLast Monday in May
Juneteenth National Independence DayJune 19
Independence DayJuly 4
Labor DayFirst Monday in September
Columbus DaySecond Monday in October
Veterans DayNovember 11
Thanksgiving DayFourth Thursday in November
Christmas DayDecember 25