Calculate Time Differences in Excel & Google Sheets

Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to calculate time differences in Excel & Google Sheets.

time difference

 

Time Difference

To calculate time differences in Excel simply subtract two times:

Time Difference

Note if you time difference returns a negative number you’ll see this:

Error

To fix the output you can use the ABS Function to calculate the absolute value:

=ABS(C3-B3)

ABS

Hours, Minutes, and Seconds Between Times

To display only the hours, minutes, and seconds between times you can use the HOUR, MINUTE, and SECOND Functions:

HHMMSS

Hours Between Times

To calculate the number of hours between times, subtract the times and multiply by 24 (24 hours in a day). To calculate only the number of full hours use the INT Function:

=INT((C3-B3)*24)

Hours BW Time

Minutes Between Times

To calculate the number of minutes between times do the same except multiply by 1440 (24 hours * 60 minutes):

=(C3-B3)*1440

Minutes BW Time

Seconds Between Times

Multiply by 86,400 to calculate the number of seconds between times:

=(C3-B3)*86400

Seconds BW Time

Display Time Difference

You can output a time difference as a string of text using the TEXT Function:

=TEXT(C3-B3,"hh")

Hours BW Time Text

Calculate Time Differences in Google Sheets

All of the above examples work exactly the same in Google Sheets as Excel.

Time Difference Google