In this article, you will learn 7 quick ways to calculate the time difference in Excel between two dates.
Download Practice Workbook
You can download the Excel file from the following link and practice along with it.
7 Ways to Calculate Time Difference in Excel Between Two Dates
1. Using DAYS Function to Calculate Time Difference in Excel Between Two Dates
You can use the DAYS function to calculate the time difference between two dates in days. Let’s see how to do that,
❶ At first, insert the following formula in cell E5.
=DAYS(D5,C5)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
❷ Now press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
Now you will get the time difference in days between the two dates.
2. Combining INT and TEXT Functions to Calculate Time Difference in Excel Between Two Dates
You can also use the INT and TEXT functions to calculate the time difference between two days.
Now here are the steps to follow:
❶ At first, insert the following formula in cell E5.
=INT(D5-C5)&" days "&TEXT(D5-C5,"h"" hrs ""m"" mins """)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- INT(D5-C5)&” days “ returns the time difference in days.
- TEXT(D5-C5,”h”” hrs “”m”” mins “””) returns the time difference in hours, minutes, and seconds.
❷ Now press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
Now you will get the time difference between two dates in days, hours, and minutes.
3. Using NETWORKDAYS Function to Calculate Time Difference in Excel Between Two Dates
The NETWORKDAYS function can calculate the time difference in days between two days. But this function excludes the holidays from the calculation.
To use this function,
❶ Insert the following formula in cell E5.
=NETWORKDAYS(C5,D5)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
❷ After that, press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
So you will get the time difference in days excluding the holidays.
Similar Readings
- Calculate Positive or Negative Difference Between Two Numbers in Excel
- How to Find Significant Difference Between Two Numbers in Excel
- Calculate Difference Between Two Rows in Pivot Table (with Easy Steps)
4. Applying DATEDIF Function to Calculate Time Difference in Excel Between Two Dates
The DATEDIF function can also return the time difference in days between two dates.
Here are the steps to follow:
❶ First, insert the following formula in cell E5.
=DATEDIF(C5,D5,"d")
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- “d” specifies that the calculated time format is in days.
❷ Then press the ENTER button.
❸ After that, drag the Fill Handle icon from cell E5 to E10.
Now here is the calculated result:
5. Using TEXT Function to Calculate Time Difference in Excel Between Two Dates
The TEXT function allows modifying the format while calculating the time difference between two dates.
Here’s how to use the TEXT function.
❶ At first, insert the following formula in cell E5.
=TEXT(D5-C5,"yy"" years ""dd"" days """)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- “yy”” years “”dd”” days “”” specifies the time format in years and days.
❷ Now press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
So you will get the time difference between two dates in years and days.
6. Subtracting Two Dates to Calculate Time Difference in Excel Between Two Dates
The simplest way to calculate the time difference between two days is to use the generic subtraction formula.
For that,
❶ Insert the following formula in cell E5.
=D5-C5
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
❷ Now press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
Finally, you will get the time difference in the Duration column.
Read More: Excel formula to find difference between two numbers
7. Joining TIME, HOUR, MINUTE, & SECOND Functions to Calculate Time Difference in Excel Between Two Dates
You can use the TIME, HOUR, MINUTE, & SECOND functions to calculate the time difference between two dates in Excel.
But one thing to mention here. The following formula can calculate the time difference only in hours, minutes, and seconds. It completely ignores the date part but focuses on the time part.
To use the formula,
❶ At first, insert the following formula in cell E5.
=TIME(HOUR(D5),MINUTE(D5),SECOND(D5))-TIME(HOUR(C5), MINUTE(C5),SECOND(C5))
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- HOUR(D5),MINUTE(D5),SECOND(D5) extract the hour, minute, and second part from D5.
- HOUR(C5),MINUTE(C5),SECOND(C5) extract the hour, minute, and second part from C5.
❷ Now press the ENTER button.
❸ Now drag the Fill Handle icon from cell E5 to E10.
Finally, you will get the time difference in hours, minutes, and seconds like this:
Practice Section
You will get an Excel sheet like the following screenshot, at the end of the provided Excel file. Where you can practice all the methods discussed in this article.
Conclusion
To sum up, we have discussed 7 easy methods to calculate the time difference in Excel between two dates. You are recommended to download the practice workbook attached along with this article and practice all the methods with that. And don’t hesitate to ask any questions in the comment section below. We will try to respond to all the relevant queries asap. And please visit our website Exceldemy to explore more.