Time Duration Calculator

Hours and minutes between two times.

Enter a start time and an end time to see the duration.

Free online time duration calculator

This time duration calculator works out exactly how much time passes between a start time and an end time — the answer to "how many hours is that shift?" in a single glance. Enter two times and it instantly shows the duration in hours and minutes, the total number of minutes, and the equivalent in decimal hours for payroll and invoices. It handles overnight spans that cross midnight and can subtract an unpaid break, so it's ideal for timesheets, work shifts, cooking, study sessions, and billing. Everything runs in your browser, so your times stay private.

How to calculate the time between two times

  1. Enter your Start time in the first field.
  2. Enter your End time in the second field.
  3. Tick overnight if the end time falls on the next day.
  4. Add any unpaid break minutes to subtract from the total.
  5. Read the live result, then click Copy summary for a timesheet or message.

How the calculation works

Each time is converted to minutes since midnight, then the start is subtracted from the end. When the overnight box is ticked or the end time is earlier than the start, a full 24 hours is added so the result is never negative. Any break minutes are then taken off and clamped at zero. Need whole calendar days instead of clock times? Try the date difference calculator. Working with epoch values? Use the Unix timestamp converter.

Private and instant

There is no sign-up and nothing is uploaded — the calculation happens locally on your device. Bookmark this page the next time you need a fast, accurate count of the hours and minutes between two times.

Frequently asked questions

How does the time duration calculator work?

Enter a start time and an end time and the tool converts each into minutes since midnight, subtracts the start from the end, and shows the result in hours and minutes. It also gives you the total in minutes and as decimal hours. Everything is calculated live in your browser as you type.

How do I calculate hours across midnight or an overnight shift?

Tick the "End time is on the next day (overnight)" box, or simply enter an end time that is earlier than the start time. In either case the calculator adds 24 hours so a shift from 22:00 to 06:00 correctly reads as 8 hours rather than a negative number.

How do I subtract a lunch or coffee break?

Type the number of unpaid break minutes into the "Break to subtract" field. The tool removes that amount from the total, which is handy for working out paid hours on a timesheet. If the break is longer than the shift, the duration is clamped to zero rather than going negative.

What are decimal hours used for?

Decimal hours express the duration as a single number — 3 hours 45 minutes becomes 3.75 — which is the format most payroll systems and invoices use to multiply hours by an hourly rate. The figure is rounded to two decimal places.

Are my times kept private?

Yes. This calculator runs entirely in your browser using JavaScript. The times you enter are never uploaded, stored, or shared, so it is safe to use for private schedules and timesheets.