Calculators

Time Duration Calculator

Find the time between two clock times — enter a start and end time, subtract a break, and read the duration in hours and minutes, total minutes and decimal hours.

  • Free forever
  • No sign-up
  • Runs in your browser
Share X LinkedIn

Start time

End time

Break to subtract (minutes)

Leave blank for no break. Handy for an unpaid lunch.

Leave off to auto-detect overnight shifts when the end is before the start.

Duration
Enter a start and end time
Total minutes
Decimal hours
Crosses midnight

What is a time duration calculator?

A time duration calculator works out how long is between two clock times. You give it a start time and an end time, and it returns the gap in a few useful formats: hours and minutes for reading, total minutes for precision, and decimal hours for payroll and invoicing. It's the quick answer to questions like "I started at 08:45 and finished at 17:15 — how many hours is that?" without counting on your fingers or reaching for a spreadsheet formula.

How it works

The calculation is simple subtraction with two sensible extras built in:

  1. Basic duration. Each time is converted to minutes past midnight, then the start is subtracted from the end. 09:00 (540 minutes) to 17:30 (1050 minutes) gives 510 minutes, or 8h 30m.
  2. Crossing midnight. If the end time is earlier than the start time, the shift almost certainly ran overnight, so 24 hours (1440 minutes) is added automatically. A 22:00 start and 06:00 end therefore reads as 8 hours, not a negative number. You can also force this with the Ends next day checkbox when your times don't obviously cross midnight.
  3. Breaks. Any minutes you enter in the break field are subtracted from the gross duration, and the result never drops below zero.

Everything recalculates the instant you change a field, so you can nudge a time and watch the total update live.

How to use it

  1. Enter your start time (for example 08:45).
  2. Enter your end time (for example 17:15).
  3. Optionally type a break in minutes to subtract an unpaid lunch or rest period.
  4. If the shift ends the following day and the times don't already cross midnight, tick Ends next day.
  5. Read the duration headline, then the breakdown: total minutes, decimal hours and whether the shift crosses midnight. Use Copy to grab a one-line summary for your notes or timesheet.

A worked example

You start a night shift at 21:30 and clock off at 05:45 the next morning, with a 45-minute unpaid break:

  • The end (05:45) is before the start (21:30), so the calculator adds 24 hours.
  • Gross duration: 05:45 next day − 21:30 = 8h 15m (495 minutes).
  • Subtract the 45-minute break: 495 − 45 = 450 minutes.
  • Result: 7h 30m, which is 7.5 decimal hours.

Copy that and it lands in your timesheet in one line. If you're logging a whole week rather than a single shift, the Timesheet Calculator adds up seven days at once, and if some of those hours run past your contracted total, the Overtime Calculator turns them into overtime pay.

A note on longer gaps

This tool measures durations within a day or across a single midnight — it's built for shifts, sessions and appointments, not multi-day spans. If you need the number of days, weeks or months between two calendar dates, the Date Difference Calculator is the right one for that job.

Private by design

The whole calculation runs in your browser with plain JavaScript. Your times and breaks are never uploaded, stored or shared — they stay on your device, and nothing is sent to a server. That makes it safe for sensitive rotas or client billing. Browse more number and time tools on the all tools page.

Frequently asked questions

Comet's got your back

Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.

Visit help centre