How to Calculate Time Difference in Excel Between Two Dates (7 Ways)

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.

Using DAYS Function to Calculate Time Difference in Excel Between Two Dates

❸ Now drag the Fill Handle icon from cell E5 to E10.

Now you will get the time difference in days between the two dates.

Calculate Time Difference in Excel Between 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.

Combining INT and TEXT Functions to Calculate Time Difference in Excel Between Two Dates

❸ 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.

Using NETWORKDAYS Function to Calculate Time Difference in Excel Between Two Dates

❸ Now drag the Fill Handle icon from cell E5 to E10.

Using Fill Handle to Calculate Time Difference in Excel Between Two Dates

So you will get the time difference in days excluding the holidays.


Similar Readings


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.

Applying DATEDIF Function to Calculate Time Difference in Excel Between Two Dates

❸ 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.

Using TEXT Function to Calculate Time Difference in Excel Between Two Dates

❸ 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.

Subtracting Two Dates to Calculate Time Difference in Excel Between Two Dates

❸ 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.

Joining TIME, HOUR, MINUTE, & SECOND Functions to Calculate Time Difference in Excel Between Two Dates

❸ 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.


Related Articles

Mrinmoy

Mrinmoy

Hi! I'm Mrinmoy Roy. I'm an Excel and VBA content developer. I write blogs relating to Microsoft Excel on Exceldemy.com. I've completed my graduation in Electronics and Communication Engineering from Khulna University of Engineering & Technology. I've expertise in Excel functions, formulas, Pivot Table, Power Query, Visual Basic, etc. I write blogs to lessen people's hassles while working on Microsoft Excel.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo