How to calculate time in Excel - time difference, adding / subtracting times

This tutorial focuses on various ways to calculate times in Excel. You will find a few useful formulas to add and subtract times, calculate time difference, or elapsed time, and more.

In the last week's article, we had a close look at the specificities of Excel time format and capabilities of basic time functions. Today, we are going to dive deeper into Excel time calculations and you will learn a few more formulas to efficiently manipulate times in your worksheets.

How to calculate time difference in Excel (elapsed time)

To begin with, let's see how you can quickly calculate elapsed time in Excel, i.e. find the difference between a beginning time and an ending time. And as is often the case, there is more than one formula to perform time calculations. Which one to choose depends on your dataset and exactly what result you are trying to achieve. So, let's run through all methods, one at a time.

Add and subtract time in Excel with a special tool

No muss, no fuss, only ready-made formulas for you
Date & Time Formula Wizard for Excel Read more

Easily find difference between two dates in Excel

Get the result as a ready-made formula in years, months, weeks, or days
Date & Time Formula Wizard for Excel Read more

Calculate age in Excel on the fly

And get a custom-tailored formula
Date & Time Formula Wizard for Excel Read more

Formula 1. Subtract one time from the other

As you probably know, times in Excel are usual decimal numbers formatted to look like times. And because they are numbers, you can add and subtract times just as any other numerical values.

The simplest and most obvious Excel formula to calculate time difference is this:

=End time - Start time

Depending on you data structure, the actual time difference formula may take various shapes, for example:

Formula Explanation
=A2-B2 Calculates the difference between the time values in cells A2 and B2.
=TIMEVALUE("8:30 PM") - TIMEVALUE("6:40 AM") Calculates the difference between the specified times.
=TIME(HOUR(A2), MINUTE(A2), SECOND(A2)) - TIME(HOUR(B2), MINUTE(B2), SECOND(B2)) Calculates the time difference between values in cells A2 and B2 ignoring the date difference, when the cells contain both the date and time values.

Remembering that in the internal Excel system, times are represented by fractional parts of decimal numbers, you are likely to get the results similar to this:
Calculating time difference in Excel

The decimals in column D are perfectly true but not very meaningful. To make them more informative, you can apply custom time formatting with one of the following codes:

Time code Explanation
h Elapsed hours, display as 4.
h:mm Elapsed hours and minutes, display as 4:10.
h:mm:ss Elapsed hours, minutes and seconds, display as 4:10:20.

To apply the custom time format, click Ctrl + 1 to open the Format Cells dialog, select Custom from the Category list and type the time codes in the Type box. Please see Creating a custom time format in Excel for the detailed steps.

And now, let's see how our time difference formula and time codes work in real worksheets. With Start times residing in column A and End times in column B, you can copy the following formula in columns C though E:


The elapsed time is displayed differently depending on the time format applied to the column:
The elapsed time is displayed differently depending on the applied time format.

Note. If the elapsed time is displayed as hash marks (#####), then either a cell with the formula is not wide enough to fit the time or the result of your time calculations is a negative value.

Formula 2. Calculating time difference with the TEXT function

Another simple technique to calculate the duration between two times in Excel is using the TEXT function:

  • Calculate hours between two times: =TEXT(B2-A2, "h")
  • Return hours and minutes between 2 times: =TEXT(B2-A2, "h:mm")
  • Return hours, minutes and seconds between 2 times: =TEXT(B2-A2, "h:mm:ss")

Calculating time difference with TEXT function


  • The value returned by the TEXT function is always text. Please notice the left alignment of text values in columns C:E in the screenshot above. In certain scenarios, this might be a significant limitation because you won't be able to use the returned "text times" in other calculations.
  • If the result is a negative number, the TEXT formula returns the #VALUE! error.

Formula 3. Count hours, minutes or seconds between two times

To get the time difference in a single time unit (hours ,minutes or seconds), you can perform the following calculations.

Calculate hours between two times:

To present the difference between two times as a decimal number, use this formula:

=(End time - Start time) * 24

Supposing that your start time is in A2 and end time in B2, you can use a simple equation B2-A2 to calculate the difference between two times, and then multiply it by 24, which is the number of hours in one day:

=(B2-A2) * 24

To get the number of complete hours, use the INT function to round the result down to the nearest integer:

=INT((B2-A2) * 24)
Calculating hours between two times in Excel

Total minutes between two times:

To calculate the minutes between two times, multiply the time difference by 1440, which is the number of minutes in one day (24 hours * 60 minutes = 1440).

=(End time - Start time) * 1440

As demonstrated in the following screenshot, the formula can return both positive and negative values, the latter occur when the end time is less than the start time, like in row 5:

Calculating total minutes between two times in Excel

Total seconds between times:

To get the total seconds between two times, you multiply the time difference by 86400, which is the number of seconds in one day (24 hours * 60 minutes * 60 seconds = 86400).

=(End time - Start time) * 86400

In our example, the formula is as follows:

=(B2-A2)* 86400
Calculating total seconds between two times

Note. For the results to display correctly, the General format should be applied to the cells with your time difference formula.

Formula 4. Calculate difference in one time unit ignoring others

To find the difference between 2 times in a certain time unit, ignoring the others, use one of the following functions.

  • Difference in hours, ignoring minutes and seconds:


  • Difference in minutes, ignoring hours and seconds:


  • Difference in seconds, ignoring hours and minutes:


When using Excel's HOUR, MINUTE and SECOND functions, please remember that the result cannot exceed 24 for hours and 60 for minutes and seconds.
Calculate time difference in one unit ignoring others

Note. If the end time is less than the start time (i.e. the result of the formula is a negative number), the #NUM! error is returned.

Formula 5. Calculate elapsed time from a start time to now

In order to calculate how much time has elapsed since the start time to now, you simply use the NOW function to return today's date and the current time, and then subtract the start date and time from it.

Supposing that the beginning date and time is in call A2, the formula =NOW()-A2 returns the following results, provided you've applied an appropriate time format to column B, h:mm in this example:
Calculating elapsed time from a start time to now

In case the elapsed time exceeds 24 hours, use one of these time formats, for example d "days" h:mm:ss like in the following screenshot:
Calculating elapsed time over 24 hours

If your starting points contain only time values without dates, you need to use the TIME function to calculate the elapsed time correctly. For example, the following formula returns the time elapsed since the time value in cell A2 up to now:

Calculating elapsed time without dates

Note. The elapsed time is not updated in real-time, it refreshes only when the workbook is reopened or recalculated. To force the formula to update, press either Shift + F9 to recalculate the active spreadsheet or hit F9 to recalculate all open workbooks.

Formula 5. Display time difference as "XX days, XX hours, XX minutes and XX seconds"

This is probably the most user-friendly formula to calculate time difference in Excel. You use the HOUR, MINUTE and SECOND functions to return corresponding time units and the INT function to compute the difference in days. And then, you concatenate all these functions in a single formula along with the text labels:

=INT(B2-A2) & " days, " & HOUR(B2-A2) & " hours, " & MINUTE(B2-A2) & " minutes and " & SECOND(B2-A2) & " seconds"
A user-friendly Excel time difference formula

To instruct your Excel time difference formula to hide zero values, embed four IF functions into it:

=IF(INT(B2-A2)>0, INT(B2-A2) & " days, ","") & IF(HOUR(B2-A2)>0, HOUR(B2-A2) & " hours, ","") & IF(MINUTE(B2-A2)>0, MINUTE(B2-A2) & " minutes and ","") & IF(SECOND(B2-A2)>0, SECOND(B2-A2) & " seconds","")

The syntax may seem excessively complicated, but it works :)

