Time Calculator - Add, Subtract and Find Time Differences
Enter two time values to add or subtract them, or switch to Time Difference mode to find exactly how long elapsed between a start and end time. Results update live in days, hours, minutes and seconds, plus a decimal hours figure ready for timesheets and payroll.
How to use this calculator
Choose a mode from the dropdown at the top. "Add two durations" combines Duration A and Duration B into a single total. "Subtract two durations" removes Duration B from Duration A, which is useful for finding a net duration or checking whether a planned task fits inside a remaining window. "Time difference" takes a 24-hour start time and end time and tells you exactly how much time elapsed - if the end time is earlier than the start, it assumes the interval crosses midnight and adds 24 hours automatically. All results appear as a compact d/h/m/s string, an HH:MM:SS clock format, and in decimal hours for payroll and billing use.
The arithmetic behind time addition and subtraction
The calculator converts every duration into a single count of seconds before doing any arithmetic. Converting days, hours, minutes and seconds to seconds is: total = (days x 86,400) + (hours x 3,600) + (minutes x 60) + seconds. After adding or subtracting the two totals it divides back out: whole days from the result divided by 86,400, the remaining seconds divided by 3,600 for hours, the remainder divided by 60 for minutes, and whatever is left is the seconds component. This avoids the carry errors (such as borrowing 60 minutes from the hours column) that arise when doing the arithmetic column-by-column.
Finding the time difference between two clock times
For time-difference mode, enter the start and end times in 24-hour format. A standard 9:00 AM to 5:30 PM shift becomes start 9, 0, 0 and end 17, 30, 0, which gives a difference of 8 hours 30 minutes (30,600 seconds, or 8.5 decimal hours). Night workers and shift planners who cross midnight - say a 10 PM to 6 AM shift - enter start 22, 0, 0 and end 6, 0, 0. Because the end (21,600 s) is less than the start (79,200 s), the calculator adds one full day (86,400 s) to give 8 hours, the correct elapsed time.
Decimal hours and why they matter for payroll
Payroll and billing systems typically store time as a decimal fraction of an hour rather than as hours and minutes. A duration of 7 hours 45 minutes is 7.75 decimal hours (7 + 45/60). The calculator shows this figure directly so you can drop it straight into a spreadsheet or invoice without a separate conversion step. Multiply decimal hours by an hourly rate and you have the charge. For example, 8.5 hours at $35 per hour is 8.5 x $35 = $297.50.
Time unit conversion reference
| Unit | Seconds | Minutes | Hours | Days |
|---|---|---|---|---|
| 1 minute | 60 | 1 | 0.0167 | 0.000694 |
| 1 hour | 3,600 | 60 | 1 | 0.04167 |
| 1 day | 86,400 | 1,440 | 24 | 1 |
| 1 week | 604,800 | 10,080 | 168 | 7 |
| 1 month (avg) | 2,629,800 | 43,830 | 730.5 | 30.44 |
| 1 year (365 d) | 31,536,000 | 525,600 | 8,760 | 365 |
Exact relationships between common time units.
Frequently asked questions
How do I add two times together?
Select "Add two durations" from the mode dropdown. Enter your first time in the Duration A fields (days, hours, minutes, seconds) and your second time in the Duration B fields. The result appears instantly as a d/h/m/s breakdown, an HH:MM:SS clock string, and in decimal hours. For example, 2 h 30 m + 1 h 45 m gives 4 h 15 m (4.25 decimal hours).
How do I find out how long between two clock times?
Select "Time difference" mode and enter your start and end times in 24-hour format. For an 8:30 AM to 3:15 PM window, enter start 8, 30, 0 and end 15, 15, 0. The result is 6 hours 45 minutes. If the end time is earlier than the start time the calculator assumes the period crosses midnight and adds 24 hours, which handles overnight shifts automatically.
What is HH:MM:SS format and when should I use it?
HH:MM:SS stands for hours:minutes:seconds with each part zero-padded to two digits. It is the standard format used by video editing software, spreadsheets, stopwatch apps, and many payroll systems. For a result of 2 days 5 hours 30 minutes 10 seconds, the HH:MM:SS value is 53:30:10 (2 x 24 + 5 = 53 total hours).
Why does subtracting give a negative result?
If Duration B is longer than Duration A in subtract mode, the result is negative, meaning Duration A is not long enough to contain Duration B. For example, 1 h 0 m minus 1 h 30 m is -30 minutes. This is useful for scheduling: a negative result tells you your available window is shorter than the task you want to fit into it.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add the whole hours. For 3 hours 20 minutes: 20 / 60 = 0.3333, so decimal hours = 3.3333. The calculator shows this automatically in the "Total hours" output field.
How do I handle times that cross midnight?
Use "Time difference" mode. Enter the earlier time as start and the later time (next day) as end in 24-hour format. If the end-time value is numerically smaller than the start-time value, the calculator automatically adds 24 hours to the difference. A 10 PM to 6 AM shift (22:00 to 06:00) gives 8 hours this way.