The MathBlog days between dates calculator is designed to quickly calculate how many days are between two specific dates. It allows to identify how much time has passed since a memorable event or how many days remain until a future date.

Days Between Dates Calculator

days.

How to Use the Days Between Dates Calculator

To use this days between dates calculator, you will have to:

  1. Click on the calendar icon or field in the From section.
  2. Pick the start date of the period you’re calculating. You can use the arrows to switch between months and years.
  3. Now, click the calendar icon or field in the To section.
  4. Choose your end date.
  5. The Time between field will automatically display the result in days by default.
  6. You can also select a different unit (like weeks or months) for the result that best suits your need.

By default, the calculation excludes the final day (great for travel dates for example). If you want to include the last day in your calculation, enable the Include End Date option to adjust the result accordingly.

How to Calculate the Number of Days Between Two Dates?

While the question might seem straightforward, calculating the number of days between two dates can become more challenging as the gap between the dates increases. Let’s break it down with a few examples to make things clearer.

Editor’s Note: In the examples below, we exclude the end date. If you want to include the end date, simply add one day to the final result.

Same Month, Same Year

When both dates fall within the same month and year, the calculation is simple. You just subtract the earlier day from the later day. For example, if you’re looking at August 5, 2023, and August 15, 2023, the difference is:

15 − 5 = 10 days apart.

Same Year, Different Months

If the dates are in the same year but different months, you’ll need to calculate the total number of days from January 1 to each date, then subtract the two results. Be sure to account for leap years, which affect the number of days in February.

For instance, if you want to calculate the number of days between March 10, 2023, and June 25, 2023, start by counting the days from January 1:

  • From January 1 to March 10:
    31 (January) + 28 (February) + 10 (March) = 69 days
  • From January 1 to June 25:
    31 (January) + 28 (February) + 31 (March) + 30 (April) + 31 (May) + 25 (June) = 176 days

Now, subtract the two:
176 − 69 = 107 days

Different Years

If the two dates span across different years, you’ll need to calculate the days left in the starting year, the days that have passed in the ending year, and the full years in between.

For example, let’s figure out how many days are between October 15, 2015, and February 20, 2018.

  1. From October 15, 2015, to December 31, 2015:
    31 (October) − 15 + 30 (November) + 31 (December) = 77 days
  2. From January 1, 2018, to February 20, 2018:
    31 (January) + 20 (February) = 51 days
  3. The complete calendar years between 2016 and 2017 contribute:
    365 (2016) + 365 (2017) = 730 days

Adding it all together:
77 + 51 + 730 = 858 days.