Excel time difference formula that ignores zero values

Alternatively, you can calculate time difference by simply subtracting the start time from the end time (e.g. =B2-A2), and then apply the following time format to the cell:

d "days," h "hours," m "minutes and" s "seconds"
Subtract the start time from the end time and apply the custom time format to the cell.

An advantage of this approach is that your result would be a normal time value that you could use in other time calculations, while the result of the complex formula discussed above is a text value. A drawback is that the custom time format cannot distinguish between zero and non-zero values and ignore the latter. To display the result in other formats, please see Custom formats for time intervals over 24 hours.

How to calculate and display negative times in Excel

When calculating the time difference in Excel, you may sometimes get the result as ###### error because the difference is a negative time. But is there a way to show negative times properly in Excel? Of course, there is a way, and even more than one :)

Method 1. Change Excel Date System to 1904 date system

The fastest and easiest way to display negative time normally (with a minus sign) is switching to the 1904 date system. To do this, click File > Options > Advanced, scroll down to the When calculating this workbook section and put a tick in the Use 1904 date system box.
Changing to the 1904 data system

Click OK to save the new settings, and from now on negative times will be displayed correctly, like negative numbers:
In the 1904 date system, negative times are displayed like negative numbers

Method 2. Calculate negative time in Excel with formulas

Is changing Excel's default Date System is not an option, then you can force negative times to display properly using one of the following formulas:

=IF(A2-B2>0, A2-B2, "-" & TEXT(ABS(A2-B2),"h:mm"))

=IF(A2-B2>0, A2-B2, TEXT(ABS(A2-B2),"-h:mm"))

Both formulas check if the time difference (A2-B2) is greater than 0, and if it is they return that difference. If the time difference is less than zero, the first formula calculates the absolute difference and concatenates the minus sign. The second formula yields exactly the same result by using a negative time format "-h::mm".
A formula to calculate negative times in Excel

Note. Please keep in mind that unlike the first method that treats negative times as negative numeric values, the result of the TEXT function is always a text string that cannot be used in calculations or other formulas.

Adding and subtracting time in Excel

Basically, there are 2 ways to add and subtract time in Excel:

  • Using the TIME function
  • Using arithmetic calculations based on the number of hours (24), minutes (1440) and seconds (86400) in one day

The TIME(hour, minute, second) function makes Excel time calculations really easy, however it does not allow adding or subtracting more than 23 hours, or 59 minutes, or 59 seconds. If you are working with bigger time intervals, then use one of the arithmetic calculations demonstrated below.

How to add or subtract hours to time in Excel

To add hours to a given time in Excel, you can use one the following formulas.

TIME function to add under 24 hours

=Start time + TIME(N hours, 0, 0)

For example, if your start time is in cell A2, and you want to add 2 hours to it, the formula is as follows:

=A2 + TIME(2, 0, 0)
TIME function to add under 24 hours

Note. If you try adding more than 23 hours with the TIME function, the specified hours will be divided by 24 and the remainder will be added to the start time value. For example, if you try to add 25 hours to "6/2/2015 10:00 AM" (cell A4) using the formula =A4 + TIME(25, 0, 0), the result will be "06/02/2015 11:00", i.e. A4 + 1 hour.

Formula to add any number of hours (under or over 24 hours)

The following formula has no limitations to the number of hours you want to add:

= Start time + (N hours / 24)

For example, to add 28 hours to the start time in cell A2, enter the following formula:

=A2 + (28/24)

Universal formula to add hours to a given time in Excel

To subtract hours from a given time, you use analogous formulas, and just replace "+" with the minus sign:

For example, to subtract 3 hours from the time in cell A2, either of the following formulas will do:



To subtract more than 23 hours, use the first one.

How to add / subtract minutes to time in Excel

To add minutes to a given time, employ the same techniques that we've just used for adding hours.

To add or subtract under 60 minutes

Use the TIME function and supply the minutes you want to add or subtract in the second argument:

=Start time + TIME(0, N minutes, 0)

And here are a couple of real-life formulas to calculate minutes in Excel:

To add 20 minutes to the time in A2: =A2 + TIME(0,20,0)

To subtract 30 minutes from the time in A2: =A2 - TIME(0,30,0)

To add or subtract over 60 minutes

In your calculation, divide the number of minutes by 1440, which is the number of minutes in a day, and add the quotient to the start time:

=Start time + (N minutes / 1440)

To subtract minutes from time, simply replace plus with the minus sign. For example:

To add 200 minutes: =A2 + (200/1440)

To subtract 300 minutes: =A2 -(300/1440)

Adding and subtracting minutes in Excel

How to add / subtract seconds to a given time

Second calculations in Excel are done in a similar fashion.

To add under 60 seconds to a given time, you can use the TIME function:

=Start time + TIME(0, 0, N seconds)

To add more than 59 seconds, use the following formula:

=Start time + (N seconds / 86400)

To subtract seconds, utilize the same formulas with the minus sign (-) instead of plus (+).

In your Excel worksheets, the formulas may look similar to these:

To add 30 seconds to A2: =A2 + TIME(0,0,31)

To add 1200 seconds to A2: =A2 + (1200/86400)

To subtract 40 seconds from A2: =A2 - TIME(0,0,40)

To subtract 900 seconds from A2: =A2 - (900/86400)

How to sum time in Excel

The Excel sum time formula is the usual SUM function, and applying the proper time format to the result is what does the trick.

Supposing you have a few project times in column B and you want to add them up. You write a simple SUM formula like =SUM(B2:B4) and get the result in the default format, like hh:mm:ss.
A SUM formula to add up times in Excel

In some cases the default time format works just fine, but sometimes you may want more, for example to display the total time as minutes and seconds, or seconds only. The good news is that no other calculations are required, all you have to do is apply custom time format to the cell with the SUM formula.

Right click the cell and select Format Cells in the context menu, or press Ctrl + 1 to open the Format Cells dialog box. Select Custom from the Category list and type one of the following time formats in the Type box:

  • To display total time as minutes and seconds: [m]:ss
  • To display total time as seconds: [ss]

