Calculating the Number of Days between two dates

There are two ways that you can calculate the number of days between two dates in Excel:

  • Use subtraction
  • Use the “DAYS” function

Using Subtraction

If you enter the two dates into two cells, you can enter a formula into a third cell.

For example:

  • Enter “October 25, 2015” (without the quotes) into cell B1
  • Enter “October 25, 2016” (without the quotes) into cell B2

To find the number of days between these two dates, you can enter “=B2-B1” (without the quotes into cell B3). Once you hit enter, Excel will automatically calculate the number of days between the two dates entered.

 

     

Note: Excel will display the date October 25, 2015 as 25-Oct-15 (and similarly for October 25, 2016)

Note that Excel recognizes leap years.

Using the DAYS function

The DAYS function returns the number of days between two dates.
DAYS(end_date, start_date)
where the following arguments are required:

  • End_date
  • Start_date

The Start_date and End_date are the two dates between which you want to know the number of days.

For the dates we used above, you can enter the dates directly:

=DAYS(“25-October-2016”, “25-October-2015”).

Note the quotes around the dates.

using the DAYS function

Or you can use the cell references as above:

using days function with cell references

You end up with the same result as using the formula above.

For more information about the DAYS function, see this Microsoft Support page.

Try it yourself:

Compute the number of days between September 4, 2014 and November 1, 2014 using Excel. Use whichever method you prefer (formula or DAYS function).

You can find the solution in the following spreadsheet Calculating Days between Dates – Template

(Answer: 58)

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Using Excel in Business Math Copyright © by Lisa Koster is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.

Share This Book