Time Calculator
A time calculator adds, subtracts, compares and converts durations written as days, hours, minutes and seconds. Put 2 hours 45 minutes under Start Time and 1 hour 30 minutes under Time to Add, press Add Time, and the Result panel returns 4 hours, 15 minutes with 15300 Total Seconds underneath. The Time Between tab does the same for two calendar dates.
Result
About Time Calculator
This time calculator has four tabs and each answers a different question. Add Time and Subtract Time work on two durations: fill the Days, Hours, Minutes and Seconds boxes under Start Time and the same four under Time to Add, and the Result panel returns the total in mixed units plus the raw figure in Total Seconds. Time Between works on two calendar moments — Start Date/Time and End Date/Time are datetime-local pickers — and breaks the gap into years, months, days, hours and minutes tiles. Convert takes one Value and moves it between seconds, minutes, hours, days, weeks, months and years.
Everything is done in seconds internally, which is why the answers stay exact for anything shorter than a month. One hour is 3,600 seconds, one day is 86,400, one week is 604,800. Months and years cannot be exact, so the converter uses the average Gregorian values: a month is 2,629,746 seconds and a year is 31,556,952 seconds, which is 365.2425 days. Convert 1 year to days and the tool prints 365.2425 rather than 365.
Limits worth knowing before you type. The duration boxes take whole numbers only: 2.5 in Hours becomes 2, and Minutes and Seconds are clamped to 59 when the field loses focus, so 90 minutes must be entered as 1 hour and 30 minutes. Negative entries snap back to 0, although the result itself can be negative — subtracting a longer duration prints a leading minus. Time Between counts real elapsed time from the two values you picked; it does not know about daylight saving changes or time zones, so it is a wall-clock difference.
The arithmetic runs in JavaScript in your browser and Copy Result puts the headline figure and the line below it on your clipboard; nothing is uploaded.
Use Cases
How to use
Choose a tab: Add Time, Subtract Time, Time Between or Convert. The first two work on durations, the third on two calendar dates, the fourth on a single unit.
For Add Time or Subtract Time, fill the Days, Hours, Minutes and Seconds boxes under Start Time, then the same four boxes under Time to Add.
Press the blue Add Time or Subtract Time button. The Result panel shows the answer in mixed units with the Total Seconds figure on the line below.
For Time Between, set Start Date/Time and End Date/Time and press Calculate Difference; five tiles split the gap into years, months, days, hours and minutes.
For Convert, type a number into Value, pick the unit in From and the unit in To, then press Convert to read the converted figure.
Press Copy Result to copy the headline figure together with the detail line underneath it to your clipboard.
Pro Tips
- Minutes and Seconds are clamped to 59. Type 90 into Minutes and it becomes 59 as soon as the field loses focus, so enter 1 in Hours and 30 in Minutes instead.
- The duration boxes accept whole numbers only. 2.5 in Hours is floored to 2, so express half an hour as 30 in the Minutes box next to it.
- Negative entries snap back to 0, but the answer can still be negative: subtract 3 hours from 1 hour and the Result panel prints a leading minus in front of 2 hours.
- Time Between tolerates a Start Date/Time that is later than the End Date/Time. It shows the same gap with a minus sign, so you never have to swap the two pickers.
- In Convert, Months is 2,629,746 seconds and Years is 31,556,952 seconds — the average Gregorian values — so 1 year becomes 365.2425 days, not 365.
Troubleshooting
The Minutes box changes 90 into 59 by itself.
Minutes and Seconds are limited to 0-59 and the limit is applied when the field loses focus. Split the value across two boxes: 1 in Hours and 30 in Minutes is the same 90 minutes and calculates correctly.
A decimal entry such as 2.5 hours is treated as 2.
The four duration boxes accept whole numbers and everything after the decimal point is dropped. Move the fraction into the next unit down: 2 in Hours and 30 in Minutes gives the 2.5 hours you meant. The Convert tab is the one that accepts decimals.
Calculate Difference shows an error instead of a result.
One of the two datetime-local fields is empty or incomplete, so the browser cannot build a date. Click Start Date/Time and End Date/Time and make sure both carry a full date and a time; the tool fills today and tomorrow by default.
Frequently Asked Questions
Open the Time Between tab, set Start Date/Time and End Date/Time in the two pickers and press Calculate Difference. The Result panel prints the gap in mixed units and the line underneath gives Total Days and Total Seconds, while five tiles split it into years, months, days, hours and minutes.
Nine hours. Set Start Date/Time to today at 08:00 and End Date/Time to today at 17:00, press Calculate Difference, and the tool returns 9 hours with 0 Total Days and 32,400 Total Seconds on the detail line. Any unpaid break has to be subtracted separately on the Subtract Time tab.
10:15. Treat the clock time as a duration: put 9 in Hours and 45 in Minutes under Start Time, put 30 in Minutes under Time to Add, and press Add Time. The Result panel returns 10 hours, 15 minutes and 36900 Total Seconds, which you read back as 10:15.
Nine hours. 4:30 PM is 16:30, so the gap is 16:30 minus 7:30. Enter the two moments in Time Between, or subtract 7 hours 30 minutes from 16 hours 30 minutes on the Subtract Time tab; both routes give 9 hours and 32,400 Total Seconds.
Five hours, if 2:30 means the afternoon: 14:30 minus 9:30 is 5 hours, which the tool reports as 18,000 Total Seconds. If you mean 2:30 in the morning of the next day, put both dates into Time Between and it returns 17 hours instead.
Press the Subtract Time tab. The first block of boxes is Start Time, the second is Time to Add, and the button subtracts the second from the first. If the second is longer the answer comes back negative, with a minus sign in front of the mixed-unit figure.
Use the Add Time tab and keep each unit in its own box. Hours has no upper limit, but Minutes and Seconds stop at 59, so 90 minutes goes in as 1 hour and 30 minutes. Press Add Time and the total appears in mixed units with the equivalent in Total Seconds.
0.75 hours. On the Convert tab type 45 into Value, choose Minutes in From and Hours in To, then press Convert: the tool prints 0.75 hours. The same route turns 20 minutes into 0.333333 hours, since the display keeps up to six decimal places.
Time Between answers all three at once. After Calculate Difference the five tiles show years, months, days, hours and minutes, the big figure repeats the same gap in mixed units, and the small line gives Total Days and Total Seconds so you can paste whichever form you need.
It uses average Gregorian lengths, because calendar months differ. A month is 2,629,746 seconds and a year is 31,556,952 seconds, so converting 1 year to days gives 365.2425 and 1 month to days gives 30.436875. For exact calendar spans use Time Between with the real dates instead.