Days Between Date

There are two formulas to find the number of days between two dates within excel. The first will only yield the number of days and that is the DAYS formula found in the Date & Time button within the FORMULAS tab in the ribbon.

The 2nd formula DATEDIF

It may also be used to find the exact number of days but will also yield the number of months or years between two dates. One very important difference between the formulas is ,The DAYS will list the end date first whereas the DATEDIF range begins with the start date.

Shown below are the two formulas being used to find the exact number of days between August 15th and September 15th.

How To Excel Between Two Dates 1


DAYS formula

It's written as =DAYS(End_Date,Start_Date) and is the quickest and easiest way to find the exact number of days or weeks (divide 7 into the results to get a week count). The dates can be formatted as Short Date (1/1/17) or Long Date (Sunday, January 1, 2017) the formula will work and the result will be the same.

How To Excel Between Two Dates To Change The Format 

The dates quickly go to the HOME tab in the ribbon and find the box and change the formatting with the drop-down menu as shown to the right.

Tip: Make sure the cell that you enter the formula into is formatted to be either General or Number otherwise it will list the date code for the numeric value. (ex: The above dates will result in 12/29/1900 as the answer until you change the formatting).

How To Excel Between Two Dates 2

The DATEDIF formula 

 it's a slightly hidden formula within Excel and is written as

=DATEDIF(startdate,enddate,”interval”)

The Interval can be either days, months, or years. All accepted codes that may be input as intervals by Excel are as follows:

  • d = days
  • m = months
  • y = years
  • ym = number of months between two days while ignoring the year
  • yd = number of days between two dates while ignoring the year
 md = number of days between two dates while ignoring the year. This is not a recommended interval as it has many issues that result in negative numbers, a zero or inaccurate results.
How To Excel Between Two Dates 3

How To Excel Between Two Dates Use all working integrals and the same date range

How to excel between two dates ,Use all working integrals and the same date range gives the best example of how these integrals work within the formula. B2 shows there are 433 days between January 1, 2017 and March 30, 2018 but look at B6,

while ignoring the year it results in 88 days between January 1st and March 30th.  B3 shows the difference as 14 months and combining B4 and B5 shows the dates are 1 year and 2 months apart.


Finding the exact Years, Months and Days between the two dates is possible with use of the ampersand.

The 3rd Formula

Are the DATEDIF using “y” integral and “ym”. The third is the DATE formula that calculates the difference between the end date and the first day of that month. To combine all three formulas : Enter an ampersand followed by the description in quotations,
 then another ampersand and the next formula.

Years , Months & Days Formula

You can see that adding “YEARS”, “MONTHS”, and “DAYS” into the formulas tells Excel exactly what the labels should be named within the results (B6). If you want to separate them with commas and spaces enter the commas and spaces into the quotation, “Years, “.

How To Excel Between Two Dates Use DATEDIF And NOW As A Countdown

Combining the two formulas creates a continuous countdown towards a specific date. Let’s start a countdown to April 15th of Next year.

=DATEDIF(NOW(),4/15/18,"d")

The result as of today (8/14/17) is 244 days until the close of tax season next year. Tomorrow the worksheet will say 243 because using NOW as the end date will continuously change the formula to the present day.

Uses Of The DATEDIF & DAYS Formulas

A few uses of the DATEDIF and DAYS formulas could be knowing how many months or days are left on a warranty, allocating depreciation, calculate the age of a company using its incorporation date and of course as a countdown to holidays.

How To Excel Between Two Dates Factoring in holidays

Another great function we can use is NETWORKDAYS, what it offers above other approaches is two fold

1.Return number of ‘workdays’ in a period

So for example if we want to know the number of working days in a year we can do this:

=NETWORKDAYS(F56,F57)

Excel gives us the result ‘260’

2. Return number of ‘workdays’ in a period FACTORING in holidays

This is very powerful, especially for budgeting, where we are trying to understand how to budget for contractors / consultants. We know the average person has 4 holidays a year (quite brutal!).

We can set up NETWORKDAYS and use the optional argument:


If we list the holidays separately, we can easily factor them in to the number:


Press  Enter and we get our updated result of 256, a more accurate value of number of days in the year that will be worked, That's how to excel between two dates.