Time Duration Calculator

Find the exact duration between two times, add or subtract hours and minutes from a clock time, and calculate multi-day time spans with break deductions. Overnight shifts, decimal hours, and total minutes — all handled automatically in your browser.

Duration Between Two Times

Add or Subtract Time

Duration Between Two Dates & Times

What does this Time Duration Calculator do?

This free online time duration calculator handles three of the most common time-math problems in one place. It finds the exact duration between two clock times, it adds or subtracts a duration from a starting time, and it calculates the total span between two full dates and times.

The Between Two Times tab is the one most people need. Enter a start time and an end time, optionally deduct a break in minutes, and you get the net duration in hours and minutes, plus decimal hours and total minutes — the exact formats payroll and invoicing systems expect. Overnight shifts (where the end time is earlier than the start time) are detected and handled automatically.

Everything runs locally in your browser. No server, no signup, no tracking. Your times never leave your device.

How to use the Time Duration Calculator

Between Two Times

  1. Enter a start time and an end time. Both use the 24-hour format for precision.
  2. If you took a break during the period, enter the break length in minutes. Leave it at 0 for no deduction.
  3. Leave Overnight set to "Auto-detect" and the calculator will handle it if the end time is earlier than the start time. Force it on or off if you want to override the detection.
  4. Click Calculate Duration. The net duration appears as hh:mm:ss, with decimal hours and total minutes shown separately.

Add / Subtract Time

  1. Enter a starting time.
  2. Choose Add or Subtract.
  3. Enter the duration in hours, minutes and seconds.
  4. Click Calculate Result. Midnight crossover is handled automatically — for example, 23:00 + 2 hours = 01:00 the next day.

Date & Time Range

  1. Enter a full start date and time.
  2. Enter a full end date and time.
  3. Click Calculate Span to get the total gap in days, hours, minutes and seconds, plus total hours, minutes and seconds.

Why use this Time Duration Calculator?

Overnight shift support

End time earlier than start time? The calculator detects the overnight crossover and adds 24 hours automatically. No negative results, no manual fudging.

Break deduction

Enter the break length in minutes and get the net working time — exactly what goes on a timesheet or invoice.

Decimal hours output

Most payroll systems need decimal hours (8.50), not hh:mm (8:30). Both formats are shown side by side.

Three modes in one

Duration between two times, add/subtract time, and full date-range spans. No need to juggle three separate tools.

100% private

Everything runs in your browser. No server, no logs, no tracking. Your times never leave your device.

Works offline

Once the page loads, the calculator works without an internet connection. Perfect for travel or remote areas.

How time duration is calculated

All three modes reduce to the same arithmetic: convert everything to seconds, do the math, then convert back. Here's how each mode works under the hood.

Mode Formula Handles
Between two times end − start (− break) If negative, add 24 hours (overnight shift)
Add / Subtract start ± duration Wrap around 24-hour clock; report day shift
Date & time range end − start Month lengths and leap years; full calendar awareness

Converting hh:mm:ss to decimal hours

Decimal hours are useful because payroll systems multiply them by an hourly rate. The conversion is:

decimal hours = hours + (minutes ÷ 60) + (seconds ÷ 3600)

For example, 8 hours 30 minutes = 8 + (30 ÷ 60) = 8.50 decimal hours. This calculator shows decimal hours to two decimal places, which is the standard precision for most payroll and billing systems.

Converting hh:mm:ss to total minutes

Total minutes are useful for pro-rated billing, where a client is charged per minute:

total minutes = (hours × 60) + minutes + (seconds ÷ 60)

A note on daylight saving time

Duration calculations within a single time zone operate on the local time values you enter. Across a DST transition, however, one calendar day can be 23 or 25 hours long in real time — so a "24-hour" span from noon Saturday to noon Sunday might actually be 23 hours on the clock during a spring-forward transition, or 25 hours during a fall-back transition.

