Table of Contents
To calculate the difference between two times in hours using Excel, follow these steps:
1. Input the two times in separate cells using the 24-hour time format. For example, 9:00 AM would be entered as 09:00 and 5:00 PM would be entered as 17:00.
2. In a third cell, use the formula =B1-A1, where B1 is the cell containing the later time and A1 is the cell containing the earlier time.
3. The result will be displayed in hours, so there is no need to convert the time format.
4. You can also format the cell to display the result in a specific time format by right-clicking and selecting “Format Cells”.
By following these steps, you can easily calculate the difference between two times in hours using Excel.
Excel: Calculate Difference Between Two Times in Hours
You can use the following formula to calculate the difference between two times in hours in Excel:
=(B2-A2)*24
This particular formula calculates the difference (in hours) between the times in cells B2 and A2.
By default, the formula B2-A2 would return the difference between cells B2 and A2 in terms of days.
Since there are 24 hours in a day, we must multiply the result of B2-A2 by 24 to get the difference in terms of hours instead of days.
The following example shows how to use this formula in practice.
Example: Calculate Difference Between Times in Hours in Excel
Suppose we have the following two columns in Excel that show the start and end times for some events:

We can type the following formula into cell C2 to calculate the difference between the start and end time for the first row in terms of hours:
=(B2-A2)*24We can then drag and fill this formula down to each remaining cell in column C:

The values in column C display the difference in hours between the Start Time and End Time for each row.
Note that the time difference in the last row is greater than 24 because the difference between the Start Time and End Time for the last row is greater than one whole day.
Note: If you only want to know the difference between two times in terms of whole hours, you can use the following formula:
=INT((B2-A2)*24)The following tutorials explain how to perform other common operations in Excel:
Cite this article
stats writer (2024). How do I calculate the difference between two times in hours using Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-calculate-the-difference-between-two-times-in-hours-using-excel/
stats writer. "How do I calculate the difference between two times in hours using Excel?." PSYCHOLOGICAL SCALES, 26 Jun. 2024, https://scales.arabpsychology.com/stats/how-do-i-calculate-the-difference-between-two-times-in-hours-using-excel/.
stats writer. "How do I calculate the difference between two times in hours using Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-calculate-the-difference-between-two-times-in-hours-using-excel/.
stats writer (2024) 'How do I calculate the difference between two times in hours using Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-calculate-the-difference-between-two-times-in-hours-using-excel/.
[1] stats writer, "How do I calculate the difference between two times in hours using Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How do I calculate the difference between two times in hours using Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
