Skip to main content

Free Time Duration Calculator – Between Times and Add or Subtract

Find the duration between two times or datetimes in hours, minutes and seconds, or add and subtract a duration from a time. Handles crossing midnight and spans of multiple days.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

DurationAdd / SubtractCross MidnightMulti-DayFree

8h 30m 0s

Elapsed duration

8.50

Total hours

510.00

Total minutes

30600

Total seconds

100% Private

Everything runs in your browser. Nothing you type is uploaded.

How to Use Time Duration Calculator

1

Choose Duration Between or Add and Subtract

Select the duration-between mode to measure the gap between two moments, or the add-and-subtract mode to shift a starting time forward or backward by a chosen stretch of days, hours, minutes and seconds.

2

Enter Your Times or the Duration

In duration mode enter a start and an end date and time; in add-and-subtract mode enter the starting date and time, pick add or subtract, and type the days, hours, minutes and seconds you want to apply.

3

Read the Breakdown and Totals

See the span broken into days, hours, minutes and seconds along with the total in hours, minutes and seconds, or read the resulting date and time, then copy the value you need for your record.

How to Measure Duration Between Times and Add or Subtract Time

A time duration calculator answers two everyday questions: how long is the gap between two moments, and what time do you land on if you add or subtract a stretch of time from a starting point. Both sound simple until a span crosses midnight, runs over several days, or mixes hours with minutes and seconds, at which point mental arithmetic gets error-prone. This tool takes two date-and-time values, computes the elapsed span, and breaks it into days, hours, minutes and seconds, while also giving the total expressed purely in hours, in minutes, and in seconds. A second mode adds or subtracts a duration to a starting datetime and returns the resulting moment. The method is deliberately plain. Each date-and-time you enter is read into the browser's native date object, and the elapsed span is the end moment minus the start moment in milliseconds. Because both values are read from the same local clock, any timezone or daylight-saving offset applies equally to both and cancels out for an elapsed measurement, so no manual offset is needed to get the gap right. From the millisecond difference the tool takes whole days first, then the leftover hours, then minutes, then seconds, so the breakdown never rounds a partial unit upward. The add-and-subtract mode converts your requested days, hours, minutes and seconds into a single offset and applies it to the starting moment. Here are spans you can check. From 09:00 to 17:30 on the same day the gap is eight hours and thirty minutes, which is 8.5 total hours or 510 total minutes. A time that runs from 22:30 to 01:15 crosses midnight, and treated as a same-day-relative span it comes to two hours and forty-five minutes rather than a negative figure. A span from the first of January at 09:00 to the third of January at 12:30 is two days, three hours and thirty minutes, or 51.5 total hours. In the add mode, starting at the first of January at 10:00 and adding one day, two hours and thirty minutes lands you at the second of January at 12:30. Each of these follows from plain subtraction and addition of milliseconds. A shift worker measures the length of a shift that starts in the evening and ends after midnight without slipping into negative numbers. A project manager finds the elapsed time between a task's start and finish across several days to log hours. A cook or a student adds a set duration to the current time to know when something finishes. Someone scheduling a follow-up subtracts a lead time from a deadline to find the latest safe start. In each case the total-in-each-unit views help when a form wants only minutes or only hours rather than a mixed breakdown. A few cautions keep results trustworthy. If a date or time field is left blank or contains an invalid value, the tool shows a dash rather than a broken result. If the end moment is earlier than the start, the duration is reported as negative and flagged, so you notice a swapped pair rather than reading a wrong positive number. This tool measures elapsed time and shifts a single clock; it does not convert a moment from one timezone to a different timezone, which is a separate task. For counting whole calendar days, weeks or business days between two dates, a dedicated days-between tool is a better fit, since this one focuses on the finer hours-minutes-seconds detail within and across days. A practical habit is to double check the order of your two entries before reading the result, because a swapped start and end is by far the most common reason a duration looks wrong, and the negative flag is there precisely to catch that. When you only need one unit, copy the total-hours or total-minutes figure directly rather than converting the mixed breakdown by hand. Everything is computed in your browser, so no times you enter are uploaded, logged, or stored anywhere.

Examples: Time Duration Calculator

Input

From 09:00 to 17:30 on the same day

Result

8h 30m (8.5 total hours)

17:30 minus 09:00 is 8 hours 30 minutes, which is 8.5 hours or 510 minutes.

Input

From 22:30 to 01:15 crossing midnight

Result

2h 45m

The span wraps past midnight, giving two hours and forty-five minutes rather than a negative value.

Input

Add 1 day 2 hours 30 minutes to Jan 1 10:00

Result

Jan 2, 12:30

The offset of one day, two hours and thirty minutes is added to the start moment to land on Jan 2 at 12:30.

Frequently Asked Questions – Time Duration Calculator

It reads both date-and-time values into the browser's date object and subtracts the start from the end in milliseconds. Because both come from the same clock, timezone and daylight-saving offsets apply to both and cancel, so the elapsed span is correct without any manual offset.