Skip to main content

Free Time Calculator

Add or subtract HH:MM:SS durations, or find the time between two timestamps. Useful for work logs, race splits, and project tracking.

Works offline once loaded

Formats: HH:MM:SS (e.g. 01:30:45) or HH:MM (e.g. 02:15)

Result

02:15:30

2h 15m 30s Β· 8,130 seconds total

135.50
minutes
2.258
hours
8,130
seconds
Billing rounding
2.26 hours

Common uses

  • Calculate Work Hours WorkedAdd up your hours across the day to log time spent on tasks or to invoice clients.
  • Calculate Race SplitsAdd or subtract running, swimming, or cycling lap times for training analysis.
  • Cooking Time MathCombine prep + cook times for recipes, or calculate when to start so dinner's ready at a target time.
  • Video Timeline CalculationsAdd up clip durations to plan a video timeline, or calculate where a transition lands.
  • Calculate Total Focused TimeSum your Pomodoro sessions to track focused time per day or week.

How It Works

All calculation happens in the browser using a hand-written parser and integer arithmetic β€” no library, no server. The tool converts HH:MM:SS strings to a raw second count, applies addition, subtraction, or differencing, then formats the result back out.

  1. 1
    Input parsing
    As you type, a custom parseHMS function splits each field on colons and converts the parts to a single integer β€” total seconds. It accepts HH:MM:SS, HH:MM, or a bare number (treated as minutes), and rejects anything non-numeric or out of clock range.
  2. 2
    Mode-specific arithmetic
    In Add/Subtract mode the two second-counts are summed or differenced directly. In Time-Between mode the tool subtracts start from end; if the result is negative it adds 86400 seconds and flags the result as crossing midnight. In Timesheet mode it reduces an arbitrary list of duration rows to a single sum.
  3. 3
    Billing rounding
    Once a result exists, a separate calculation rounds the absolute second total to the nearest 6-, 10-, or 15-minute increment using integer rounding (Math.round(abs / increment) * increment), then displays the rounded value as decimal hours for invoicing.
  4. 4
    Result display and copy
    The final second count is formatted into HH:MM:SS, a plain-English breakdown (e.g. '2h 15m 30s'), and unit conversions (decimal minutes, decimal hours, raw seconds). The copy button writes the HH:MM:SS string to the clipboard via navigator.clipboard.writeText.

Guide

Worked example

The tool opens in "Add / subtract durations" with "Duration A" at 01:30:00, "Duration B" at 00:45:30 and "+" selected. The result card reads "02:15:30", with "2h 15m 30s Β· 8,130 seconds total" under it, and three tiles show 135.50 minutes, 2.258 hours and 8,130 seconds. Press "-" and it becomes "00:44:30". Put 00:45:30 in A and 01:30:00 in B with "-" selected and you get "-00:44:30", with "(negative)" after the seconds. Now press "Time between", type 22:15 in "From time" and 06:40 in "To time". The result is "08:25:00" and a note says "Crosses midnight β€” ends the next day". Under "Billing rounding", choosing "15 min" changes the hours figure beside it from 8.42 to 8.50.

