In this tutorial you will learn How to Calculate time difference in Google Sheets
To calculate time difference in google Sheets you can use the below funtions:
=HOUR(B2-A2)
=MINUTE(B2-A2)
=MINUTE(B2-A2)
How to Calculate time difference in Google Sheets : Step by Step Guide
Here are the steps with examples to calculate time difference in Google Sheets.
#Calculate time difference in Google Sheets using Functions
You can use the in-built functions provided by google sheets to calculate the time difference.
=HOUR(B2-A2) - to get the difference only in hours =MINUTE(B2-A2) - to get the difference only in minutes =SECOND(B2-A2) - to get the difference only in seconds
These functions only perform time difference calculation for a period of 24 hours, 60 minutes, and 2 seconds. The formulas will return errors if the time difference is greater than these bounds.
Let’s see the above formulas in action😃 :
Step 1 : Open google sheets and prepare your dataset
Open google sheets where you need to perform the calculation .
In this example we will use the below dataset.
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-aVg3c8gO/w:882/h:167/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-153.png)
Step 2 : Apply the formula
Now we will apply the above formula as shown below.
Time Difference in hours
Select the cell C2 and apply the formula =HOUR(B2-A2) and press enter
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-0VFF4yOT/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-154.png)
Drag the blue square icon on the cell C2 to apply the formula donwards across the remaining cells.
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-xYClzF3Y/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-155.png)
Time Difference in minutes
Select the cell D2 and apply the formula =MINUTE(B2-A2) and press enter
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-jpvvPy0v/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-156.png)
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-uwDb0TNl/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-157.png)
Time Difference in seconds
Select the cell E2 and apply the formula =SECOND(B2-A2) and press enter.
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-96TkKPaJ/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-158.png)
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-EQxQQxYr/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-159.png)
Calculate time difference in Google Sheets using the TEXT function
Another method to calculate the time difference in Google Sheets is using the TEXT function:
Use the below formula to calculate the time difference using TEXT function in Google Sheets.
=TEXT(B2-A2,"h") - to calculate in hours =TEXT(B2-A2,"h:mm") - to calculate in minutes =TEXT(B2-A2,"h:mm:ss") - to calculate in hours, minutes, and seconds
Calculate time difference in hours using TEXT function
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-jcPAlHrW/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-160.png)
Confirm auto-fill to apply the formula on rest of cells in the Column.
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-uPyOsmm-/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-162.png)
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-4afSkAEG/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-163.png)
Calculate time difference in hours and minutes using TEXT function
![](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-ocqdOIki/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-164.png)
Calculate time difference in hours ,minutes and seconds using TEXT function.
![How to Calculate time difference in Google Sheets](https://ml6efdvut7qo.i.optimole.com/Sjge_4I-GsffG8p_/w:auto/h:auto/q:auto/https://addnewskills.com/wp-content/uploads/2022/10/image-165.png)
How to Calculate time difference in Google Sheets(Conclusion)
In the above tutorial we have shown you two methods using which you can easily calculate the time difference in Google Sheets .
We hope this tutorial on How to Calculate time difference in Google Sheets was useful.
Related articles :
How to Insert Spin Button in Google Sheets ( Easy Guide )
How to Freeze Rows in Google Sheets
How to Calculate Square Root and Cube Root in Google Sheets(Quick & Easy Guide)
How to use SUMSQ Function in Google Sheets(Quick & Easy Guide )