HandyTools Hub
← Back to Tools

Time Calculator

Add/subtract durations or measure time between two clock times

Add / Subtract Durations

Days
Hours
Minutes
Seconds
Days
Hours
Minutes
Seconds

Enter durations above to see the result

Add and subtract durations, or measure the exact span between two clock times, without doing mental arithmetic with base-60 and base-24 carries. The calculator has two deliberately separate modes: Add / Subtract for quantities of time and Time Between for the gap between two points in time. Results appear as a normalized days:hours:minutes:seconds breakdown, and the same span is also expressed as total hours, total minutes, and total seconds. All calculation happens in the browser.

How the Two Modes Differ

Duration arithmetic works with amounts of time. If one task takes 1h 45m and another takes 2h 30m, you add them to plan a morning. Time Between works with instants. If a shift starts at 09:15 and ends at 17:40, you measure the gap between two clock readings. The distinction matters because “3 hours” and “03:00” look similar but mean completely different things. Keep the rule simple: to total or reduce time, use Add / Subtract. To compare two moments on a clock, use Time Between.

How to Use

  • Pick Add / Subtract or Time Between from the mode buttons at the top.
  • In Add / Subtract, enter two durations across the days, hours, minutes and seconds fields, then choose the plus or minus operator. The result updates as you type.
  • In Time Between, enter a start and end time. Seconds are supported. Add dates on both sides when the span crosses days and the exact calendar dates matter.
  • Read the normalized breakdown and, below it, the same span as total hours, total minutes, and total seconds.

Worked Examples

Planning a shift. Duration one is 1d 2h 30m and duration two is 3h 45m. In seconds: 95,400 + 13,500 = 108,900. Normalized, that is 1d 6h 15m, and the total-hours line reads 30.25.

Subtracting a break. An 8-hour shift minus a 3h 20m break is 28,800 − 12,000 = 16,800 seconds, or 4h 40m. The total-hours line shows 4.6667, which is handy for decimal payroll.

An overnight span. With no dates, 22:00 to 01:30 is detected as crossing midnight, so the end time wraps forward and the result is 3h 30m.

A multi-day span. With dates filled in, 2026-03-01 10:00 to 2026-03-03 14:00 gives a day difference of 2 plus a clock difference of 4h, for 2d 4h.

How the Normalization Works

Every duration is converted to a single signed number of seconds using 60 seconds per minute, 3,600 per hour, and 86,400 per day. The result is then divided back out to produce whole days, then whole hours, then whole minutes, with the remaining seconds left over. This is why 90 minutes entered in the minutes field becomes 1h 30m rather than staying as 90. Negative totals are normalized over their absolute value and flagged with a minus sign, so the magnitude stays readable. Because the underlying value is one integer number of seconds, all three alternative totals are exact divisions of the same figure.

Reading the Three Totals

The days:hours:minutes:seconds breakdown is for people; the three totals are for arithmetic. A duration of 2h 15m is 2.25 total hours, 135 total minutes, and 8,100 total seconds. Use whichever unit matches the next step: decimal hours for invoicing and payroll, minutes for a scheduler or a video timeline, and raw seconds when feeding an API or a timestamp field. All three come from the same integer second count, so they never disagree with one another. The formatted line, such as “-1d 2h 3m 4s”, is just the breakdown with the sign attached, and it is the form you would copy onto a printed timesheet. When a result looks surprising, check the total-seconds line first, because it removes all the carrying and shows the raw magnitude.

Practical Tips

For recurring calculations, standardize your units before entering anything. Convert every leg of a trip into the same unit set so you are not mixing “1 hour 30 minutes” in one place with “90 minutes” in another. When a total feeds payroll, use the total-hours figure and round only at the end, since rounding each segment first can drift by a minute or more over a pay period. If you track night shifts, make the date fields part of your habit: a 22:00 to 06:30 span reads correctly as 8h 30m only when the tool knows the end is the next morning, which it infers only when no dates are present.

Common Mistakes

  • Forgetting to add dates when a span crosses midnight. Without them, the calculator always assumes the end time is on the next day, which is right for a night shift but wrong for a span of several days.
  • Reading the total-hours figure as a clock time. A total of 2.5 hours means two hours and thirty minutes, not 2h 50m.
  • Filling in a date on only one side, which raises the date mismatch error. Fill in both or neither.
  • Assuming Add / Subtract validates its inputs. It does not; it accepts decimals and negative numbers and simply sums them, so a typo silently changes the total.

Edge Cases Worth Knowing

When neither date is set and the start and end times are identical, the end is treated as the next day and the result is a full 24 hours rather than zero. Clock times are validated to real ranges: hours 0–23, minutes 0–59, seconds 0–59. Date strings must be real calendar dates, so 2026-02-30 is rejected while 2026-02-28 is accepted. In Add / Subtract mode there is no upper bound on any field, which is useful for summing many small segments but also means nonsense input produces a confident-looking nonsense answer.

Frequently Asked Questions

What is the difference between Add/Subtract and Time Between?

Add/Subtract works with amounts of time: it combines two durations written in days, hours, minutes and seconds. Time Between works with points in time: it measures the gap from a start clock time to an end clock time, optionally on different calendar dates.

Why does subtracting a larger duration give a negative result?

There is no clamping. Subtract mode converts both durations to seconds and returns the signed difference, so 1h 30m minus 2h 15m is shown as -0d 0h 45m, and the total-hours figure is -0.75. A minus sign simply means the second duration was larger.

Does Time Between automatically handle an end time before the start time?

Yes, when neither date is filled in. The end time is treated as if it falls on the next day, so 22:00 to 01:30 returns 3h 30m. An identical start and end time wraps a full day and returns 24h.

How do I measure a span that crosses several days?

Fill in a date on both sides of Time Between. The calculator uses the calendar-day difference plus the clock difference, so 2026-03-01 10:00 to 2026-03-03 14:00 returns 2d 4h. A date on only one side triggers an error.

Can I type 90 minutes or 25 hours into a single field?

Yes in Add/Subtract mode. The fields are not range-limited, so 90 minutes contributes 5400 seconds and is normalized to 1h 30m in the breakdown. Fields also accept decimals, so 1.5 hours equals 1h 30m.

What does a date mismatch error mean?

It means one side of Time Between has a date and the other does not. The calculator cannot know which calendar day to anchor the undated side to, so it refuses to guess. Fill in both dates or clear both.

Reviewed by the HandyTools Hub team · Last updated