🕐

Time Duration Calculator

Time between two dates and times in days/hours/minutes/seconds, or add/subtract any duration from a starting moment. Decimal hours included.

LIFESTYLE

Calculate the exact time between two dates and times, or add and subtract a duration from any starting moment. Returns days, hours, minutes, seconds, decimal hours, and the resulting weekday when in add/subtract mode.

Both modes work in absolute UTC seconds to avoid daylight-saving artifacts. "Between" mode parses each date+time as a JavaScript Date object, takes the difference in milliseconds, and decomposes it into days/hours/minutes/seconds via integer division. "Add/Subtract" mode adds the signed delta (days·86400 + hours·3600 + minutes·60 seconds) to the start moment and re-formats the result, including the weekday name.

Disclaimer: Times are treated as local-naive without timezone conversion. For timezone-aware calculations involving travel or international scheduling, convert both endpoints to UTC manually first.

Calculator information

How to use this calculator

  1. Choose mode: Add/Subtract Duration, Time Difference Between Two Times, or Unit Conversion.
  2. For Add/Subtract: enter start time in HH:MM:SS format, then enter the duration to add or subtract.
  3. For Time Difference: enter start and end times. If the interval crosses midnight, check the crossing-midnight option.
  4. For Conversion: enter a value in one unit (e.g. hours) to convert to minutes/seconds or vice versa.
  5. Click Calculate to view the result. Output is shown in HH:MM:SS format and can be copied to clipboard.
  6. Use for work-hour tracking, workout durations, lap times, or task scheduling.

Time Arithmetic Operations (Base 60)

T_total_seconds = hours x 3600 + minutes x 60 + seconds; reverse: hours = T div 3600; minutes = (T mod 3600) div 60; seconds = T mod 60
  • T = total time in seconds
  • div = integer division
  • mod = remainder of division (modulo)
  • 1 hour = 60 minutes = 3,600 seconds; 1 day = 86,400 seconds

All time operations are performed in seconds for consistency, then converted back to HH:MM:SS format.

Worked example: Time difference from 08:30 to 17:15

Given:
  • Start time = 08:30:00
  • End time = 17:15:00
  • Does not cross midnight
Steps:
  1. Convert start to seconds: 8 x 3600 + 30 x 60 + 0 = 30,600 seconds
  2. Convert end to seconds: 17 x 3600 + 15 x 60 + 0 = 62,100 seconds
  3. Difference = 62,100 - 30,600 = 31,500 seconds
  4. Convert to hours: 31,500 / 3,600 = 8.75 hours
  5. Format HH:MM:SS: 8 hours 45 minutes 0 seconds

Result: Work duration is 8 hours 45 minutes (08:45:00). Subtracting a 1-hour break gives 7 hours 45 minutes of effective work time.

Frequently asked questions

How do I add time that crosses 24 hours?
The calculator automatically handles overflow using modulo 86,400 (seconds per day). For example, 23:00 + 3 hours = 02:00 (next day). In pure duration mode, results over 24 hours display as total hours (e.g. 27:30:00) rather than 03:30. Users can choose the format that fits their need.
What's the difference between duration and clock time?
Clock time refers to a specific point (e.g. 2:30 PM = fourteen-thirty). Duration is the length of time between two points (e.g. 2 hours 30 minutes). This calculator handles both. Time minus time produces a duration; time plus duration produces a new clock time.
Does it support 12-hour format (AM/PM)?
The default is 24-hour format because it is unambiguous for calculations. 12-hour format is available in settings: 1:30 PM is automatically converted to 13:30 before calculation. Output can also be shown in 12-hour format if enabled. The US predominantly uses 12-hour (AM/PM) for everyday time.
How do I compute overtime hours?
Calculate the difference between clock-in and clock-out, then subtract unpaid break time. Under the federal Fair Labor Standards Act (FLSA), nonexempt employees earn 1.5x pay for hours over 40 in a workweek. Some states (e.g. California) also require daily overtime after 8 hours/day and double-time after 12 hours/day. Check both federal and state rules.
Can I calculate time across different time zones?
This calculator focuses on absolute time arithmetic without considering time zones. For US zones: EST is UTC-5, CST UTC-6, MST UTC-7, PST UTC-8 (standard time). For international zones, use a World Clock tool or convert to UTC first. Note that most of the US observes Daylight Saving Time, shifting clocks one hour forward in March and back in November.

Last updated: May 11, 2026