Which settings to use, and the limits

  • Type times with colons, or a bare number for minutes. Each box takes HH:MM:SS, HH:MM or one whole number, which counts as minutes: 90 and 0:90 both mean 01:30:00. Only digits and colons are accepted, in up to three parts, so decimals (1.5), minus signs and AM or PM are rejected. In "Add / subtract durations" and "Timesheet" the hours can be any size and minutes or seconds can pass 59, so 02:75 is read as 3 hours 15 minutes. Totals past a day keep counting hours, for example 26:45:00.
  • In Time between, use 24-hour clock times. "Time between" treats both boxes as clock times, so hours must be 0 to 23 and minutes and seconds 0 to 59. There is no AM or PM, so write 17:20 for 5:20 pm. A lone number is minutes even here: type 9 and the tool reads 00:09, so write 09:00. If "To time" is earlier than "From time", the tool assumes the next day and adds "Crosses midnight β€” ends the next day". Equal times give 00:00:00, not 24 hours.
  • Use Timesheet mode to total several shifts. "Timesheet" starts with two empty rows. Type one duration per row in the same formats; each valid row shows its own HH:MM:SS beside the box, and the result is the sum. "+ Add row" adds a row and the Γ— button removes one, though the last row stays. Empty rows are ignored, but one invalid row hides the whole result until you fix it. To total shifts that cross midnight, work each one out in "Time between" first, then type the results as rows.
  • Take a break off a shift in Add / subtract mode. To remove a 30-minute lunch from a 09:00 to 17:20 shift, enter those two times in "Time between" to get 08:20:00. Switch to "Add / subtract durations", type 08:20:00 in "Duration A" and 00:30 in "Duration B", and press "-" for 07:50:00. Both modes share the same two boxes, so the old values are still there after you switch: overwrite them. If B is bigger than A, the answer is negative and shown with a leading minus sign.
  • Pick a billing rounding for invoices. Once a result appears, "Billing rounding" offers "Off", "6 min", "10 min" and "15 min". The hours figure beside it is the total rounded to the nearest 6, 10 or 15 minutes and shown to two decimals; exact halves round up. For 08:08, "Off" gives 8.13 hours and "15 min" gives 8.25. For 08:07, "15 min" gives 8.00. The rounding applies to the total, not to each row, and it leaves the main result and the minutes and hours tiles unchanged.
  • Copy the result or share the sum. "Copy" puts the HH:MM:SS text, such as 02:15:30 or -00:44:30, on the clipboard, and the button then reads "Copied!". "Share result" makes a link that reopens the same mode and boxes: on a phone it opens the share sheet, and on a computer it copies the link. The entries sit after the # in the address, which browsers do not send to the server. When a shared link loads, each box is cut to 16 characters, and a Timesheet link keeps at most 50 rows.

Common problems and how to fix them

It says "Invalid time β€” use HH:MM or HH:MM:SS" under a box, or under the rows in Timesheet.
The box holds something other than digits and colons, more than three parts, or an empty part. Examples that fail are 1:30 PM, 1.5, -1:00, 1:2:3:4 and 1::30. Remove letters, signs and decimals. For 90 minutes type 90 or 01:30. A decimal such as 1.5 hours has to be written as 01:30. In Timesheet, the empty row is fine; look for the row with the red border.
It says "Clock times use hours 0-23 and minutes/seconds 0-59".
This appears only in "Time between", where both boxes must be real clock times. 24:00 fails, so use 00:00, and so does 08:75. The two time modes share their boxes, so a value such as 25:00 that worked in "Add / subtract durations" gives this message after you switch. If you meant a length of time rather than a time of day, stay in the add and subtract mode.
Time between shows a tiny result such as 00:08:00 when you expected eight hours.
A number without a colon is read as minutes, so 9 to 17 is 17 βˆ’ 9 = 8 minutes. Type the hours with a colon: 09:00 and 17:00 give 08:00:00. The same rule applies in the other two modes, where 8 means 00:08:00 and not eight hours.
The result carries the note "Crosses midnight β€” ends the next day" but the shift was on one day.
"To time" is earlier than "From time", so the tool counts forward to the next day. 17:00 to 09:00 gives 16:00:00. Check for swapped boxes, or for a 12-hour time typed without converting it, such as 05:00 for 17:00. There is no date field, so "Time between" can only show gaps shorter than 24 hours.
The "Result" card never appears, and no error is shown.
The result shows only when every box in use holds a valid time. An empty box shows no error and no result. In the two-box modes both boxes need a value. In "Timesheet" at least one row needs a value, and any invalid row hides the result. Fill the empty box, or fix the box with the red border and the message under it.

How it compares

This tool does arithmetic on durations and clock times: add, subtract, the gap between two times, and a column of durations, with minutes, hours and billing rounding shown next to the answer. It knows nothing about dates, time zones, daylight saving or AM and PM, so it cannot count the hours between 5 pm on Monday and 9 am on Wednesday; "Time between" wraps past midnight once and covers gaps under 24 hours. A spreadsheet suits payroll with many people, unpaid breaks or overtime rules, but its time cells need the right format. This page needs no setup, and the numbers stay in the page unless you choose to share the link.

Related Tools

Frequently Asked Questions