Time Duration

Total a list of shifts and durations, or measure the elapsed time between two clock times.

Runs on your deviceCalculatorsWorkingNo account needed

What this tool does

Time Duration works two ways. Leave it on Add up the entries in the box and every line is read on its own: a plain duration such as 1:30, 1:15:30, 2h 45m or 45 min 30 sec, or a clock range such as 09:00 - 17:30 or 8:45 am to 4:15 pm, with an en dash, an arrow, the word to or the word until all accepted as the separator. Switch to Between two times and the start and end fields on the right supply the answer instead, though the entry box is still what the Run button checks before it will fire, so it has to hold something. Either way the answer is reported four ways at once — as days, hours, minutes and seconds, as hh:mm:ss, as decimal hours carried to four places with trailing zeros dropped, and as flat minutes and seconds — above a table giving each entry its own duration in words, in hh:mm:ss and in hours, with a Total row appended once there are two entries or more.

A few input habits are worth learning because the tool will not guess for you. A bare number is read as minutes, so 90 is an hour and a half and not ninety hours. Decimals are fine inside a unit, so 1.5h and 0.25d both work. A leading minus subtracts the line from the total, which is how you take an interruption back out of a shift. Text before the first colon becomes a row label, so Monday: 09:00 - 17:30 names the row Monday, while a bare number in that position is left alone so that 09:00 and -1:30 still read as times; rows you do not name are listed as Line 1, Line 2 and so on. The label is decoration only. There are no dates anywhere in this tool: the day names carry no meaning, nothing is looked up in a calendar, and a line it cannot parse stops the run with the line number rather than being skipped.

The limits follow from that. All range arithmetic happens inside a single 24-hour clock, so when the end time is earlier than the start a day is added and the row is marked overnight — which means 22:00 to 06:00 correctly gives 8h, and a range typed back to front as 17:30 - 09:00 quietly gives 15h 30m instead of an error. Anything longer than a day has to be written as a duration rather than a range. Time zones and daylight saving are not modelled at all, so an overnight shift on the two nights a year the clocks change will be an hour out from the wage a payroll system calculates. There is also no rounding setting: totals are exact to the second, and if you bill in six- or fifteen-minute increments you round them yourself.

The break field takes minutes and is deducted from each start–end range separately, once per range, and never from a plain duration — so five shifts with a 30-minute break lose two and a half hours in total, while a line reading 2h 45m is left alone. If the break is longer than the range, that entry is clamped to zero rather than turning negative. All of this is arithmetic performed in this browser tab, so the times you type are not uploaded anywhere and the tool keeps working with the network switched off. For gaps measured in whole days rather than clock time, Date Difference is the tool that fits.

How to use it

  1. Pick the mode. Add up the entries in the box handles a list of durations and ranges. Between two times uses the start and end fields for a single span.
  2. Type your entries, one per line. Durations like 1:30, 2h 45m or 90, and ranges like 09:00 - 17:30 or 22:00 to 06:00, can be mixed freely. Put "Label:" in front of a line to name that row in the table.
  3. Or fill in the two time fields. Start and end accept 09:00, 17:30:15 and 5:30 pm, and default to a 09:00 to 17:30 day. An end earlier than the start is treated as crossing midnight. Leave any character in the entry box as well: Run refuses an empty one even in this mode, and whatever you type there is ignored.
  4. Deduct a break if there is one. Enter the break in minutes. It comes off every start–end range in the job, once each, and leaves plain durations untouched.
  5. Read the totals. The total appears as days, hours and minutes, as hh:mm:ss and as decimal hours, with a per-entry table underneath and an average once there is more than one entry.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Adding up a week of timesheet hours

Paste each day as "Monday: 09:00 - 17:30", set the break once, and the decimal hours figure is the number a payroll or invoicing form asks for.

Working out the hours between two clock times

Switch to Between two times, type the two times, and the elapsed span is given without you converting anything to minutes first.

Costing a night shift

A shift running 22:00 to 06:00 is measured as eight hours rather than a negative number, and the row is marked overnight so you can see the assumption.

Totalling loose work notes

Entries recorded inconsistently as 1.5h, 90, 45 min 30 sec and 1:15 add up in the same pass without being rewritten into one format first.

Taking an interruption back out

List the shift, then a second line beginning with a minus, and the negative entry is subtracted from the total instead of added to it.

Questions

Why did 90 come out as an hour and a half?
A number with no unit is read as minutes, which is the convention timesheets use. Write 90h or 90:00 if you meant hours, and 90s if you meant seconds.
How is a shift that crosses midnight handled?
When the end time is earlier than the start, a day is added and the row is labelled overnight, so 22:00 to 06:00 gives eight hours. The consequence is that a range typed the wrong way round is measured rather than rejected — check any row that reads far longer than you expected.
Does the break come off every line?
It comes off every start–end range, once per range, and never off a plain duration. A break longer than the range leaves that entry at zero rather than making it negative.
Can it measure more than 24 hours?
As a duration, yes — the total is shown in days once it passes 24 hours, and an entry may be written as 30h or 2d. As a clock range, no, because a range is resolved inside a single day.
Does it account for time zones or daylight saving?
No. It is plain clock arithmetic on the numbers you type, with no calendar and no zone database behind it. On the two nights a year the clocks change, an overnight range will differ by an hour from the time actually worked.
Do the day names in front of each line mean anything?
No. Text before the first colon is kept as a label for that row and nothing more, so the tool never checks what day it is or whether your dates make sense.
Can it round to the nearest six or fifteen minutes for billing?
There is no rounding setting. Totals are exact to the second and decimal hours keep up to four places — 8.5 h stays 8.5 rather than padding out to 8.5000 — so any rounding to a billing increment is yours to apply afterwards.
Are the times I type sent anywhere?
No. The calculation is done in this browser tab, so nothing is transmitted, logged or stored, and the tool still works offline.

Related tools