How to Calculate Time Difference in Numbers?

Get FREE Advanced Excel Exercises with Solutions!

Sometimes we are in need to calculate time difference(s) in numbers for various purposes. In this article, we are going to discuss some easy ways of it.
For further explanation, we are going to use a Dataset where the Date, Arrival Time, and  Departure Time of an institution are listed.

How to Calculate Time Difference in Numbers


How to Calculate Time Difference in Numbers: 5 Easy Ways

1. Using Simple Subtraction for the Calculation of Time Difference in Numbers

Simple Subtraction is actually a very simple way for the calculation of time differences.

Steps:

  • Pick a cell for the output. I picked E5 in this case.
  • Write down the following formula:
=D5-C5

Here, Subtraction is done between the values in cells D5 and C5.

  • Press ENTER.

How to Calculate Time Difference in Numbers

Now, we have the calculated time difference in numbers in cell E5.

  • Use Fill Handle to AutoFill the rests.

Read More: How to Calculate Difference Between Two Times in Excel


2. Applying INT Function to Calculate Time Difference in Numbers

In order to calculate the time difference in numbers, we can also use the INT function.

Steps:

  • Select a cell for the output. I selected cell E5 here.
  • Input the following formula:
=INT((D5-C5)*24)

Here, Subtraction is done between the values in cells D5 and C5. We multiply 24  with the Subtracted Value to convert it into Hours. Finally, we used the INT Function to have the value in the integer number.

How to Calculate Time Difference in Numbers

  • Hit ENTER.

We have the desired output in the selected cell.

  • Now, AutoFill the remaining cells.

How to Calculate Time Difference in Numbers

Read More: How to Subtract Hours from Time in Excel


3. Employing the IF Function to Calculate the Time Difference in Numbers

Another effective way to calculate the time difference in numbers is to use the IF Function.

Steps:

  • Choose a cell to apply the IF function. Here, I picked the E5 cell.
  • Write down the following formula:
=IF((C5-B5)<0,1-(C5-B5),(C5-B5))

Here, Subtraction is done between the values in cells D5 and C5. If the result is less than 0, it will subtract that value from 1 and will show a positive value. Otherwise, it will give the subtracted value.

  • Next, press ENTER and we will have the desired result.

How to Calculate Time Difference in Numbers

  • Finally, AutoFill the remaining cells.

Read More: How to Subtract Minutes from Time in Excel


4. Using the NOW Function to Calculate the Time Difference in Numbers

The NOW Function is the easiest way to calculate the time difference. The output will automatically change with the passage of time.

Steps:

  • Pick a cell for the output. I picked the E5 cell.
  • Input the following formula:
=NOW()-C5

Here, Subtraction is done between the values of Present time and in cell C5.

How to Calculate Time Difference in Numbers

  • Press ENTER to have the result.

  • Now, AutoFill the rest.

How to Calculate Time Difference in Numbers

Read More: How to Calculate Time Difference in Minutes in Excel


5. Applying MOD Function to Calculate Time Difference in Numbers

We can use the MOD Function as well for the calculation of time differences in numbers.

Steps:

  • Select a cell for the output. I selected cell E5 here.
  • Apply the following formula:
=MOD(D5-C5,1)*24

Here, Subtraction is done between the values in cells D5 and C5. Here, 1 is the divisor given according to the need of the MOD Function which divides the subtracted value. Then,  We multiply 24  with the Subtracted Value to convert it into Hours.

  • Hit ENTER.

How to Calculate Time Difference in Numbers

We will have the output on the screen.

  • AutoFill the rests using the Fill Handle.

Read More: How to Subtract Time and Convert to Number in Excel


Practice Section

You can practice here for more expertise.

How to Calculate Time Difference in Numbers


Download Practice Workbook


Conclusion

I have tried to show how to calculate the time difference in numbers as simply as possible. I hope it will be helpful for Excel users. For any more questions, comment below.


Related Articles


<< Go Back to Subtract Time | Calculate Time | Date-Time in Excel | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Naimul Hasan Arif
Naimul Hasan Arif

Naimul Hasan Arif, a BUET graduate in Naval Architecture and Marine Engineering, has been contributing to the ExcelDemy project for nearly two years. Currently serving as an Excel and VBA Content Developer, Arif has written more than 120 articles and has also provided user support through comments His expertise lies in Microsoft Office Suite, VBA and he thrives on learning new aspects of data analysis. Arif's dedication to the ExcelDemy project is reflected in his consistent contributions and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo