A duration calculator works out how much time has passed between a start and an end — hours, minutes, and sometimes seconds or days. You give it two points in time and it returns the length of the gap between them.
The arithmetic is simple in principle and surprisingly error-prone in practice, because time does not behave like ordinary numbers. There are 60 minutes in an hour, not 100. Clocks reset at midnight. Shifts and projects cross days. This guide walks through exactly how to calculate duration by hand in every common situation — same-day, across midnight, across multiple days — plus how to add and subtract durations, convert them to decimals, and avoid the mistakes that most often produce wrong answers.
How to calculate duration between two times
The most reliable method is to convert both times to minutes since midnight, subtract, and convert the result back to hours and minutes. It avoids the confusion of borrowing across the 60-minute boundary.
Step 1. Convert each time to minutes: multiply the hours by 60 and add the minutes. Use the 24-hour clock so there is no am/pm ambiguity — 2:40pm becomes 14:40.
Step 2. Subtract the start from the end.
Step 3. Convert back: divide by 60 for the hours, and the remainder is the minutes.
Worked example. A task starts at 9:15am and ends at 2:40pm. The start is 9 × 60 + 15 = 555 minutes. The end is 14 × 60 + 40 = 880 minutes. The difference is 880 − 555 = 325 minutes. Dividing by 60 gives 5 hours with 25 minutes left over, so the duration is 5 hours 25 minutes.
You can also subtract directly in hours and minutes, but only if you handle borrowing correctly. To find the duration from 8:50 to 11:20, you cannot subtract 50 minutes from 20. Borrow one hour from the 11, turning 11:20 into 10 hours 80 minutes. Now subtract: 10 hours 80 minutes minus 8 hours 50 minutes is 2 hours 30 minutes. The minutes method gives the same answer — 680 minus 530 is 150 minutes, which is 2 hours 30 minutes — with less room for slips.
Calculating duration across midnight
When a period crosses midnight, the end time looks earlier than the start time, and a naive subtraction gives a negative number. The fix is to add 24 hours to the end time before subtracting.
Worked example. A night shift runs from 10:30pm to 6:15am. In 24-hour time that is 22:30 to 06:15. Because the end is earlier than the start, add 24 hours to the end, making it 30:15. Now subtract: 30:15 minus 22:30. In minutes, 30:15 is 1,815 and 22:30 is 1,350, so the difference is 465 minutes — 7 hours 45 minutes.
A quick sanity check: from 10:30pm to midnight is 1 hour 30 minutes, and from midnight to 6:15am is 6 hours 15 minutes. Added together, that is 7 hours 45 minutes, which confirms the result.
One caution for real-world shifts: when clocks change for daylight saving time, a night that crosses the changeover is an hour shorter or longer than the arithmetic suggests. In the UK, clocks go forward on the last Sunday in March and back on the last Sunday in October. A 10pm to 6am shift on the spring night is 7 hours of elapsed time, and on the autumn night it is 9. Check how your payroll or time tracking tool handles these two nights each year.
Calculating duration across multiple days
For periods that span days, calculate in two parts: the whole days, and the remaining hours and minutes.
Worked example. A project phase starts Monday at 4:00pm and finishes Wednesday at 11:30am. From Monday 4:00pm to Wednesday 4:00pm is exactly 48 hours. But the phase ends at 11:30am, which is 4 hours 30 minutes before 4:00pm, so subtract that: 48 hours minus 4 hours 30 minutes is 43 hours 30 minutes.
Counting days between dates. To find the number of days between two dates in the same month, subtract the day numbers: October 3 to October 21 is 18 days. When the dates fall in different months, count the days remaining in the first month and add the days into the second. September 28 to October 5 is 2 days to the end of September (September has 30 days) plus 5, so 7 days.
Remember that “days between” and “days including both ends” differ by one. If you are counting working days, remove weekends and holidays from the total rather than assuming a simple subtraction.
How to add durations
Adding durations is where the 60-minute boundary causes most errors. Add the hours and the minutes separately, then carry any excess minutes into the hours.
Worked example. Add 2 hours 45 minutes, 1 hour 50 minutes, and 3 hours 35 minutes. The hours total 2 + 1 + 3 = 6. The minutes total 45 + 50 + 35 = 130, which is 2 hours 10 minutes. Carry the 2 hours into the hours column: 6 + 2 = 8, with 10 minutes remaining. The total is 8 hours 10 minutes.
When seconds are involved, the same carry applies one level lower. Adding 1 hour 2 minutes 45 seconds to 58 minutes 30 seconds: the seconds total 75, which is 1 minute 15 seconds, so write 15 seconds and carry 1 minute. The minutes total 2 + 58 + 1 = 61, which is 1 hour 1 minute, so write 1 minute and carry 1 hour. The hours total 1 + 0 + 1 = 2. The result is 2 hours 1 minute 15 seconds.
The habit that prevents most mistakes: never write a minutes figure of 60 or more in your final answer. If you see one, carry it.
How to subtract durations
Subtraction needs the opposite move — borrowing an hour when the minutes you are subtracting are larger than the minutes you have.
Worked example. Subtract 3 hours 45 minutes from 8 hours 10 minutes. You cannot take 45 minutes from 10, so borrow an hour: 8 hours 10 minutes becomes 7 hours 70 minutes. Now subtract: 7 hours 70 minutes minus 3 hours 45 minutes is 4 hours 25 minutes.
This is the calculation behind many practical questions: how much of an 8-hour budget is left after 3 hours 45 minutes already spent, or how long a break lasted when you know the total shift length and the working time.
The minutes method is again the safer route when in doubt. Convert both durations to minutes (490 and 225), subtract (265), and convert back (4 hours 25 minutes).
Converting duration to decimal hours
Billing, payroll, and most spreadsheets work in decimal hours rather than hours and minutes. To convert, divide the minutes by 60 and add the result to the hours.
4 hours 25 minutes is 4 + 25 ÷ 60 = 4.42 hours (rounded to two decimals). 7 hours 30 minutes is 7.5. 8 hours 45 minutes is 8.75. 6 hours 20 minutes is 6.33.
To go the other way, multiply the decimal part by 60. The 0.75 in 8.75 hours is 0.75 × 60 = 45 minutes.
The most common error is treating 4 hours 25 minutes as 4.25 hours. It is not — 4.25 hours is 4 hours 15 minutes. If you are billing by the hour, that mistake quietly under- or over-charges every invoice. For the full treatment of converting hours to pay, including overtime, see our guide to calculating hours worked from a time card.
Common duration calculation mistakes
Treating minutes as decimals. Writing 2 hours 45 minutes as 2.45 and doing arithmetic on it gives wrong answers, because 45 minutes is 0.75 of an hour, not 0.45.
Mixing 12-hour and 24-hour time. Subtracting 5:30 from 9:00 without noting am and pm can produce nonsense. Convert to the 24-hour clock first.
Forgetting the midnight rollover. A negative result almost always means the period crossed midnight. Add 24 hours to the end time and recalculate.
Forgetting to subtract breaks. Duration between clock-in and clock-out is gross time. If the break is unpaid, subtract it to get working time.
Ignoring time zones. When start and end are in different time zones, convert both to the same zone first. A meeting that runs from 3pm London to 4pm New York is not one hour long; the two times are on different clocks.
Rounding too early. Rounding each entry to the nearest quarter hour before adding them can drift the total noticeably over a week. Add exact durations first, then round once at the end if your billing rules require it.
Stopwatch vs timer vs time tracker
Three tools are often confused, and each answers a different question.
A stopwatch counts up from zero. You start it, stop it, and read how long something took. It measures a single duration — a lap, a task, a call — and forgets it when you reset.
A timer counts down from a set time and alerts you at zero. It is for limiting duration rather than measuring it: a ten-minute break, a 25-minute focus session, a presentation slot.
A time tracker records durations against what you were doing — which task, which project, which client — across a whole day or week, and keeps the history. A stopwatch tells you something took 47 minutes. A time tracker tells you the 47 minutes were spent on the client proposal on Tuesday, and adds it to the week’s total.
For one-off measurement, a stopwatch or a duration calculator is enough. For understanding where working time goes, billing clients, or planning capacity, a tracker is what you need, because the value is in the accumulated record rather than any single measurement.
Tracking duration automatically in Slack
Calculating durations by hand is fine for the occasional question. It becomes a chore when you do it for every task, every day, for every person on a team — which is what manual timesheets ask of people.
Time Bot removes the calculation entirely for teams that work in Slack. Instead of noting start and end times and subtracting later, you log the moment work starts with /t followed by what you are doing. Switching tasks with another /t closes the previous one automatically and starts the next, so every duration is captured from the real timestamps with no arithmetic. /t break records breaks separately, and /t finish ends the day.
The durations are calculated for you, already in hours and minutes, organised by project (the Slack channel where the command was typed). Managers receive a daily email report showing each person’s tasks and time per task, and the data exports to CSV for payroll or billing. For client work, Time Bot can generate a PDF invoice straight from the logged durations, so there is no manual conversion to decimal hours and no chance of treating 4 hours 25 minutes as 4.25.
Time Bot costs $1 per active user per month on annual billing, with a minimum of five users and a seven-day free trial.
Add Time Bot to Slack — 7-day free trial →
FAQ
What is a duration calculator? A duration calculator is a tool, or a method, for working out how much time has passed between two points in time — a start and an end. It returns the length of the gap in hours and minutes, and sometimes days or seconds. It is used for tracking how long tasks take, calculating shift lengths, billing time, and measuring elapsed time between events.
How do you calculate the time between two times? Convert both times to minutes since midnight using the 24-hour clock (hours × 60 plus minutes), subtract the start from the end, then convert the result back to hours and minutes by dividing by 60. For example, 9:15 to 14:40 is 555 to 880 minutes, a difference of 325 minutes, or 5 hours 25 minutes.
How do you calculate duration across midnight? Add 24 hours to the end time before subtracting. For a shift from 22:30 to 06:15, the end becomes 30:15, and 30:15 minus 22:30 is 7 hours 45 minutes. A negative result from a normal subtraction is the usual sign that the period crossed midnight.
How do you add hours and minutes together? Add the hours and the minutes separately, then carry any minutes of 60 or more into the hours. For example, 2 hours 45 minutes plus 1 hour 50 minutes is 3 hours 95 minutes, which becomes 4 hours 35 minutes. Never leave a minutes figure of 60 or above in the final answer.
How do you convert hours and minutes to decimal? Divide the minutes by 60 and add them to the hours. 4 hours 25 minutes is 4 + 25 ÷ 60 = 4.42 hours. Note that 4 hours 25 minutes is not 4.25 hours — 4.25 hours is 4 hours 15 minutes. Getting this wrong is a common source of billing and payroll errors.
What is the difference between a stopwatch and a timer? A stopwatch counts up from zero and measures how long something takes. A timer counts down from a set time and alerts you when it reaches zero, limiting how long something lasts. Neither records what you were doing or keeps a history; a time tracker does, which is why trackers are used for billing and capacity planning.
What is the difference between a duration calculator and a time tracker? A duration calculator works out the length of one period from a start and end you provide. A time tracker records durations automatically as you work, attaches them to tasks and projects, and builds a history across days and weeks. A calculator answers a one-off question; a tracker produces the data for reports, invoices, and planning.