The result will look as follows:
Apply the custom time format to display total time as minutes and seconds, or seconds only.

How to sum over 24 hours in Excel

In order to add up more than 24 hours, you use the same SUM formula as discussed above, and apply one of the following time formats to the cell:

Format Displays as Explanation
[h]:mm 30:10 Hours and minutes
[h]:mm:ss 30:10:20 Hours, minutes and seconds
[h] "hours", mm "minutes", ss "seconds" 30 hours, 10 minutes, 20 seconds
d h:mm:ss 1 06:10:20 Days, hours, minutes and seconds
d "day" h:mm:ss 1 day 06:10:20
d "day," h "hours," m "minutes and" s "seconds" 1 day, 6 hours, 10 minutes and 20 seconds

To see how these custom time formats may look like in your Excel worksheet, please have a look at the screenshot below, where the same SUM formula is entered in cells A9 to A13:


Adding up more than 24 hours in Excel

Note. The above custom time formats work for positive values only. If the result of your time calculations is a negative number, e.g. when you are subtracting a bigger time from a smaller time, the result will be displayed as #####. To display negative times differently, please see custom format for negative time values.

Also, please keep in mind that the time format applied to a cell changes only the display presentation without changing the cell's value. For example, in the screenshot above, cell A13 looks like text, but in fact it's a usual time value, which is stored as a decimal in the internal Excel system. Meaning, you are free to refer to that cell in other formulas and calculations.

To have a closer look at the time formulas discussed in this article, feel free to download our Sample Workbook with Time Calculations.

Date & Time Formula Wizard - quick way to calculate times in Excel

Now that you know a bunch of different formulas to add and subtract times in Excel, let me show you the tool that can do it all. Okay, almost all :)

Here comes Ablebit's Date & Time Formula Wizard for Excel:
Date & Time Formula Wizard for Excel

In the Date & Time Wizard dialog window, you switch to the Add or Subtract tab, depending on which operation you want to perform, and do the following:

  • Click the Show time fields link in the left part of the window.
  • Supply values or cell references for the formula arguments. As you fill in the argument boxes, the wizard builds the formula in the selected cell.
  • When finished, click the Insert Formula

That's it! For example, this is how you can add the specified number of hours, minutes and seconds to the time in A4:
Add hours, minutes and seconds to the original time in Excel

If you need to copy the formula to other cells, fix all references except the cell containing the original time (A4) with the $ sign like shown in the screenshot below (by default, the wizard always uses relative references). Then double-click the fill handle to copy the formula down the column and you are good to go!
Formula to add hours, minutes and seconds to time in Excel

Besides time calculations, the wizard can also add and subtract dates, get the difference between two dates, and calculate age from the birthdate.

If you are curious to try this tool in your own worksheets, you are welcome to download the 14-day trial version of our Ultimate Suite which includes this as well as 60 more time saving add-ins for Excel.

This is how you calculate time in Excel worksheets. To learn other ways to manipulate dates and times in Excel, I encourage you to check out the resources at the end of this article. I thank you for reading and hope to see you on our blog next week!

Excel Date and Time tutorials:

