How to Calculate the Number of Days Between Two Dates

To find the number of days between two dates, count the days from the earlier date up to the later one, accounting for each month's length and any leap years. By hand this is fiddly; the reliable way is to enter both dates into a date calculator, which returns the exact total instantly. Below is how to do it either way, plus the one decision that changes the answer: whether to include both endpoints.

Key takeaways

  • The count is the days elapsed from start to end — usually excluding one endpoint.
  • Add 1 if you need to count both the start and end day.
  • Leap years add a day when the span crosses February 29.
  • Get the exact total with the date difference calculator.

The reliable way: a date calculator

Because months have different lengths (28 to 31 days) and leap years add a day every four years, counting by hand invites mistakes over long spans. A date calculator sidesteps all of that: you pick a start date and an end date, and it counts the exact number of days using real calendar dates. It typically also shows the gap in weeks, months, and years, which is handy for anniversaries and deadlines.

Doing it by hand

For a short span within the same month, just subtract the day numbers: from the 5th to the 20th is 15 days. Across months, add up the remaining days of the first month plus the full months in between plus the days into the final month. For example, from January 25 to March 3 (non-leap year):

  • Rest of January: 31 − 25 = 6 days
  • All of February: 28 days
  • Into March: 3 days
  • Total: 6 + 28 + 3 = 37 days

Cross a leap-year February and you'd add 29 instead of 28. It works, but you can see why a tool is faster and safer for anything longer.

Get the exact number: the free Date Difference Calculator counts the days between any two dates — plus the breakdown in years, months, weeks and total days — instantly and in your browser.

Do you include both endpoints?

This is the detail that trips people up. There are two valid answers depending on what you're counting:

  • Days elapsed (the default) — from Monday to Friday is 4 days. This is what most calculators return.
  • Inclusive count — if you're counting how many days something runs, including both the first and last day, add 1. A conference from Monday to Friday "runs for 5 days."

So decide up front: are you measuring the gap between two dates, or counting a run of days? Add one for the latter.

Common uses

Counting days between dates comes up constantly: a countdown to a wedding, trip, or deadline; how long ago an event happened; a notice period or contract term; or working out someone's exact age. The same simple calculation answers all of them.

Frequently asked questions

How do you calculate the number of days between two dates?

Count the days from the start date up to the end date, accounting for the different lengths of each month and any leap years. The easiest way is to enter both dates into a date calculator, which returns the exact total instantly.

Do you include both the start and end dates?

By default the count is the days elapsed between the two dates, which excludes one endpoint. If you need to count both the start and end days as full days, add one to the total.

Do leap years affect the count?

Yes. A span that crosses February 29 in a leap year includes that extra day. A good date calculator uses real calendar dates, so leap years are handled automatically.

Related: Date Difference Calculator · Age Calculator · all Calculators