Time duration calculator — hours between two times, added, subtracted and totalled
Work out how long it is from one time to another, including shifts that run past midnight, add or subtract a duration, and total a column of hours and minutes. Every answer is given in hours and minutes and again in decimal hours, because a timesheet is read by a person and a payroll system is not. Overnight is handled properly: 22:00 to 06:00 is 8 hours, not minus sixteen. Nothing is uploaded or saved.
- Nothing is uploaded or saved
- Works offline
Times can be written 22:00, 9:05 or 10:30 pm, and seconds are optional. Turn the rollover off if a finish earlier than the start should be treated as an error rather than as a night shift. Use the days field for anything longer than a day — two clock readings on their own cannot say that thirty hours passed.
8 hours
The decimal figure is exact — this duration lands on a whole hundredth of an hour.
The finish is earlier on the clock than the start, so it was taken as the next day: 22:00 to midnight, then midnight to 06:00.
- Shift and overtime calculator — if the hours have to turn into money — unpaid breaks, an overtime threshold, rest-day and holiday multipliers, and a CSV for payroll.
- Days calculator — if the span is measured in days rather than hours, or you need working days with weekends and holidays taken out.
- Time unit converter — if you only need one unit turned into another — seconds to hours, days to weeks — with no start time and no finish time involved.
- Unix timestamp converter — if what you are holding is an epoch integer out of a log or a database rather than a time on a clock.
How it works
- 1
Between two times
Type a start and a finish on the 24-hour clock — or with am and pm, both are accepted. If the finish is earlier than the start the calculator rolls over midnight and says so on screen, so an overnight shift comes out positive and you can see why. A shift longer than a day gets a “plus days” field, because two clock times alone cannot express thirty hours.
- 2
Add or subtract, and say what you are adding to
This is one control and it changes the whole answer. Adding to a time of day wraps: 22:00 plus 9h 45m is 07:45, and the page tells you it lands on the next day. Adding to a duration does not wrap: 38:15 minus 6:45 is 31:30, and turning that into 7:30 would be nonsense. A duration has no midnight to wrap around, and mixing the two up is where most calculators quietly go wrong.
- 3
Total a list
Paste or type one entry per row — a week of shifts, a set of billable blocks, a run of recorded takes. Rows total as you type, a bad row is named without wiping the rest of the column, and the total is given in hours and minutes, in decimal hours, and as a plain minute count.
- 4
Write durations however you already write them
The clock form 7:30 means seven and a half hours, and 7:30:15 adds the seconds. Unit form works too: 1h 30m, 90m, 45s, 1.5h. A bare number is the one thing refused, and refused with a sentence rather than a guess — “90” means ninety minutes to a payroll clerk, ninety hours to a project planner and ninety seconds to a video editor, and a tool that silently picks one of the three is wrong for two thirds of the people using it.
- 5
Read the decimal line before you paste it into payroll
Decimal hours are exact for quarter hours and rarely exact for anything else. 7:30 is 7.50 and 7:15 is 7.25, but 7:20 is 7.3333… and writing it as 7.33 pays twelve seconds less than the time worked. The page prints the shortfall next to the number instead of leaving you to find it twenty rows later.
Frequently asked questions
How long is a shift from 22:00 to 06:00?
Eight hours. Subtracting the two clock readings gives minus sixteen, which is the single most common bug in a home-made duration calculator and the reason shift workers look for a page like this one. A finish earlier than the start means the finish is on the next day, so a full day is added: 06:00 plus 24 hours, minus 22:00, is 8:00. The rollover is shown on screen rather than applied invisibly, because someone who genuinely typed the times in the wrong order deserves to notice.
Why does a result show as 41:30 instead of 17:30?
Because 41 hours 30 minutes is a length of time, not a reading on a clock. A clock wraps at midnight; a total does not. A fortnight of shifts adds up to something like 78:45 and that is the number payroll needs — printing 6:45 because 72 hours were quietly discarded would be a serious error dressed up as a tidy figure. Only the “time of day” mode wraps on this page, and it says which day the result lands on when it does.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add them to the hours. 30 minutes is 0.5, 15 is 0.25, 45 is 0.75 and 6 minutes is 0.1 — those four are exact. Most others are not: 20 minutes is 0.3333…, 10 minutes is 0.1666…, and 25 minutes is 0.41666…. Payroll systems and spreadsheets nearly always want the decimal form, while people read and check the 7h 20m form, so both are shown here side by side rather than converted by hand between two windows.
Why will the page not accept a plain “90”?
Because nobody can tell what it means. Ninety minutes, ninety hours and ninety seconds are all ordinary things to type into a duration field, and the right reading depends entirely on what the person does for a living. Rather than pick one and be silently wrong for everyone else, the field asks for a unit — 90m, 90h, 90s — or the clock form, where 90:00 unambiguously means ninety hours. It costs one keystroke and removes a class of error that is invisible once it has been added up.
Does this work out overtime, breaks and pay?
No, and that is deliberate. This page does arithmetic on time and nothing else, which is why it needs no rates, keeps no data and works for a rehearsal schedule as readily as for a shift. If you want unpaid breaks deducted, an overtime threshold, rest-day and public-holiday multipliers, and a CSV for the payroll office, the shift and overtime calculator on this site is built for exactly that and remembers your rates between visits.
Does daylight saving change these answers?
Not the arithmetic, because a duration has no time zone — eight hours is eight hours in every country. It can change what actually elapsed between two wall-clock readings, though, and only in the places that observe it: on the morning a clock jumps forward, 01:00 to 04:00 is three hours on paper and two hours in real time. Malaysia has had a single fixed offset since 1982, so this does not arise here. If you need the real elapsed time across a clock change, work with two timestamps rather than two clock readings — the timestamp converter on this site is the page for that.
Is midnight 00:00 or 24:00?
Both are accepted here: 00:00 is the start of a day and 24:00 is the end of one, which is how rosters usually write a shift finishing at midnight. It matters for one specific case. A start and a finish at the same clock time is treated as zero, not as twenty-four hours, because two identical readings cannot say which was meant — so a genuine round-the-clock span is entered by adding a day in the “plus days” field, where it is stated rather than assumed.
Can I total a week of shifts and get one figure?
That is what the list mode is for. Enter each day as 7:30, 8:15, 6:45 and so on, and the running total appears as you type, along with the decimal-hours equivalent, the count of rows included and the plain minute count. Rows that cannot be read are flagged individually and the rest still add up — a single typo in row nine should not blank out the eight entries above it.
Is my timesheet stored anywhere?
No. Everything is calculated in this page, nothing is sent anywhere, and nothing is written to localStorage — so entries disappear when you close the tab, and this page works with the network switched off. That is a real difference from the shift calculator on this site, which does save your shifts in your browser on purpose so that a pay period survives closing the tab. Neither is uploaded; only one is kept.