How to Calculate Days Between Two Dates

· 5 min read

How many days until a deadline? How many weeks between two events? How many months until a contract expires? Date math sounds simple until you factor in months with different lengths, leap years, and whether to count the start or end date. The arithmetic is the easy part; the hard part is the calendar itself, which is a 2,000-year-old patchwork of compromises between astronomical reality (the Earth's orbit) and human convenience (twelve named months, seven-day weeks).

How to calculate days between dates

  1. Select your start date: pick the earlier date using the date picker.
  2. Select your end date: pick the later date.
  3. Read the result: see the total number of days, plus a breakdown in years, months, weeks, and days.

The order of dates does not matter for the absolute difference: 100 days separates two dates regardless of which you picked first. The breakdown into years, months, weeks, and days uses calendar arithmetic (not 365.25-day years or 30-day months), so a 90-day span starting in February reads differently from a 90-day span starting in June.

Adding or subtracting days

The calculator also works in reverse: start with a date and add or subtract a number of days to find the resulting date.

Example: What date is 90 days from March 1, 2026? The answer is May 30, 2026.

This is useful for:

Common date calculations

From To Days
Jan 1 Dec 31 364 (365 in leap years)
Jan 1 Jun 30 180 (181 in leap years)
Any date Same date + 1 year 365 (or 366)
Any date Same date + 1 quarter 90-92
Any date Same date + 1 month 28-31

A short history of the calendar

The dates you enter trace back to Julius Caesar's calendar reform in 45 BC, which established 365 days plus a leap day every four years. That calendar had a small error (about 11 minutes per year) that accumulated over centuries. By 1582, the calendar had drifted ten days from astronomical reality. Pope Gregory XIII fixed it that year by dropping ten days (October 4, 1582 was followed by October 15, 1582) and refining the leap-year rule: centuries (1700, 1800, 1900) are not leap years, but 2000 is. The result, the Gregorian calendar, is what every modern date calculator uses.

Different countries adopted the Gregorian calendar at different times: Catholic countries in 1582, Britain and its colonies in 1752, Japan in 1873, Russia in 1918, Greece in 1923. For dates before adoption, historical date math gets messy. For dates after, every Gregorian date is consistent worldwide.

Business days vs calendar days

The calculator counts calendar days, every 24-hour period between the two dates. Many real-world deadlines are expressed in business days, which means weekdays only and sometimes excludes public holidays.

A rough conversion: business days are about 5/7 of calendar days, so 21 calendar days is roughly 15 business days. For precise calculations, the math is harder because it depends on which days of the week the start and end dates fall on, plus the holiday calendar for your jurisdiction. Most legal and financial document templates specify business days when they mean it; default to calendar days otherwise.

For US federal holidays (10 days per year on average), HR teams typically subtract those from a calendar-day span to estimate business days. For international work, holiday calendars vary significantly: UK has 8 bank holidays, France has 11, Japan has 16, India has dozens of regional holidays.

Leap years and edge cases

A leap year occurs when the year is divisible by 4, except centuries that are not divisible by 400. So 2020, 2024, 2028 are leap years; 2100 is not; 2000 was. The next leap year is 2028. The calculator handles this automatically.

February 29 edge case: if you were born on February 29, you have a birthday only every four years. For age calculations, most jurisdictions treat your "official" birthday as February 28 in non-leap years; some use March 1. The calculator reports the actual day count, regardless of the rule your jurisdiction uses.

Month-end edge case: adding "one month" to January 31 is ambiguous (February has 28 or 29 days). Common conventions: February 28 (or 29) in the next month, or March 3 (rolling over the missing days). Most date libraries clamp to the last day of the target month. The calculator's "add months" feature uses the clamp rule.

Daylight Saving Time: DST does not affect day counting because it changes the time of day, not the date. A 30-day span starting before the DST change ends on the expected date; you simply have one day with 23 hours and one with 25 hours.

Common pitfalls

Tips

Frequently Asked Questions

Does the calculation include the start and end dates?

The calculator counts the days between the two dates. If you need to include both the start and end date in the count, add 1 to the result.

Can I add or subtract days from a date?

Yes. The date calculator has a mode where you enter a starting date and a number of days to add or subtract, giving you the resulting date.

Does it account for leap years?

Yes. The calculation uses actual calendar dates, so February 29 in leap years is handled correctly.

Can I calculate weeks and months too?

Yes. The result shows the difference broken down into years, months, weeks, and days so you can read it however you prefer.