Note: The other languages of the website are Google-translated. Back to English
English

## How to calculate time difference between two times or dates?

If you have two lists of time, such column A and column B (the time in column A is earlier than column B in the same row), as shown as below screenshot, and you cannot get the right time different with later time subtracting the early one. So now, I talk about the methods to calculate time difference in Excel.

#### Calculate time difference between two times in Excel

In our case, we suppose there are only hours, minutes and seconds in two columns, and the time in column A is always earlier than Column B in the same row.

1. Select a blank cell, in this case, I select Cell C2, type this formula =B2-A2+(A2>B2) (the time in Cell A2 is earlier than the Cell B2, you can change them as you need), press Enter key and then drag the fill handle to fill the range needed to apply this formula. See screenshot:

2. Select the result range, in this case select the result range C2:C6, and right click > Formats Cells in the context menu. See screenshot:

3. In the Format Cells dialog, click Number tab > Time, and select the time format you need from the right section, click OK. See screenshot:

Then you can see the time difference has been calculated as shown below:

#### Calculate time difference between two dates in Excel

If there are not only hours, minutes and seconds but also dates in the columns, you can do as follow:

1. Select a blank cell, in this case, I select Cell C2, type this formula =B2-A2 (the time in Cell A2 is earlier than the Cell B2, you can change them as you need), press Enter key and then drag the fill handle to fill the range needed to apply this formula. See screenshot:

2. Select the result range, in this case select the range C2:C6, and right click > Formats Cells in the context menu. See screenshot:

3. In the Format Cells dialog, click Number tab > Time, and select 37:30:55 from the Type section, click OK. See screenshot:

Then you can see the time difference has been calculated as shown below:

#### Calculate time difference between two dates with Kutools for Excel

If you want to calculate time difference and display the calculated time difference as words (3 hours 5 munites 12 seconds), you can use the Date & Time helper utility of Kutools for Excel.

 with more than 300 handy functions, makes your jobs more easier. Free Downloadfree full-featured in 30 days

After Kutools for Excel, please do as below:

1. Select the a cell which will place the time difference, click Kutools > Formula Helper > Date & Time helper, see screenshot:

2. In the popping dialog, check Difference checkbox, then choose two times into the Arguments input textboxes separately, choose one disply type as you need in the drop-down list of Output result type, see screeshot:

3. Click OK, then the first result displayed, drag the auto fill handle over the cells to calculate all difference of times.

### The Best Office Productivity Tools

#### Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

• Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
• Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
• Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
• Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
• Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
• Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
• Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
• Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
• More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.

#### Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

• Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
• Open and create multiple documents in new tabs of the same window, rather than in new windows.
• Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Any suggestion, if for the last case, in column C, I want to display the time difference to be displayed as total no. of minutes, how to do that?
This comment was minimized by the moderator on the site
Times (*) the Decimal answer by 24 eg; If c2 had your answer ie, 0.4375. It would be c2*24 = 10.5 (0.4375*24 = 10.5)
This comment was minimized by the moderator on the site
[quote]how do i calculate time different betwen A3 & A4 total display in b3[/quote][img]example.xlsx[/img]
This comment was minimized by the moderator on the site
i having column A and B 's cell format is as 1:30 PM then which formula i have to apply to find difference in Hours...
This comment was minimized by the moderator on the site
Dear All, by using IF formula time to be calculated if time crossed after 4 PM the formula should say late in warding...
This comment was minimized by the moderator on the site
hi i want to Calculate time difference between two dates in Excel and also I have to exclude weekend and holidays pls suggest
This comment was minimized by the moderator on the site
Hi dear, Our duty time is 8:00 to 5:00 If user allowed time to complete task is 5 Hrs he start task at as 30th May, 2015 03:00 pm and finish on 1st June, 2015 10:00am, Now calculate total spending hours but exclude Sunday off day result should be as 4 Hrs
This comment was minimized by the moderator on the site
please assist how to calculate time difference and add to the next estimated time ie. A1 =27/10/2015 11:00PM B1 = 28/10/2015 02:30 AM C1 will be the (gained or lost time) then the next estimated start time will be C1 +B1+2hours B1 is actual start time and 2 hours is the expected time between the start times.
This comment was minimized by the moderator on the site
Please advise how to convert time result 7.30 to 7.5 hours. Example result shows 7.30 hours different between two that should be total hours 7.5 in the time sheet.
This comment was minimized by the moderator on the site
ENTER EXIT TURN OVER 825 847 913 939 26 1038 1109 59 1133 1153 24 Please can you help me find a formulate to calculate turnover. The difference between Exit to Enter. Thanks.
This comment was minimized by the moderator on the site
Scenario, Compare the h:mm:ss from the column A1 and display if the value in A2 cell is greater that 15 minutes then display the timing in proper column data condition There is a value in a cell A2, 0:16:38(h:mm:ss) and column B name "
This comment was minimized by the moderator on the site
I am having A1 cell : 04/14/2016 11:15:43 AM and B2 cell : 03/31/2016 10:41:23 AM. Please let me know the time duration in minutes of between two difference date.
This comment was minimized by the moderator on the site
I am having A1 cell : 04/14/2016 11:15:43 and B2 cell : 03/31/2016 10:41:23 Please let me know the time duration in hrs of between two difference date. exmple refno reg_code status cpv_incoming_date CPV Out CPV Out Time WH CPV IN WH CPV IN time Range CPV In Time ABC A B 09-MAY-2016,14:00:50 10-May-16 16:06:59 10-May-16 9:30:00 >6 hrs and < 8 Hrs 9-May-16 14:00:50
This comment was minimized by the moderator on the site
I want to highlight the late comers time by getting the difference of exceed time(late time) with the actual time For ex: if the actual time is 8.00AM if anyone comes by 8.30AM ,the time difference be 0.30minutes .. How can i highlight that 30 minutes using conditional formating in excel? or is there any options to highlight that?
This comment was minimized by the moderator on the site
Hi team, i want to caluculate the time difference in the same cell ans the working hours should be come in next colum for example under timings 9:00am-06:00pm is there i want to know the working time in hours for example like 8 hrs or 9 hours like that. Sample: Timings Hours 09:15 AM - 06:15 PM
This comment was minimized by the moderator on the site
Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what the formula is when I also want to minus 30minutes. Is there such a formula?
This comment was minimized by the moderator on the site
Thanks for your leaving massage, you can try this formula =A1-TIME(0,30,0). See screenshot:
This comment was minimized by the moderator on the site
Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what is the formula when I also want to minus a target date Is there such a formula?

example: start date: 10/29/17 12:00 AM

A. 1st transaction date: 10/28/17 03:22 PM
B. end of 1st transaction date: 10/30/17 01:13 PM

if Column A is not equal to 10/29/17 12:00am then excess hours should be subtracted from the accumulated hrs from A and B
This comment was minimized by the moderator on the site
Sorry, Could you give a compliacted instance? Through your description, I do not understand clearly.
This comment was minimized by the moderator on the site
how to calculate difference for the below scenario

4/8/2019 10:18:22 AM

4/8/2019 6:10:01 PM

This comment was minimized by the moderator on the site
Hi, prasad nalliri, just use one date to minus another date, then format the result (a number string) as a date or time format as you need:
A1 4/8/2019 10:18:22 AM

A2 4/8/2019 6:10:01 PM
Using this formula in B1: ==ABS(A1-A2)
Result: 0.327534722
Format the result as time or date
There are no comments posted here yet