586 responses to "How to calculate time in Excel - time difference, adding / subtracting times"

  1. Bhaavsing says:

    Please data to data calculate send mi

  2. Waqas says:

    Good Day
    Please help me in excel sheet

    Start Time Finish Time Mints

    07:00am 17:00pm ?

    Note: we don't want create any new calm & line between Start Time and Finish Time.

    • Ted says:

      Change 17:00pm to 05:00pm and it should work. 1700 is 24 hour format while 05:00pm is 12 hour format. You cannot calculate using two different time formats.

    • lavi says:

      use this formula to calculate diffidence between both of time .mod(finish time-start time,1)

  3. Khalid says:

    How I protect the cell from adding or deleting at a certain time. for example:
    I do not add or delete on this cell from 1:00 PM to 2:00 PM at 04/20/2018.
    Is there a formula in Excel? Please

  4. sankar says:

    please tell me how to do this calculation in excel.

    calculation should done by right side to left side


    Example for Addition:-


    Example for Subtraction:-(in the below case we cannot delete 8 from 7. because we get 1 minute from minutes (i.e. 60 seconds) and from 67 seconds subtract 08 seconds)


    i need code for this calcultion.


  5. Yuriy Roshchupkin says:

    I'm using the following formula to calculate the number of working hours.
    The result is a decimal number which can be later multiplied by the hourly rate if you need to.
    For ex.
    8h 15min = 8.25hrs

    You can also enter the time over the midnight.
    Start 20:00 Finish 04:00 = 8.00h


    D10 - Start time
    E10 - Finish time
    Time format 12:00:00

  6. Jung says:

    That's amazing formula which is this

    =IF(INT(B2-A2)>0, INT(B2-A2) & " days, ","") & IF(HOUR(B2-A2)>0, HOUR(B2-A2) & " hours, ","") & IF(MINUTE(B2-A2)>0, MINUTE(B2-A2) & " minutes and ","") & IF(SECOND(B2-A2)>0, SECOND(B2-A2) & " seconds","")

    But i have problem if the second is 0 the result is like this
    "33 minutes and"
    How to get rid " and" in this case?

  7. Arun Devkota says:

    sign in time sign out time Late Attendence Work Hours
    10:12:07 17:21:11 0:12:07 7:09:04

    Start Time 10:00:00 AM
    End Time = 17:00:00 PM

  8. Ash says:

    please help me...
    i need formula that if the excess hour is less than 1hr it will answer to 0:00 and if its 1hr to up it will show the excess hour starting only in 1hr to up.
    is it possible??/
    thank you

  9. Doug says:

    Not sure of your question, but try this and see if it works for you:
    Enter this in say B2 =IF(A10<1,0,A10)
    Where A10 is the cell that holds the data.
    You can format B2 to show the number of decimal places to fit your needs.

  10. Trevor says:

    Hello! Is there a predefined formula for calculating time it takes to complete a project if the data are in seconds or min/unit?

    Example: 1 unit = 15sec, 5 units must be completed

    Therefore, 5 units = 1 min:15 sec
    10 units = 2 min:15 sec

    Trying to estimate packaging times for product units. Thanks!

  11. Avijit Manna says:

    Suppose opening quantity of JW Black Lable whisky (750 ml)1.300ml ie,1 bottle & 300 ml.received from godown is 1(750ml) bottle, so total is 2.3 ie,2 bottle & 300 ml.And sale is .6 ml ie,600 ml.what formula to be used to get the closing stock in one cell.

  12. Ramana says:

    Hello, please help me with the formula for below:

    Example 1:
    If email Time received Date & Time =25/5/2018 18:00 Hrs and email processed Date and Time is 26/5/2018 14:15 Hrs

    Example 2:
    If email Time received Date & Time =25/5/2018 22:01 Hrs and email processed Date and Time is 26/5/2018 14:15 Hrs

    The time should calculate total hours taken only between my shift is 13:00 to 22:00 Hrs. If email received is after 22:00 hrs the total time taken to process should calculate from next day 13:00Hrs

    • Ramana says:

      Hi Doug, any thoughts here?

      • Doug says:

        After much searching I found a solution that works for your situation and several others, too.
        The solution is waaaay too complicated to type here, so I'll provide the link.
        You'll want to download the sample workbook that is at the bottom of the article as it is really nice and contains all the examples and formulas on several sheets.
        To download the workbook click the enlarge icon at the bottom right of the embedded worksheet. When you can see the big sheet, click on the download button at the top of the sheet.
        The link to the site is:

  13. Bobby says:

    Hi there,

    I am trying to calculate the time difference of the following function on my excel spreadsheet;

    =TEXT(E4-D4,"HH:MM:SS") and i press enter but it gives me #VALUE
    what does that mean and if you can help solve took me an hour to fix this


  14. Bobby says:

    Hi there,

    I am trying to calculate the time difference of the following function on my excel spreadsheet;

    =TEXT(E4-D4,"HH:MM:SS") and i press enter but it gives me #VALUE
    what does that mean and if you can help solve took me an hour to fix this


  15. TIFFANY MASSEY says:

    I am hosting a running event where people guess how fast they can run a mile, then they run the mile, and I have to be able to calculate the difference between their guess and what they actually ran, but I can't figure out how to format the cells because everything is in time as it relates to the day. I type in 5.22 to represent 5 minutes and 22 seconds but no matter what I put as the format it changes it to 5:22 am or pm and throws off the calculation. Can someone please help???

    • Doug says:

      If you change the format of the cells that will contain the times to h:mm the cells and the subsequent calculations will work the way you want.
      Select the cells, then right click and choose Format Cells, then choose Custom where you will find the h:mm option in the list. I know it means "hours:minutes" but maybe for your purposes it will work.

  16. Andrew says:

    i want to know how to calculate time when u have a negative sign. see example below:
    start time end time Hours worked
    7:45am 3:15pm ???

    so what is the way forward?

    • Doug says:

      Hello, Andrew:
      There are three ways negative time can be displayed in Excel. The first two ways are explained in the article above this post, so no need to rehash them here. I would recommend you use one of them.
      The third way is to custom format the cell holding the negative time as -h:mm. This method works only if you always want a negative time value displayed. It also requires that you always subtract the earlier time from the later time. This means times returned really will be positive and will only appear negative. Probably not the best method.

  17. manoj says:

    2-May-18 4:35 1-May-18 14:19 HOW CAN I CALCULATE DIFF IN HOUR

  18. Darren says:

    Desperately need formula for the following:

    If < 6.05, then subtract .50


    • Doug says:

      Where the data is in cell A1 the formula is:
      =IF(A1<6.05,(A1-0.5),"Number is Bigger than 6.05")
      If your data is in another cell, enter that cell address in place of A1.
      After you've entered the formula in the appropriate cell, you can copy it down the column to calculate more cells.

  19. Pam C. says:

    My data has a start time and end time for a behaviour

    09:20:45 09:21:09 So this behaviour lasted for 24 seconds
    09:21:09 09:21:30 So this behaviour lasted for 21 seconds

    I have 20,000 data points. I am looking for a formula to look for all behaviours that occur only on the minute. So in the example above, only the first data point would be marked true as the second point does not occur on the minute. In this example, the first data point would be the data point for 09:21:00 and the second data point would be deleted.

    I hope that makes sense!

  20. Joe Hicks says:

    I just want to add durations (D5 through D308)...I need a total in hrs, mins, and seconds. DOes anyone know a formula for this?

    • Doug says:

      If the data in D5:D308 is formatted as Custom [h}:mm:ss
      you should be able to sum them with SUM(D5:D308) or whatever combination of cells you need to sum.
      Right click, Format Cells, Custom and choose the [h]:mm:ss option.

      • Joe Hicks says:

        Thanks Doug, I've been doing exactly as you prescribed and I'm only getting 0:00:00. I'll gladly try anything else you might have. Thanks

  21. will says:

    If I

    Specific hour (3:30am) and I want to use in a formula to calculate how many employee punched after 3:30 am
    I will appreciate your help.

    Thanks for your time and help

  22. Greg says:

    How can I get an AVERAGE of start times, Cleaning crew starts cleaning equipment at different times due to production:
    Mon cleaning crew started at 12:50AM (entered as 00:50)
    Tue cleaning crew started at 12:15AM (entered as 00:15)
    Wed cleaning crew started at 12:10AM (entered as 00:10)
    Thu cleaning crew started at 23:45PM (entered as 23:45)
    Fri cleaning crew started at 23:50AM (entered as 23:50)
    I need an AVAERAGE start time for the week.
    Using AVERAGE(D4:D8) gives me 09:46AM. I'm looking for a time closer to 00:16. I appreciate your help, thank you in advance.


  23. Safiur Rahman says:

    I am calculating retirement remaining years, while i used "Yearfrac" formula, all went good. but still some is not functioning, ex. one person already reached to retire in the previous year and formula is not showing -1 year, its showing remaining 1. please someone help me to get out from this problem.

    Thank you,
    Safiur Rahman

  24. Ankita says:


    I need a solution for excel sheet I am maintaining to track activities on issues I get from client.

    Working hours are 09.00 am to 05.00 pm and every issue has 4 hours of time to get it acknowledged for the first time. For every issue creating after 05.00 pm (today) till 09.00 am(next day) must calculate acknowledge time from 09.00 am.

    How can we do this?

    Thank you,

  25. Riaz ahmad says:

    Hai good day
    Dear plz tell me how Sum in excel sheet day,hour,and minutes
    Exampla: "4 days 3 hours 45 minute and 16 second"

  26. Adam says:

    I have a question. I work in payroll at my work and we have 2 shifts. Is there an easy way to calculate differential time. What I mean is like this

    We have shifts that start at 14:20 and the differential kicks in at 18:00 and they work to 22:50. Is there a way for excel to calculate the amount of differential time that they worked?

    It would be nice if there was a way to do total time and differential time but since the guys cant make up their mind when they want to go to lunch it makes flat calculations hard. It is always nice to have the computer back up your numbers too.

    • Doug says:

      Do the employees clock in and out during their shifts?
      Are these times recorded in Excel?
      What's the differential pay?

  27. sadha says:

    we will calculate the time as indian time how to calculate
    Start time 07:00 AM
    End time 02:00 AM

  28. Anurika says:

    Please help me.
    ColumnA ColumnB
    4:00 4:00
    5:00 5:00
    11:00 00:00
    10:00 00:00
    3:00 3:00
    This is my question.
    I need to get the hours which are below 9:00 to columnB from ColumnA as i showed above.Please give a formula.

    Thank you.

  29. Doug says:

    I think this is what you're looking for.
    Where the time data is in E1 enter this in an empty cell:
    Now, you can format the cells as Time and you can work with the data as time.

  30. Harvey says:

    time in time out total hrs
    6:29:41 AM 5:28:07 PM ?
    6:44:17 AM 4:57:45 PM ?

    this is the case
    - our time in should be 7am and hrs should be counted from 7am to 11:30 for the morning time and from 1:30 pm onwards whatever the time is.
    - i want to know the formula for this.
    - lunch break should be less from 11:30am to 1:00pm same with 6:00pm to 7:00pm

  31. Abel says:

    1935 to 0135 how many hours

  32. Leif says:

    Hello !
    I´m struggeling with making a calculation between two times that consists of minute, seconds, hundredths
    ex 01:54,36

    The calculation should be
    00:47,26 - 00:46,58 = DIFF
    01:14,29 -01:16,32 = DIFF
    01:13,12 - 00:56,24 = DIFF

    The examples shows that the first time could be either faster och slower then the second one.

    Any ideas ?

    Thank you.

  33. Chander says:

    I have a start_date and end_date, wants to calculate the number of hours & minutes between the date excluding weekends as well as time from 12:00 AM to 8:00 AM.

    Start_date End_Date Hour spend (excluding weekends & time between 12AM to 8AM)
    6/5/2018 6:54:15 PM 6/10/2018 11:28:46 PM

    Your prompt response is highly appreciated.

    Thanks & Regards

  34. Siva says:

    Cell A1 is having 20-09-2018 18:14:10
    Cell B1 is having 20-09-2018 20:00:30
    Objective is to find the time difference and used B1-A1.
    But error is coming like this #VALUE!
    Appreciate if you can suggest solution to get the time difference.

    • Doug says:

      I believe this is a formatting issue. Your Excel doesn't recognize 20-09-2018 as a date.
      So, then the idea is to get the date formatted in a way your Excel sees as a date. The way it stands, Excel sees it as text.
      Try changing the two dates to 9/20/2018, leave the time as is and see if you can then simply subtract the cells using B1-A1. If that works then you need to work on the formatting issue.
      Try changing the formatting of the cells to the date using the location option. In the Date there's the option to specify a locale or location. Find yours and change it there.
      You can try replacing the "-" with "/" and see if that works.
      If these approaches don't work, then you can split the dates and times into two columns, then split the dates into three columns and concatenate them into one cell using DATEVALUE, format the cell as Date subtract the cells and Bob's your uncle. This sounds harder than it is, in fact I used this last approach many times with data sets containing thousands of rows of data.
      Let me know how it goes.

      • Siva says:

        Cell A1 is having 20-09-2018 18:14:10
        Cell B1 is having 20-09-2018 20:00:30
        Objective is to find the time difference and used B1-A1
        As per your suggestion, I changed the date part to 09/20/2018 and applied B1-A1, it worked. But it is difficult to change it manually in all cells. Tried to format the cell using the location option. It didn't work if I replace the "-" with "/". Please suggest workable solution. My file is having thousands of rows of data with this format.

  35. David says:

    I have successfully used formula:

    =IF(INT(W47-V47)>0,INT(W47-V47)&" days, ","")&IF(HOUR(W47-V47)>0,HOUR(W47-V47)&" hours, ","")&IF(MINUTE(W47-V47)>0,MINUTE(W47-V47)&" minutes")

    but am getting FALSE for some Minutes and #NUM when time is set to same day.
    Any ideas?

    How fields Look

    Previous Current Time between Events
    End Event
    Time Start

    3/13/18 16:48 4/20/18 05:31 37 days, 12 hours, 43 minutes
    4/20/18 05:31 4/24/18 18:43 4 days, 13 hours, 12 minutes
    4/24/18 18:43 6/16/18 00:00 52 days, 5 hours, 17 minutes
    6/16/18 00:00 6/21/18 00:43 5 days, 43 minutes
    6/21/18 00:43 7/02/18 06:43 11 days, 6 hours, FALSE
    7/02/18 06:43 7/10/18 06:14 7 days, 23 hours, 31 minutes
    7/10/18 06:14 7/10/18 19:55 13 hours, 41 minutes
    7/10/18 19:55 7/31/18 06:00 20 days, 10 hours, 5 minutes
    7/31/18 06:00 8/03/18 08:47 3 days, 2 hours, 47 minutes
    8/03/18 08:47 8/08/18 03:36 4 days, 18 hours, 49 minutes
    8/08/18 03:36 8/10/18 10:48 2 days, 7 hours, 12 minutes
    8/10/18 10:48 8/14/18 04:48 3 days, 18 hours, FALSE
    8/14/18 04:48 8/14/18 01:12 #NUM!
    8/14/18 01:12 8/17/18 17:31 3 days, 16 hours, 19 minutes
    3/13/18 16:48 4/20/18 05:31 37 days, 12 hours, 43 minutes
    4/20/18 05:31 4/24/18 18:43 4 days, 13 hours, 12 minutes
    4/24/18 18:43 6/16/18 00:00 52 days, 5 hours, 17 minutes
    6/16/18 00:00 6/21/18 00:43 5 days, 43 minutes
    6/21/18 00:43 7/02/18 06:43 11 days, 6 hours, FALSE
    7/02/18 06:43 7/10/18 06:14 7 days, 23 hours, 31 minutes
    7/10/18 06:14 7/10/18 19:55 13 hours, 41 minutes
    7/10/18 19:55 7/31/18 06:00 20 days, 10 hours, 5 minutes
    7/31/18 06:00 8/03/18 08:47 3 days, 2 hours, 47 minutes
    8/03/18 08:47 8/08/18 03:36 4 days, 18 hours, 49 minutes
    8/08/18 03:36 8/10/18 10:48 2 days, 7 hours, 12 minutes
    8/10/18 10:48 8/14/18 04:48 3 days, 18 hours, FALSE
    8/14/18 04:48 8/14/18 01:12 #NUM!
    8/14/18 01:12 8/17/18 17:31 3 days, 16 hours, 19 minutes
    8/17/18 17:31 8/30/18 09:11 12 days, 15 hours, 40 minutes

    V column is calculated as =TEXT(A60,"m/dd/yy ")&TEXT(R60,"HH:MM")
    W column is calculated as =TEXT(A61,"m/dd/yy ")&TEXT(R61,"HH:MM")

    A60 is a manually entered field say 8/30/2018
    A61 is a manually entered field say 8/17/2018
    R60 and R61 is a manual entered field for outage time Say 5.5 representing 5 hours and 30 minutes.


  36. Nick says:

    Hi All,

    I'd really appreciate some help with this. I'm trying to calculate a time cost per spend for a restaurant split between Pre 17:00 & post 17:00.

    I have in column A start time and column B finishing time.

    So it could be: 09:00 18:59 or 19:03 01:15 or 09:30 16:11

    How can I calculate the hours pre 17:00 without it adding straight up to 17:00 and calculate the the ones post 17:00 without it adding in extra time or going negative due to going past the midnight threshold.

    I'd really appreciate an answer because it is racking my brains something rotten.

    Kind regards


  37. Syd says:

    Outstanding explanations!! This (=IF(INT(B2-A2)>0…) was exactly what I needed. That you for the excellent explanations and demos.

  38. Justin says:

    Is there a way to calculate time with a format where you just use 7-4. Meaning that the 7 would in the AM and the 4 bing in the PM

  39. Dave says:

    Caption under figure in Formula 4 should say "less than" it seems.

  40. pandivinodh says:

    I have the time sheet, In that i have to segregate the 1-5 min, 5-10 min, 10-15 min ect.. to calculate the no of 1-5 min and 5-10 min and 10-15 min. Kindly help me.

  41. Martin says:


    I am using these formulas to calculate slary cost. I have now been ble to make A2 the start of the shift, B2 the end of the shift, C2 the duration of the shift. How can I make D2 = Total salary cost for the shift (based of C2)


  42. Ty says:

    I am looking for a formula that will populate fields for me automatically to count down seconds. Starting at 10:00, counting down to 9:00. 10:00...9:59...9:58 and so on.


  43. Kozet says:


    check in check out
    28/10/2018 08:03 28/10/2018 19:57
    29/10/2018 19:58 30/10/2018 07:54
    30/10/2018 19:55 31/10/2018 07:56

    I'm looking for a formula that calculate how many hours i have been in between 19;00 and 22:00.


  44. Bhupesh says:

    my formula is giving abrupt values. don't know why?
    suppose ...
    A1= 08:00 Hrs.
    A2= 07:00 Hrs.
    A3 =01:00 Hrs.
    A4= IF(A1-(A2+A3)<0,"ERR",(A1-(A2+A3)))

    with current values of A2 & A3 the result is "ERR" but it should be 0 i think.

  45. Dave Roughley says:

    I plot out the wildlife sightings from my trial cam. Specifically, I obtain the time and date attributes of each .jpg photo and plot them out. But, after daylight savings time I have to subtract one hour from the time. I have that figured out, but when the time and date are 11/11/2018 0:38, for example, subtracting one hour should be 11/10/2018 23:38. But instead I get ########… Also, the correct response needs to be in a plottable format, not text. I'm stumped. Please help.

  46. Bob Romppel says:

    Beginning Time = 8:20 PM
    Ending time = 4:32 AM
    (Over Nite Sleep in hours/minutes)
    I'm a beginner. Thanks

    • Hello, Bob,
      If your cells contain the time values only, please try to use the formula like the one below:

      =IF(Ending Time < Beginning Time, Ending Time+1, Ending Time) - Beginning Time

      Just change the Beginning and Ending Time to your cell references.
      Hope this is what you need.

  47. Dan Miles says:

    if i use a single cell to to schedule a shift such as: 8:00AM-4:00PM is there a way to calculate the total hours worked minus a half hour break in the next cell? EG /7.50

  48. Sarah says:

    I have a start time and end time for hundreds of people, some people multiple start and end times since they clock in and out multiple times per time. I also have a week's worth of data. How can I extract the total amount of time that falls between two specific times. So I only want to know how many hours, minutes, seconds each person worked between 10AM - 12PM specifically for each day. Also is there a way to customize, make the dates interchangeable, times interchangeable? I may need to look up total hours for multiple days/time periods. My Data looks like this:

    Last Name Date St art End Total Hours
    Chiang 12/9/18 0.00
    Cota 12/9/18 0.00
    Cuevas Chairez 12/12/18 11:05:00 AM 6:15:00 PM 7.17
    Cuevas Chairez 12/9/18 5:48:00 AM 10:35:00 AM 4.78
    Davila 12/9/18 0.00
    Flores 12/9/18 10:21:00 AM 5:17:00 PM 6.93
    Flores 12/10/18 5:00:00 AM 9:50:00 AM 4.83
    Holguin 12/11/18 8:54:00 AM 5:24:00 PM 8.50

    THANK YOU for any help you can provide. I have been stumped on this for weeks!!

  49. Sunil says:

    I am unable to calculate 24 hours time in excel if anybody knows please help me...

  50. Kk says:

    Hi !

    Anyone help me ! How to find out the Max time while matching two scenarios

  51. Ritesh says:

    hi, i need to calculate the hours reading for longer intervels ;
    for ex. day 1 day 2
    hrs:mins hrs:mins
    loading- 22564:48 loading- 22575:05
    unloading-22444:35 unloading-22450:25
    Above is the reading values are in hours and minutes how to find the difference of days if it carried out similarly in all days of month.

  52. Rick says:

    Hi, I need to calculate the time between certain hours. So for example, the below shows start and end times, and I need to calculate the hours between 10am and 2pm only.
    Start time 3/12/2018 9:30:00 am
    End Time 3/12/2018 11:30:00am
    Answer 1.5 hours
    If end time was 16:00:00pm answer would be 4 hours (so, only counting time that falls between 10am and 2pm).
    Please help with a formula!

  53. Swa says:

    In one cell, say (A1) I have time, and so in another cell, i applied the Formula (=A1+1). Why do i get the same time?
    What does that numeric 1 imply?

  54. Greg says:

    I need to average times for several days using military time. I have day 1=00:45, day 2=00:20, Day 3= 23:59. When I run the formula +Average(A1:A3) Excel gives me 08:21 as my answer. If I change 23:50 to 00:01 it gives me 00:22 Which is more realistic. I am averaging over a 24 hour day prior to mid-night is causing my problems. Any Ideas????

  55. Json says:

    Hello. I have a spreadsheet with 40,000 rows of 2 columns each. StartTime and DurationInSeconds. I am trying to figure out a way to show how many of them happened at the same time. The StartTime is formatted as "mm/dd/yyyy hh:mm:ss" and the duration is just the number of seconds. I've already added a 3rd column =A1+TIME(0,0,B1) to show the StopTime so I have StartTime and StopTime. Now I need to see how many times they coincide.

  56. Yan says:

    I need to subtract minutes or hours from a given time with date change.

    Example: given time: 5:00 (am), needed time: 6 hours earlier.
    Problem: Excel returns -1 instead of 23 (11 pm). How can I go around it?

    Thanks a lot!

  57. Sunil Kumar Pandey says:

    Dear Ms. Svetlana Cheusheva,
    So many thanks for your nice article.
    Thanks & Regards
    Sunil Kumar Pandey

  58. Chandra Shekhar says:

    The examples and illustrations are really very helpful. Thanks for your kind help.

  59. Rukshan says:

    Please can someone tell how to calculate total hours.
    Starting Time - 23:05:00
    End Time - 00:10:00

    Thank you.

  60. Charles says:

    Kindly provide me a formula for from time - 9:45:00 PM & To time 1:15:00 AM, want time difference?? Using =xX9-XX9 formula. getting results ########

  61. Angelina says:

    Trying to create a formula to calculate total time in hours and minutes.

    Then the total number of hours and minutes converted into 15 min increments.

    So for example, total mins & hours 8.40 (8 hours 40 mins)
    In units 8.75


  62. Joe says:

    I have a cell calculating time remaining until a task is completed. Is there a way for when hours remaining = 0 to hide the hour digit and only show minutes remaining?

  63. Irfan Anwar says:

    Hi Team,
    Can anyone resolve my problem, it would be great. Actually my shift timing is "6 pm to 3:30 am" IST. I am facing problem in weekend days (Saturday morning after 12:00 am when i m getting any request, then it is not calculating because saturday is a weekend but my shift timing is 6 pm to 3:30 am till saturday morning.
    Curently i am using one formula for Day shift which is working 100% accurate if shift timing is 12 pm to 9:30 pm and G2 = Start date, J2 = End date.


  64. Sune says:

    Hi all, I'm trying to make a document calculating amount of time spent over a work-day, in different time periods. An example could be an over-all time period from 18.30 to 05.30. Cell A should define time spent between 18.00 and 21.00, Cell B define time spent between 21.00 and 00.00 and Cell C define time spent between 00.00 and 06.00. The result will be Cell A = 2,5 hours, Cell B = 3 hours and Cell C = 5,5 hours. But what formula should I use to get to the results? In advance thanks a lot! Best, Sune.

  65. Sujay.BS says:

    Thank you, it was interesting and easy to learn. I shall come up some others doubts in Future.

  66. Siddharth says:

    Sum of hours is not correctly shown: 09:20 + 08:45 + 09:22 + 08:56 + 06:08 should come to 42:31 but using the SUM function it calculates as 18:31. Why & How?

  67. REYNOLD says:

    How can i calculate differnce in a tasks (Start date and end date) considering only Business hrs in that task (10 Am to 7 Pm)

    Task Start Date: 2-3-2019 20:00
    Task End Date: 3-3-2019 12:00
    I need to calculate it under only BH

  68. dinendra singh says:

    Downtime in % per day = Down time of affected machine / Total Available time in a Day

    now please let me understand what is this 47
    24 is hr,60 is min but what is 47 ?

  69. Prasad says:

    how to calculate the target time is 7 hours and start time is 7 am end time is 12:30 pm.
    in this case how to calculate the how is complete the below 7 hrs and how is complete above 7hrs

  70. Sharan Adiveppa Kubyal says:

    I want to calculate difference in time in different dates please help me

  71. Tue Bui says:

    I tried to used all possible formula to calculate time difference , but the return is Error
    I have used formula =$I2-$H2 or =INT(I4-H4) & " days, " & HOUR(I4-H4) & " hours, " & MINUTE(I4-H4) & " minutes and " & SECOND(I4-H4) & " seconds"
    Both gave me Error
    Here is example:
    Start Time End Time MTBF
    4/29/19 18:24:10 4/29/19 23:19:56 #VALUE! (use formula =$I2-$H2 or

    • Tue Bui says:

      I think I find the answer...
      I use simple combine formula =A2+B2 , instead of formula =TEXT(A2,"m/dd/yy ")&TEXT(B2,"hh:mm:ss") , then the time difference formula =INT(D2-C2) & " days, " & HOUR(D2-C2) & " hours, " & MINUTE(D2-C2) & " minutes and " & SECOND(D2-C2) & " seconds" is working perfectly.

  72. Jim Eads says:

    Need a formula that compares a date and time stamp between two columns. If 1 column is below the date and time in the 2nd column then it would say "Yes","No" based on the snapshot. Any ideas? Date and time stamp are shown in the same column. Does this need to be broken down?

  73. king says:

    How to Find in between time (12:32:00 PM to 01:12:00 AM)

  74. Noor Mohammad says:

    a clock was correctly set at 12pm.when the exact time was 10:00 p.m. the clock shows 1910 p.m. find the correctly time when the clock shows at 11:00 p.m.?

  75. Rajeev says:

    I have 2 times column
    start time
    end time
    Now I want to calculate
    How much hour is there between (6 A.M to 18 P.M) from those 2 starts and end column
    How much hour is there between (18 P.M to 00:00 A.M) from those 2 starts and end column
    How much hour is there between (00:00 A.M to 6:00 A.M) from those 2 starts and end column

  76. Lucille says:

    Desperately need formula to calculate hours and minutes worked in a day. Also need formula for total hours and minutes worked in a week for payroll.

  77. Ahmad JR says:

    Date 1/5/2019 02/5/2019
    Durations 01:10 03:58
    any simple formula for above if exceed 3 hrs than burst SLA

  78. Julian Lee Kok Siong says:

    Hi All,
    Good Day!
    Need some help, i want to subtract two time and result in ms? Is there any possibility?
    Start: 24/06/2019 6:37:06:06
    End: 24/06/2019 6:37:06:06
    currently i using this formula:
    =IF(INT(H74-G74)>0, INT(H74-G74) & " days, ","") & IF(HOUR(H74-G74)>0, HOUR(H74-G74) & " hours, ","") & IF(MINUTE(H74-G74)>0, MINUTE(H74-G74) & " minutes and ","") & IF(SECOND(H74-G74)>0, SECOND(H74-G74) & " seconds","")

  79. nisar says:

    pls help me to calculate ETA, for example one has its ETA of 10 hours, and it comes back within 12 hours, second if vehicle is moving at 2300hrs and comes back next day at 0300 hrs, how will I calculate its ETA?

  80. Ahmar says:

    How can I calculate the time along with date plz help.

  81. Moloy says:

    If 06:00:00 to 14:00:00=A, 14:00:01 to 22:00:00=B Shift and other C-Shift how to calculate in between how many hours are in a Date in A Shift and how many hours in B Shift
    Exam :
    Start Date Start Time End Date End Time
    31-05-2019 04:00:00 01-06-2019 09:00:00 = on 31.05.19 : C=2 and
    01.06.19 : A=3

  82. Thomas says:

    I got x-numbers of objects with different timestamps during a 24h period.
    I have the total time (End time - Start time) summed up, BUT i can't count the same time twice.
    AAA 03/07/2019 09:40-10:15, 11:30-12:00 (95 minutes)
    BBB 03/07/2019 09:40-10:20, 18:00-19:00 (100 minutes)
    But there are 20 minutes during that day that have the same time and i can't just sum that up, so the total time should be 175 minutes.
    1. How do i find the minutes that overlaps (i need to verify from the date).
    2. How do i remove the duplicates.

  83. Hooriakhan says:

    Plz help me in excel sheet i want total no of hours worked formula

  84. Alex says:

    Here's a simple one but sleep deprivation may be causing me to overlook the solution...

    Goal: TOTAL TIME WORKED LESS 30 MINUTE LUNCH (result cell: C1) using only cells for TIME IN, TIME OUT, AND HOURS WORKED.

    Data Format: A1,B1,C1: TIME(Hour(01):Minute(01))

    Data Entered (Multiple variations):
    1a. A1: 16:30 | B1: 23:00 | C1: =(B1-A1)-30 | RESULT: C1: 06:30 (0:30:00 not subtracted)
    1b. A1: 16:30 | B1: 23:00 | C1: =(B1-A1)-00:30:00 | RESULT: C1: ERROR

    1. entering "-30" appeared to have no effect (changing to any number produced same result - always 06:30)
    2. value in duration format '00:30:00' resulted in ERROR, adding parenthesis '(00:30:00)' had no effect, still ERROR

    Eventually, and reluctantly, I added a column for LUNCH DURATION... which worked.
    Data Format: A1,B1,D1: TIME(Hour(01):Minute(01)) | C1: DURATION(00:00:00)
    A1: A1: 16:30 | B1: 23:00 | C1: 00:30:00 | D1: =(B1-A1)-C1 | RESULT: C1: 06:00

    I didn't want to have a column for LUNCH DURATION. I feel it is unnecessary. I would rather just include the LUNCH DURATION in the formula.

    How can I successfully achieve this without creating a column for LUNCH DURATION and using the column name in the formula?

  85. Surya says:

    I want to know the formula to check whether for example 7:12pm lies between 11:45am, 12:00pm and 6:45pm, 7:30pm?

  86. Jorge says:

    I'm trying to calculate the amount of time left in a 24 hour period for multiple time slots that indicate dead time (time that is unavailable). The slots can have overlapping times. For ex. slot 1 = 8am-10am, slot 2 = 9am-11am, slot 3 = 7am-8:30am, slot 4 = 12pm-4pm, slot 5 = 1am-3am, slot 6 = 2:30 - 4:30pm. The slots do not have to be in chronological order. The result should be 24-10.5 = 13.5 left. Can anyone help?

  87. Maruf says:

    Dear Friends
    I want to write the calculated days.,Hours, Minutes in 00 digit format (Eg. 01 Days, 01 Hours, 01 Minutes) by using the below formula =IF(INT(B2-A2)>0, INT(B2-A2) & " days, ","") & IF(HOUR(B2-A2)>0, HOUR(B2-A2) & " hours, ","") & IF(MINUTE(B2-A2)>0, MINUTE(B2-A2) & " minutes and ","") & IF(SECOND(B2-A2)>0, SECOND(B2-A2) & " seconds","")

  88. Vaibhav Kalokhe says:

    Really very useful & thank you so much.

  89. Vaibhav Kalokhe says:

    Really very useful & excellent.

  90. JD says:

    I have an excel worksheet in which I'd like the date to update to the next date at a specific time. I have tried =today()+20/24, that only shows the current date and ten o clock in the evening. I am after it keep the previous data value (date) untill it passes a certain time value.
    Lets say its 5:59 AM the date it shows in the cell is previous days date. At 6:00 AM it changes to the current days date. Like first at 5:59 its 14th of june and then at 6:00 its 15th of june.

  91. JB says:

    I am trying to create a time sheet.
    There will be 2 different in and out columns. I want a sum of all hours worked.
    A2 B2 C2 D2 E2
    In Out In Out Total hours worked
    7:00 A 8:30 A 11:00 A 5:00 P

  92. Paul Flynn says:

    Thank you so very much for an excellent article.
    I haven't gotten my mind completely around it yet , but it certainly has me heading in the direction I need to go where as before I simply had no idea!

    Thanks again ....5 Stars

  93. Zaman says:

    Hello, I am trying to make a time sheet. Here is the example:
    Start time: 12:30 am
    Regular hours: 4.5 hours
    Extra hours: 40 minutes
    Break: 30 minutes if total hours more than 5 hours
    Finish Time: ??? I need the formula which should be 6:10 am as total hour more than 5.
    Total hours: 5.16 hours

    Thanks for your help.

  94. Bob says:

    Hi can someone help me with this formula, I am calculating time on excel with this formula but times are coming out as negative figures,
    =IF(C33="","", (C33-C32)*24- C34)

  95. Ralph R. says:

    You have a great series of Excel lessons here.

    I’m looking at the table right above the Formula 2 heading using the formula


    I noticed the calculations give incorrect totals.

    Using line 3 in the table the correct number of hours should be 7 and not 6.

    I can’t even figure out where the 44 minutes came from since 15 would be the quarter hour it should be 45 minutes. But really it should still be 15 minutes since we’re subtracting 15 minutes from nothing.

    And lastly 30 seconds from 40 seconds leaves 10 seconds, where does 50 come from?

    I’m trying to setup a time sheet if the form of:

    Date In Out In Out Total

    I know that my formula will be (Out1-In1)+(Out2-In2)=Total for the Day,
    But I can’t seem to get past the incorrect calculations.

    Is there some tid-bit of information that I’m missing or just not understanding?

    Any help would be greatly appreciated.

  96. Nichol says:

    I am trying to have a column which shows a "-" minus sign if two times produce a minus. ie. 00:00:50 & 00:00:48 = -00:02 or if the sum was 00:00:48 & 00:00:50 = (+)00:02 but using one sum not having to individually go through & tell the formula if the sum is a plus or minus result. The first timing is 50 secs & the second 48 secs then the result is -2 seconds, etc.

  97. Ad says:

    Hi may I ask anyone the formula to add restdays on work schedule? Thanks

  98. sumit says:

    in excel i am only count between 3 cell time but when I am going to + more then 3 cell time then the value gose wrong ...

  99. angie says:

    Hi, I need to calculate the difference in time. I have my D&C columns formatted as "Time", and am trying the formula =MINUTE(D2-C2), but it just gives me #VALUE. Are there any other settings I need to check?

    Here is what my data looks like in each column:
    09/05/2019 3:41 PM 09/05/2019 3:57 PM

  100. Paul K says:

    Setting up a time sheet. I have worked out the formula for daily hours worked and a weekly total, what I cant work out is one for the following.
    total hours if greater than 37 or lesser than with a value in hours and minutes.
    I can get the correct figure if the total hours are greater than 37 using =D7-TIME(37,0,)but when it goes into a negative the result is hours, mins subtracted from 24.
    What do I need to do to the formula to just show negative hours,mins?????

Post a comment

Thank you for your comment! When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to your query. We cannot guarantee that we will answer every question, but we'll do our best :)