Skip to main content

Time Calculator

Add, subtract and convert times in hours, minutes and seconds. Includes elapsed-time and decimal-hour conversion.

Result
4:16:15
1:45:30 + 2:30:45 = 4:16:15
Result (h:m:s)
4:16:15
1:45:30 + 2:30:45 = 4:16:15
Total minutes
256.25
Total hours
4.2708

1:45:30 + 2:30:45 = 4:16:15 ? that's 256.25 total minutes (4.2708 hours).

  • 100% private

    All math runs in your browser. Nothing leaves your device.

  • Formula-verified

    Each calculator is unit-tested against authoritative sources.

  • Instant results

    Static-rendered pages. Sub-second loads on any device.

  • Works offline

    Visit once and it keeps working without an internet connection.

How to use the Time Calculator

  1. 1

    Choose add, subtract, difference or convert mode

    Pick the operation: add two times, subtract one from another, take the absolute difference between two times, or convert a raw seconds count back into hours/minutes/seconds.

  2. 2

    Enter the first time

    Type hours, minutes and seconds — entries above 60 are normalised automatically (75 seconds becomes 1 minute 15 seconds). For long durations, hours can exceed 24 since these are durations, not clock times.

  3. 3

    Enter the second time or seconds value

    For two-time modes, enter the second h:m:s. For convert mode, type the total seconds. The calculator handles base-60 carrying internally so you never need to manually borrow across the minute or hour boundary.

  4. 4

    Read result in h:m:s, minutes and decimal hours

    The result shows the answer in three forms: h:m:s for stopwatch reading, total minutes for sports pace, and decimal hours for timesheets. Watch the sign — subtractions can yield a negative duration.

  5. 5

    Copy or share the formatted duration

    Use the share link to send the exact problem to a teammate, or copy the formatted duration straight into your timesheet, project tracker or workout log without retyping each component.

What this calculator does

Time arithmetic is base-60 for seconds and minutes, base-24 for hours within a day, and "borrow with carry" for crossing those boundaries. The clean way to compute is to convert each time to a single number (total seconds), do the operation, then convert back to h:m:s with floor-division and modulo. Total seconds = h × 3600 + m × 60 + s. To convert N total seconds back: hours = ⌊N/3600⌋, remaining = N mod 3600, minutes = ⌊remaining/60⌋, seconds = remaining mod 60. This calculator uses that approach internally so addition, subtraction and differences all work correctly even with large values or negative results.

Formula

totalSeconds(t) = 3600×h + 60×m + s. add: T = totalSeconds(a) + totalSeconds(b). subtract: T = totalSeconds(a) − totalSeconds(b). format(T): h = ⌊T/3600⌋, m = ⌊(T mod 3600)/60⌋, s = T mod 60.
h
Hours component (can exceed 24 — time durations are not clock times)
m
Minutes component (0-59 in normalised form)
s
Seconds component (0-59 in normalised form)
T
Total duration expressed as a single integer in seconds

The trick is to leave the base-60 carrying logic to a single normalisation step at the end. Convert inputs to seconds (one multiplication and two additions each), do plain integer arithmetic, then convert back with one division and one modulo. This avoids the "75 seconds = 1 minute 15 seconds" carry logic at every operation. For absolute difference, take the absolute value of T before formatting. For chained operations (a + b − c + d), do all of it in total seconds, format only at the end.

Worked examples

Example: 1h 45m 30s + 2h 30m 45s

Total a = 1—3600 + 45—60 + 30 = 6,330 seconds. Total b = 2—3600 + 30—60 + 45 = 9,045 seconds. Sum = 15,375 seconds.

Convert back: 15,375 — 3600 = 4 (hours), remainder 975. 975 — 60 = 16 (minutes), remainder 15. Seconds = 15.

Result: 4h 16m 15s. (Na—ve column-add gives 3h 75m 75s, which is the same after carrying — but the seconds-first approach is foolproof.)

Example: 5h 00m 00s ≈ 1h 30m 45s

Total a = 18,000 s. Total b = 1—3600 + 30—60 + 45 = 5,445 s. Difference = 12,555 s.

12,555 — 3600 = 3 hours, remainder 1,755. 1,755 — 60 = 29 minutes, remainder 15.

Result: 3h 29m 15s. The "borrow from hours" carrying that na—ve subtraction would require is handled automatically by the total-seconds approach.

Example: convert 7,325 seconds to h:m:s

