In Excel: sum the cells normally with =SUM(B2:B20), then format the result as [h]:mm — the square brackets are what stop the total resetting at 24 hours.
On this page7
Enter the times as real times (7:30, not 7.30) so Excel stores them as fractions of a day.
Total them with =SUM(range) exactly as you would numbers.
Select the total cell, press Ctrl+1 ▸ Number ▸ Custom and enter [h]:mm — this is the step everyone misses.
To get decimal hours for a rate calculation, multiply by 24 and format the result as a plain number.
For shifts crossing midnight, use =end-start+(end<start) rather than a plain subtraction.
To add a duration to a time, add the fraction: =A2+TIME(1,30,0) adds an hour and a half.
What this does
Excel stores a time as a fraction of a day: 6:00 is 0.25, 12:00 is 0.5. Adding times is therefore ordinary arithmetic, and the whole difficulty is display. The standard h:mm format shows a clock time, so a total of 30 hours displays as 6:00 — it has silently dropped the whole day. The custom format [h]:mm tells Excel to let the hours accumulate past 24. To convert a time total into a decimal number of hours for a rate calculation, multiply by 24: =SUM(B2:B20)*24 formatted as a plain number gives 30.5, which times an hourly rate gives money. Times crossing midnight need =B2-A2+(B2<A2) so the negative half-day is corrected. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “calculate time between two dates in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Daily hours in B2:B8 as 7:30, 8:15, 6:45, 8:00, 7:45, 4:30, 0:00. =SUM(B2:B8) with the default h:mm shows 18:45, which is wrong — the true total is 42:45. Select the cell, press Ctrl+1 ▸ Custom, enter [h]:mm, and it reads 42:45. For pay at €18.50/hour: =SUM(B2:B8)*24*18.5 formatted as currency gives €790.88. A shift from 22:00 to 06:00 is =B2-A2+(B2<A2) → 8:00, where a plain subtraction returns ####. Timesheets, shift totals and project hours all go wrong in the same two places — the 24-hour wrap and the missing ×24 — and both are one formatting decision away from correct. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
The standard worksheet functions used by this example are listed in Google Sheets. Check the cell references, argument separators and input types in the target spreadsheet, then compare the worked result. This formula-availability check does not establish identical menus, keyboard shortcuts or workbook features, and it is not a product execution test. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. For “calculate time between two dates in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Leaving the total in h:mm, which wraps at 24 hours and quietly under-reports the week.
- Typing 7.30 instead of 7:30, which Excel stores as the number seven-point-three, not seven and a half hours.
- Multiplying a time total directly by an hourly rate without the ×24, which produces a figure about 24 times too small.
- Subtracting an end time from a start time across midnight and getting ####, the display of a negative time.
- Mixing text entries like "8 hrs" into the column, which
SUMignores without warning.
Frequently asked questions
How do I add up hours in Excel?
Use =SUM(range) as normal, then format the result cell as the custom format [h]:mm. Without the square brackets the total wraps at 24 hours.
Why does my time total reset after 24 hours?
The cell is formatted as a clock time. Press Ctrl+1 ▸ Custom and enter [h]:mm — the brackets tell Excel to keep counting past a day.
How do I convert a time total to decimal hours?
Multiply by 24 and format as a plain number: =SUM(B2:B20)*24 turns 7:30 into 7.5, which is what an hourly rate needs.
How do I calculate hours across midnight?
=B2-A2+(B2<A2). The comparison adds a whole day when the end time is earlier than the start, which is exactly the correction a night shift needs.
Other ways people ask this
This is also commonly searched as “how to calculate the time between two dates in excel”, “calculate time between two dates in excel” and “excel formula to calculate time between two dates”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to calculate the time between two dates in excel”, “calculate time between two dates in excel”, “excel formula to calculate time between two dates” all point at the one operation explained on this page, which is why they all lead here.