The Between Two Times and Add / Subtract tabs operate on clock times, so they don't know about DST. If you need DST-accurate durations, convert both timestamps to UTC first and subtract there, or use the Date & Time Range tab with full dates so that calendar-day counts stay correct.

For the vast majority of everyday use — work shifts, meeting lengths, cooking times, exercise durations — DST is irrelevant, and this calculator gives you the exact answer you need.

Common time duration use cases

Work and payroll

  • Calculating daily or weekly working hours from clock-in and clock-out times
  • Deducting unpaid lunch breaks from total shift length
  • Converting worked hours into decimal format for payroll systems
  • Handling overnight shifts in hospitality, healthcare and security

Freelance and client billing

  • Turning a project's start and end times into billable hours
  • Producing total minutes for per-minute billing arrangements
  • Tracking time spent on individual tasks within a larger project

Everyday planning

  • Working out what time a meeting ends given a start time and duration
  • Calculating how long a flight or drive will take with breaks
  • Adding a cooking time to a recipe's start time to get the finish time

Fitness and hobbies

  • Tracking workout durations, split times and rest intervals
  • Timing laps, sets and circuits down to the second
  • Converting total exercise minutes into decimal hours for fitness apps

Worked examples

Example 1: A normal work shift with a break

Start: 09:00:00 · End: 17:30:00 · Break: 30 minutes

  • Raw duration = 8 hours 30 minutes
  • Net after break = 8 hours 00 minutes (480 minutes)
  • Decimal hours = 8.00

Example 2: An overnight shift

Start: 22:00:00 · End: 06:00:00 · Break: 0 minutes

  • Raw duration = 8 hours 00 minutes (the calculator adds 24 hours to handle the crossover)
  • Decimal hours = 8.00

Example 3: Adding time to a clock time

Start: 14:30:00 · Add: 1 hour 45 minutes

  • Result = 16:15:00, same day

Example 4: Subtracting past midnight

Start: 02:30:00 · Subtract: 4 hours

  • Result = 22:30:00, previous day

Frequently asked questions

Enter a start time and an end time in the Between Two Times tab. The calculator subtracts start from end and shows the result in hours, minutes and seconds, plus decimal hours and total minutes. If the end time is earlier than the start time, the calculator assumes the shift crosses midnight and adds 24 hours automatically.
Enter your total break time in minutes and the calculator subtracts it from the raw duration. This gives you the net working time — exactly what you'd put on a timesheet or invoice. If the break is longer than the shift, the result is clamped to zero rather than going negative.
Yes. If the end time is earlier than the start time, the calculator treats it as an overnight shift and adds 24 hours. So 22:00 to 06:00 correctly shows 8 hours, not a negative number. You can also force overnight on or off if the auto-detection guesses wrong.
Decimal hours express a duration as a single decimal number instead of hours and minutes. For example, 8 hours 30 minutes = 8.50 decimal hours. Payroll systems and invoicing tools usually need decimal hours, not hh:mm format, so this output is directly usable without conversion.
Switch to the Add/Subtract tab. Enter a starting time and a duration in hours, minutes and seconds, then choose add or subtract. The result shows the final clock time, and midnight crossover is handled automatically. The Day shift card tells you whether the result landed on the same day, the next day, or the previous day.
Duration calculations within a single time zone operate on the local time values you enter. Across a DST transition, one calendar day can be 23 or 25 hours long in real time. If you need DST-accurate cross-zone durations, convert both timestamps to UTC first and subtract there. The Date & Time Range tab uses full dates and therefore handles day counts correctly.
Yes. The Date & Time Range tab takes a full start date and time and a full end date and time. It returns the total gap in days, hours, minutes and seconds, and also the total hours and total minutes. Month lengths and leap years are handled automatically.
Yes, completely free. No signup, no watermark, no hidden charges. Use it as many times as you want.
Yes. Once the page loads, the calculator works entirely in your browser without an internet connection. All calculations happen on your device.