Date & Time Runs locally Ready to use Built-in examples No tracking

Time Calculator

Clock plus or minus a duration rolls over days (23:50 + 30m gives 00:20 with +1 day); the difference mode can treat an earlier end time as the next day; the sum mode adds lines like 2h15m, 45m, 2:15 and shows H:MM:SS plus a spoken form.

What time is it thirty minutes after 23:50? How long was the gap between 14:20 and 16:05? How many overtime hours accumulated this week? Time arithmetic, time differences and duration totals are the small sums behind rotas, timesheets and log files. Three modes are kept separate here: adding or subtracting a duration, the gap between two times, and summing a column of durations.

Input is deliberately forgiving: durations accept 2h15m, 45m, 3600s or 2:15, and they can be mixed. On conventions: a difference is taken within the same day by default, and when the end is earlier than the start it is treated as the following day, so a shift from 22:00 to 06:00 is eight hours. The total is given both as H:MM:SS and as days, hours and minutes — anything over 24 hours is a duration, not a time of day.

How to use

  1. Choose a mode: time plus or minus a duration, the difference between two times, or a sum of durations.
  2. Enter the values — 2h15m, 45m, 3600s and 2:15 are all accepted.
  3. For a difference, choose whether an end earlier than the start means the following day.
  4. Read the result as H:MM:SS and as days, hours and minutes; overnight spans are flagged.

How it works

Duration parsing conventions

Durations accept four forms: unit combinations `1d2h3m4s` (any subset), the colon forms `H:MM` or `H:MM:SS`, a bare number (minutes, handy for overtime), and negatives like `-30m`. Parsing checks the whole string is fully covered by units — a trailing unit-less value like `1h30` errors out, rather than guessing whether 30 means seconds or minutes.

Cross-day offsets

The resulting time always lands within 00:00:00-23:59:59, with overflow shown separately as days: 23:50 + 30m is 87600 seconds, and the tool gives the time 00:20:00 plus +1 day, not 24:20. Negatives are symmetric: 00:20 - 40m gives 23:40:00 with -1 day, not a negative clock time.

Why no date arithmetic

This tool handles only clock times and durations, not dates: it doesn't judge leap years, month lengths, or what today is. That's exactly why it's reliable — no timezone, DST or calendar rules, just arithmetic. For date addition and subtraction, use the date calculator.

Code example

JavaScript Adding to a clock time: modulo on the minute count

function addMinutes(hhmm, minutes) {
  const [h, m] = hhmm.split(":").map(Number);
  const total = h * 60 + m + minutes;
  const dayShift = Math.floor(total / 1440);          // day rollover
  const t = ((total % 1440) + 1440) % 1440;
  const pad = (n) => String(n).padStart(2, "0");
  return { time: pad(Math.floor(t / 60)) + ":" + pad(t % 60), dayShift };
}

addMinutes("23:50", 30);   // { time: "00:20", dayShift: 1 }

Python timedelta handles the day rollover

from datetime import datetime, timedelta

t = datetime(2026, 9, 15, 23, 50) + timedelta(minutes=30)
t.strftime("%H:%M")        # "00:20"
t.day - 15                  # 1 (the day rollover)

# Summing durations:
from datetime import timedelta
s = timedelta(hours=2, minutes=15) + timedelta(minutes=45)
str(s)                      # "3:00:00"

FAQ

Why does 23:50 plus 30 minutes show 00:20, not 24:20?

The clock portion is normalized to 0-24, with the overflow shown separately as "+1 day," so the output is always a valid time, easily read as "0:20 the next morning." For a continuous 24-hour number, see the total seconds or duration above the result.

Can a duration be a bare number, and in what unit?

Yes; a bare number means minutes: 90 is 90 minutes, handy for overtime and meeting lengths. For seconds write 90s; for hours write 1.5h or 90m — avoid ambiguity.

What does the cross-day toggle in time-difference do?

It decides how to treat "end time earlier than start time." On (default) assumes the end is the next day — e.g. start 23:00, end 01:00 next day is 2 hours; off allows negatives, giving -22 hours to indicate the times were entered backwards.

Can it compute the days between two dates?

No; this tool handles only times and durations, loading no calendar. For date differences use the date calculator or workday calculator — they handle leap years, month lengths and workday rules. Compute dates first, then come back here for hours and minutes.

What does 26:15:00 in a sum mean?

It shows the total as accumulated hours — 26 hours is 1 day 2 hours — not resetting at 24, convenient for a week's or a project's total hours. The result also shows "1 day 2 hours 15 minutes," fully equivalent.

Does a bare seconds value need a unit?

Yes. A lone number is treated as minutes; write 45s or 1h for an explicit unit. Combinations like 1h30m must have a unit on every part — the tool verifies full unit coverage and errors on stray bare numbers.

How do I write a negative duration?

Prefix a minus sign, e.g. -30m or -2:00, to go backward. The subtraction operator works in time arithmetic too, equivalently; time differences also output negatives when the cross-day toggle is off.

Can a time exceed 24 hours, like 25:00?

Yes. The hour field allows 1-3 digits, so 26:30 means 2:30 the next day — for overnight shifts and multi-day hours. The result still normalizes to 0-24 with a day offset, losing no information.