Method 1 – Using DAYS Function to Calculate Time Difference in Excel Between Two Dates
- Insert the following formula in cell E5:
=DAYS(D5,C5)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- Hit Enter to confirm.
- Drag the Fill Handle icon from cell E5 to E10.
- You will get the time difference in days between the two dates.
Read More: How to Calculate Time Difference Between Two Dates in Minutes in Excel
Method 2 – Combining INT and TEXT Functions to Calculate Time Difference Between Two Dates
- 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.
- Press Enter to apply the formula.
- Drag the Fill Handle icon from cell E5 to E10.
- This gets you the time difference between two dates in days, hours, and minutes.
Read More: Difference Between Two Dates in Months in Excel
Method 3 – Using NETWORKDAYS Function to Measure Time Difference Between Two Dates
- Copy this formula in cell E5:
=NETWORKDAYS(C5,D5)
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- Press Enter to apply it.
- Use the Fill Handle icon to fill the formula from cell E5 to E10.
- Excel will calculate the time difference in days excluding the holidays.
Read More: How to Minus Number of Days or a Date from Today in Excel
Method 4 – Applying Excel DATEDIF Function to Compute Time Difference Between Two Dates
- Paste 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.
- Press the Enter key to confirm and apply the formula.
- Drag the Fill Handle icon from cell E5 to E10Â to fill in the other cells.
- Here is the calculated result:
Method 5 – Using Excel TEXT Function to Calculate Time Difference Between Two Dates
- Use following formula for 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.
- Press the Enter key.
- Drag the Fill Handle icon from cell E5 to E10.
- So you will get the time difference between two dates in years and days.
Method 6 – Subtracting Two Dates to Calculate Time Difference Between Two Dates
- Insert the formula below into cell E5:
=D5-C5
Formula Explanation
- D5 is the finishing date.
- C5 is the beginning date.
- Press the Enter button.
- Drag the Fill Handle icon from cell E5 to E10.
- You will get the time difference in the Duration column.
Read More: How to Subtract Dates in Excel to Get Years
Method 7 – Joining Excel TIME, HOUR, MINUTE, & SECOND Functions to Calculate Time Difference
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. Follow these steps:
- Use 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.
- Hit Enter to apply it.
- Drag the Fill Handle icon from cell E5 to E10.
- You will get the time difference in hours, minutes, and seconds like this:
Download Practice Workbook
You can download the Excel file from the following link and practice along with it.
<< Go Back to Subtract Dates | Calculate Dates | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!