7,325 ÷ 3600 = 2 (hours), remainder 125. 125 ÷ 60 = 2 (minutes), remainder 5 (seconds).

Result: 2h 2m 5s. In other units: 7,325 ÷ 60 = 122.083 total minutes. 7,325 ÷ 3600 = 2.0347 total hours. Use whichever unit suits the context (work timesheets often want decimal hours; sports use h:m:s).

Common use cases

  • Timesheets — add up worked-time entries for the week
  • Project management — sum task durations to estimate total effort
  • Sports — total race time, average pace per kilometre or mile
  • Music — adding track durations for an album or playlist
  • Video editing — sum clip lengths and check against runtime targets
  • Cooking — total prep + cook time, especially for multi-step recipes
  • Travel — flight time + layover + flight = total transit time
  • Exercise — interval training totals (warm-up + sets + cool-down)
  • Programming — converting Unix timestamp differences into readable durations
  • Sleep tracking — total sleep across multiple naps and main sleep

What affects the result

  • Negative results — subtraction can yield negative durations (e.g. before/after); calculator shows the sign
  • Hours > 24 — durations are not clock times; a 30-hour total stays as 30h, not "1 day 6h" unless converted
  • Decimal hours vs h:m:s — 1.5 hours = 1h 30m, not 1h 50m (a common timesheet error)
  • Rounding — sub-second precision is preserved through the total-seconds approach
  • Time zones — irrelevant for duration arithmetic; relevant only when computing elapsed time between clock times in different zones
  • Date crossover — if start is 22:00 and end is 02:00, you need to add 24h to the end before subtracting

Tips

  • Always convert to total seconds first for any non-trivial arithmetic — avoids carry/borrow bugs
  • For timesheets, decimal hours (1.25 = 1h 15m) is the format payroll systems prefer; the calculator shows both
  • For race pace, divide total time by distance to get pace per unit, then convert back to m:s
  • For elapsed time across midnight or multiple days, work in total seconds throughout
  • For programming, most languages have a duration / timedelta type that does this arithmetic correctly — use them
  • For project effort estimates, sum in total minutes or hours then round once at the end, not at every step

Mistakes to avoid

  • Adding minutes and seconds independently without carrying: 45m + 30m + 30s + 45s ≈ 75m 75s (it's 1h 16m 15s)
  • Confusing 1.5 hours with 1h 50m — decimal hours are base-100, not base-60
  • Forgetting that 90 minutes ≠ 1.30 hours — it's 1.5 hours
  • Subtracting larger from smaller without flipping the sign — calculator returns the correct negative if the order matters
  • For elapsed time across midnight, forgetting to add 24h to the end time
  • Using stopwatch hundredths-of-seconds with whole-second calculators — convert to a common precision first

Frequently asked questions

How do I add two times together?

Convert each to total seconds (h × 3600 + m × 60 + s), add them, then convert back: hours = ⌊total/3600⌋, minutes = ⌊(total mod 3600)/60⌋, seconds = total mod 60. This carries the 60-boundary automatically.

How do I subtract one time from another?

Same approach — convert both to total seconds, subtract, format back. If the result is negative, the second time is later than the first; the calculator preserves the sign so you can see it.

How do I compute elapsed time across midnight?

If end time is earlier than start time on the clock (e.g. 22:00 to 06:00), add 24 hours (86,400 seconds) to the end before subtracting. For multi-day elapsed times, use full date-times and convert to a Unix timestamp difference instead.

How do I convert decimal hours to h:m:s?

Hours = integer part. Multiply the fractional part by 60 to get minutes (integer part). Multiply the new fractional part by 60 to get seconds. 1.42 hours: 1h + 0.42 × 60 = 25.2m ≈ 25m + 0.2 × 60 = 12s ≈ 1h 25m 12s.

How do I convert h:m:s to decimal hours?

Decimal hours = h + m/60 + s/3600. So 2h 30m 0s = 2 + 0.5 + 0 = 2.5 hours. 1h 15m 30s = 1 + 0.25 + 0.00833 = 1.2583 hours.

Can the calculator handle very long durations (hundreds of hours)?

Yes — there is no internal cap on hours. The display stays as h:m:s without converting to days, weeks or months, which keeps the math unambiguous for timesheet and project-estimate use cases.

How do I compute average pace from total time and distance?

Convert time to total seconds, divide by distance (in your chosen unit), then format back. 21.1 km in 1h 50m 25s: total seconds = 6,625; pace = 6,625 / 21.1 = 314 s/km = 5m 14s per km.