We’ll show you 7 quick methods of how to calculate the difference between two dates in days in Excel. To demonstrate our methods, we’ve picked a dataset with 3 columns: “Name”, “Date Joined”, and “Date Left”. In all our methods, we’re gonna find the number of days each employee worked in a company.
Download Practice Workbook
7 Ways to Calculate Difference Between Two Dates in Days in Excel
1. Using DATEDIF Function to Find Difference Between Two Dates in Days in Excel
For the first method, we’re going to use the DATEDIF function to calculate the difference between two dates. This function is not listed in Excel, hence, no tooltip will be displayed for this function. We’ve added a column “Days Worked” in our dataset.
Steps:
- Firstly, type the following formula in cell E5.
=DATEDIF(C5,D5,"d")
The syntax of this function is DATEDIF(start_date,end_date,unit). Our initial date is on cell C5, the end date is on cell D5. and finally, we’re setting our output format to days using “d” in the function.
- Secondly, press ENTER.
We’ll see the date difference in days in cell E5.
- Finally, use the Fill Handle to AutoFill the formula to the rest of the cells.
Read More: How to Calculate Time Difference in Excel Between Two Dates (7 Ways)
2. Use of DAYS Function to Find Date Difference in Days
For the second method, we’ll use the DAYS function to get the date difference in days.
Steps:
- Firstly, type the following formula in cell E5.
=DAYS(D5,C5)
The syntax of this function is “DAYS(end_date,start_date)”.
Here, our end date is on cell D5 and the initial date is on cell C5.
- Finally, press ENTER and AutoFill the formula.
We can see this is the simpler version of the DATEDIF function. Moreover, this is what the final step should look like.
3. Calculating Difference Between Two Dates in Days Using DAYS360 Function
In this section, we’re going to use the DAYS360 function to find the difference between two dates in days.
Steps:
- Firstly, type the following formula in cell E5.
=DAYS360(C5,D5)
The syntax of this function is “DAYS360(start_date,end_date)”.
Here, our initial date is on cell C5 and the end date is on cell D5.
- Finally, press ENTER and AutoFill the formula.
This function assumes that every month consists of 30 days. Therefore, we’ll see some difference in the output from methods 1 and 2.
Similar Readings
- Calculate Positive or Negative Difference Between Two Numbers in Excel
- How to Calculate Absolute Difference between Two Numbers in Excel
- Pivot Table: Percentage Difference between Two Columns
- How to Calculate Significant Difference Between Two Means in Excel
- Excel Pivot Table: Difference between Two Columns (3 Cases)
4. Using DATE Function to Find Difference Between Two Dates in Days
For the fourth method, we’ll use the YEAR, MONTH, DAY, and DATE functions to calculate the difference between two dates in Excel.
Steps:
- Firstly, type the following formula in cell E5.
=DATE(YEAR(D5),MONTH(D5),DAY(D5))-DATE(YEAR(C5),MONTH(C5),DAY(C5))
Formula Breakdown
Firstly, our formula has two DATE functions. Finally, we’re subtracting the first date from the last date using those.
- YEAR(D5),MONTH(D5),DAY(D5) will return 2022, 5, 10 respectively.
- Now the first part of our formula reduces to -> DATE(2022,5,10)
- Output: 44691.
- Our output will be in a Serial Number format.
- Similarly, our second portion will return 44621.
- Finally, we’re subtracting it to get our date difference (44691-44621=70).
- Finally, press ENTER and AutoFill the formula.
Thus, we’ve found the difference between the two dates in days format.
5. Use of NETWORKDAYS Function to Calculate Difference Between Two Dates in Days in Excel
In this method, we’re going to use the NETWORKDAYS function to find date differences in days format. We’ve changed our dataset a little bit by adding 2 holidays.
Steps:
- Firstly, type the following formula in cell E5.
=NETWORKDAYS(C5,D5,$C$13:$C$14)
The syntax of this function is “NETWORKDAYS(start_date, end_date, [holidays])”.
Here, our initial date is on cell C5 and the end date is on cell D5 and our holidays are in cell range C13:C14. Moreover, remember to use absolute cell references in this function.
- Secondly, press ENTER.
- Finally, AutoFill the formula.
In conclusion, we’ll find the Workdays in days between the dates.
This function considers Saturday and Sunday as Weekends. However, if you want to change the Weekends, you need to use the NETWORKDAYS.INTL function.
6. Find Difference Between Two Dates in Days in Excel Using a Generic Formula
In this section, we’ll use a generic formula to calculate the date differences in days.
Steps:
- Firstly, select the cell range E5:E10.
- Secondly, type the following formula.
=D5-C5
Here, we’re just simply subtracting the end date from the starting date.
- Finally, press CTRL + ENTER.
This will AutoFill our formula.
Read More: Excel formula to find difference between two numbers
7. Use of TODAY Function to Find Difference Between Two Dates in Days in Excel
For the last method, we’re gonna use the TODAY function and subtract the initial date value from it to find our date difference. We’ve removed a column from our dataset.
Steps:
- Firstly, select the cell range E5:E10.
- Secondly, type the following formula.
=TODAY()-C5
Here, we’re just simply subtracting the end date from today’s date. Therefore, your value will not be the same when you open this file. Moreover, if you have a large dataset, you should avoid using this function, as it will slow down your computer.
- Finally, press CTRL + ENTER.
This will AutoFill our formula. Thus, we’ve shown you yet another formula to find the difference between two dates in days format in Excel.
Read More: How to Calculate Time Difference Between Two Dates in Minutes in Excel
Practice Section
We’ve added practice datasets for each method in the Excel file.
Conclusion
We’ve shown you 7 methods of how to calculate the difference between two dates in days in Excel. However, If you face any difficulties, feel free to comment below for assistance. Thanks for reading, keep excelling!
Related Articles
- How to Calculate Difference Between Two Times in Excel (8 Methods)
- Calculate Time Difference in Minutes in Excel (3 Easy Methods)
- How to Calculate Time Difference in Excel VBA (2 Methods)
- Calculate Time Difference in Numbers (5 Easy Ways)
- How to Find Significant Difference Between Two Numbers in Excel
- Calculate Difference Between Two Rows in Pivot Table (with Easy Steps)