Time Duration Calculator

Enter one or more time ranges and see how long each lasts and the total. A range that ends earlier than it starts is treated as running past midnight, so 22:00 to 06:30 is 8 hours 30 minutes. You can take off an unpaid break, and read the result as hours and minutes or as decimal hours for timesheets. Everything runs in your browser.

Processed locally in your browser. Your data is not uploaded to our servers.

Write each range as start โ€“ end, using 24-hour times (22:00) or am/pm (9am, 5:15 pm). An end time before the start time means the range runs past midnight.

Taken off every range. Leave at 0 for none.

Result

Examples

Worked examples:

TimesDurationNote
22:00 - 06:308 hours and 30 minutesPasses midnight
09:00 - 17:308 hours and 30 minutesSame day
9am - 5:15pm8 hours and 15 minutesSame day
23:45 - 00:1530 minutesPasses midnight

Formula & Methodology

Each time becomes minutes after midnight. When the end is later than the start the duration is end โˆ’ start. When the end is earlier, the range runs past midnight and the duration is end + 24 hours โˆ’ start. Breaks are subtracted, and the ranges are added up.

d = end โˆ’ startd = end + 24:00 โˆ’ start (end < start)

Decimal hours are minutes รท 60 rounded to two decimals, so 8 h 20 min is 8.33.

Notes and limitations

  • Times are wall-clock readings. Daylight-saving changes and time zones are not applied, so a night that gains or loses an hour is not adjusted.
  • A range can be at most 24 hours. For longer periods use the date difference calculator.
  • An end time earlier than the start time is read as ending after midnight (22:00 to 06:00 is 8 hours). Write midnight as 00:00; 24:00 is not accepted.
  • Seconds you type are ignored; results are in whole minutes.
  • The same start and end time is 0 minutes unless you choose to treat it as 24 hours.
  • You can enter up to 500 ranges.

How to Use

  1. Type each time range on its own line.
  2. Add an unpaid break if you want it taken off every range.
  3. Read each duration and the total.
  4. Copy the total in the format you need.

Frequently Asked Questions

How do I calculate time that passes midnight?

If the end time is earlier than the start time, add 24 hours to the end time. For 22:00 to 06:30 that is 6:30 + 24:00 โˆ’ 22:00 = 8 hours 30 minutes. The calculator does this automatically.

How do I turn hours and minutes into decimal hours?

Divide the minutes by 60 and add the hours. 8 hours 30 minutes is 8.5 hours, and 8 hours 20 minutes is about 8.33 hours.

Can I add several shifts together?

Yes. Put each shift on its own line and the calculator gives each duration and the total.

Are daylight-saving changes included?

No. The tool works with clock times only. On a night when the clocks change, the real elapsed time differs by one hour from the result.

Is anything sent to a server?

No. The calculation runs in your browser and nothing you enter is uploaded or sent to analytics.

Last updated: