How to add and subtract time
Time does not count in tens. There are 60 seconds in a minute and 60 minutes in an hour, so ordinary column addition works only if you carry and borrow in sixties instead of tens. That is the step most people get wrong when adding up hours on a timesheet or working out how long a journey took, and it is the step this calculator shows in full, column by column, next to the answer.
What you enter
Each line has three boxes — hours, minutes and seconds — and, from the second line onward, a choice of + or −. Leave a box empty and it is treated as 0. You can add up to 20 lines, which is enough to total a full week of daily shifts or a long list of track times in one pass. The first line is always the starting value and has no operator of its own, since there is nothing before it to add or subtract from.
Every box takes a whole number of 0 or more; anything else — a decimal point, a letter, a minus sign typed into a box — is rejected with a message on that field, and the row is left out of the total until it is fixed. There is one range check: an hours field over 1,000,000 is also rejected, which is generous enough that it never gets in the way of real timesheets or race splits.
How the calculation works
Underneath the working, the calculator does something simpler than column arithmetic: it converts every line to a single count of seconds (hours × 3,600 + minutes × 60 + seconds), adds or subtracts that count according to each line's sign, and reads the hours, minutes and seconds back out of the running total. That total in seconds cannot go wrong the way manual carrying can, so it is used to check the column-by-column working shown underneath it.
The column working itself goes from small units to large, matching how you'd do it by hand:
- Seconds. Every line's seconds are summed (added if the line's operator is +, subtracted if −). If the sum is 60 or more, 1 minute is carried for every 60 seconds. If it is negative, a minute is borrowed instead.
- Minutes. The line's minutes are summed and the carry or borrow from seconds is added in. The same carry-or-borrow rule applies going into hours.
- Hours. The line's hours are summed and the carry or borrow from minutes is added in. This is the final hour figure.
A field for minutes or seconds above 59 — 90 minutes instead of 1 hour 30 minutes, say — is accepted as entered and folds into the larger unit during this same carrying step, so there is no need to convert it yourself first.
Worked example: adding two durations
Add 2 h 48 min 35 s and 1 h 25 min 40 s. Seconds first: 35 + 40 = 75, which is 1 minute and 15 seconds, so write 15 and carry 1. Minutes: 48 + 25 + 1 = 74, which is 1 hour and 14 minutes, so write 14 and carry 1. Hours: 2 + 1 + 1 = 4. The total is 4 h 14 min 15 s — 15,255 seconds, which the calculator's total-seconds figure confirms independently of the column working.
Worked example: subtracting a duration
Take 1 h 25 min 40 s away from 3 h 10 min 20 s (enter 3 h 10 min 20 s on the first line, then 1 h 25 min 40 s on a second line set to −). Seconds: 20 − 40 would be negative, so borrow a minute: 80 − 40 = 40. Minutes: the borrow leaves 9, and 9 − 25 is negative again, so borrow an hour: 69 − 25 = 44. Hours: 3 − 1 − 1 = 1. The answer is 1 h 44 min 40 s, or 6,280 seconds.
Worked example: a shift that crosses midnight
The calculator adds and subtracts durations, not clock times, so a shift that runs from 22:30 to 06:15 the next day needs the finish time written as if the clock kept counting past 24: 30:15:00. Enter 30 h 15 min as the first line and subtract 22 h 30 min: 30:15:00 − 22:30:00 = 7 h 45 min, which matches the 7 hours 45 minutes actually worked.
Worked example: a shift with a lunch break
A day from 9:00 to 17:30 with a 30-minute unpaid lunch is two subtractions from one start: 17 h 30 min, minus 9 h 0 min, minus 0 h 30 min. Column by column that comes to 8 h 0 min 0 s — 28,800 seconds, or 8.00 decimal hours, ready to enter on a timesheet.
Reading the result
The result panel shows the same duration five ways: h:mm:ss, the total written out in days and hours, total seconds, total minutes, and decimal hours. Decimal hours is what payroll and invoicing usually need — a single number instead of hours and minutes. It is the minutes divided by 60 plus the seconds divided by 3,600, added to the hours: 7 h 45 min is 7 + 45 ÷ 60 = 7.75 hours. The calculator works this out to four decimal places, and the total-minutes and total-seconds figures underneath it are the same total expressed in smaller units, useful for anything measured that way — video run time in seconds, for instance.
Edge cases
- Negative results. If the lines set to subtract outweigh the lines set to add, the total, the h:mm:ss figure, and the days figure are all shown with a leading minus sign, and the step table still shows the borrows that produced the negative columns.
- Blank fields. An empty hours, minutes or seconds box counts as 0 rather than as an error.
- A completely empty line. If every box in every line is left blank, the calculator asks for at least one time instead of returning zero silently.
- Non-numbers. Letters, decimals, or a typed minus sign in any box are rejected with an error message on that specific field.
- Very large hours. Anything over 1,000,000 hours in a single field is rejected rather than silently truncated.
Common mistakes
- Treating minutes as a decimal — reading "1.30" as 1 hour 30 minutes instead of 1 hour 30 (hundredths of an hour). Minutes and seconds go in their own boxes; the decimal-hours figure is only for the final answer.
- Subtracting a later clock time from an earlier one without adding 24 hours first, which gives a wrong (or negative) result for any shift that crosses midnight.
- Forgetting that the first line has no operator — it is always the base the other lines add to or subtract from, not a value that itself gets added.
Limitations
This is a duration calculator, not a clock-time or date calculator: it has no concept of a calendar date, a time zone, or AM/PM, so it cannot tell you what time a meeting ends if it starts at 2:00 PM — only how much time has passed between two durations you supply. Everything runs in your browser; nothing you type is sent anywhere.
Common uses
- Adding up hours worked across a week, including breaks.
- Totalling the running time of videos, tracks or lessons.
- Finding split times and the time left in a race or exam.
- Working out elapsed time between two clock times on the same day, or across midnight.
For the number of years, months and days between two calendar dates rather than a duration in hours and minutes, see the age calculator. For total hours worked expressed as years and months instead of a single shift, see the work experience calculator.
Frequently asked questions
How do you add hours and minutes?
Add the seconds, then the minutes, then the hours. Whenever a column reaches 60, carry 1 to the next column and keep the remainder. For example, 1 h 45 min + 2 h 30 min: 45 + 30 = 75 minutes, which is 1 hour and 15 minutes, so the answer is 4 h 15 min.
How do you subtract time?
Subtract column by column from the seconds up. If a column would go below zero, borrow 1 from the next column and add 60. For example, 5 h 10 min − 2 h 40 min: 10 − 40 needs a borrow, giving 70 − 40 = 30 minutes and 4 − 2 = 2 hours, so 2 h 30 min.
How many times can I add or subtract at once?
Up to 20 lines. The first line is always the starting value; every line after it has its own + or − operator, so you can mix additions and subtractions in one calculation instead of doing them two at a time.
Why does the result show a minus sign?
It means the lines you marked to subtract added up to more than the lines you marked to add. The total, in h:mm:ss and in seconds, is shown as a negative number, and the step table still shows the borrows that produced it, so you can see where the excess came from.
Can I type 90 minutes instead of 1 hour 30 minutes?
Yes. Each field only has to hold a whole number; minutes or seconds above 59 in a single field are accepted and carried into the hours or minutes automatically during the calculation.
What is decimal hours and why does the calculator show it?
It is the same duration written as one number of hours instead of hours and minutes, which is the format most payroll and invoicing systems expect. 2 h 15 min is 2.25 hours, because 15 minutes is a quarter (0.25) of an hour. The calculator works this out to four decimal places.
Can I use this for clock times like 9:30 to 17:15?
Yes, indirectly. The calculator adds and subtracts durations, not clock times, so enter the earlier time as the first line and subtract it from the later one: 17 h 15 min − 9 h 30 min gives 7 h 45 min.
How do I handle a shift that crosses midnight?
Add 24 hours to the finishing time before subtracting. A shift from 22:30 to 06:15 becomes 30:15:00 − 22:30:00 = 7:45:00, because without the extra 24 hours the finishing time would look earlier than the start.
What counts as an invalid entry?
Anything that is not a whole number of 0 or more — letters, decimals, or a negative sign typed into a box — triggers an error message on that field and the row is not included in the total. Any single hours field over 1,000,000 is rejected the same way.
Is anything I enter sent to a server?
No. The calculation runs in your browser with JavaScript and nothing you enter leaves your device.