Skip to content
Toolore

Calculators

Time Duration Calculator

Enter a start and end time to get the duration in hours and minutes, plus decimal hours for timesheets and invoices. Overnight shifts work correctly — an end time earlier than the start is treated as the next day.

Optional, deducted from the total

Duration

8h 30m

Decimal hours
8.50
Total minutes
510

Overnight shifts are handled

If the end time is earlier than the start, it is treated as the next day — so 22:00 to 06:00 is eight hours, not minus sixteen.

How to use this tool

  1. Enter the start time using the 24-hour clock or your device's time picker.
  2. Enter the end time. If it is earlier than the start, it is treated as the following day.
  3. Optionally enter a break in minutes, which is deducted from the total.
  4. Read the duration in hours and minutes, or the decimal hours figure if you are filling in a timesheet.

Formula and method

elapsed = end − start
if end ≤ start:  elapsed = end + 24h − start
worked  = elapsed − break

Decimal hours are simply the total seconds divided by 3,600. Eight hours thirty minutes is 8.5, not 8.30 — a distinction that costs people money on invoices.

Worked examples

09:00 to 17:30 with a 30-minute break

  1. Elapsed: 8 hours 30 minutes
  2. Less the break: 8 hours 0 minutes

8 hours worked, or 8.00 decimal hours.

A night shift from 22:00 to 06:00

  1. The end time is earlier, so it falls on the next day
  2. 22:00 to midnight is 2 hours, midnight to 06:00 is 6 hours

8 hours, not minus sixteen.

Notes and limitations

  • Decimal hours are not the same as hours and minutes. Eight hours thirty minutes is 8.5 decimal hours; writing 8.30 would under-report by twelve minutes.
  • A shift longer than 24 hours cannot be expressed with two clock times. Use the Date Difference Calculator for anything spanning more than one night.
  • Daylight-saving changes are not modelled. On the two nights a year when the clocks move, an overnight shift is an hour longer or shorter than the calculation shows.
  • The break is deducted as a flat number of minutes. Statutory break entitlements vary by country and are not applied automatically.

Frequently asked questions

How do I calculate hours worked?

Subtract the start time from the end time, then deduct any unpaid break. Enter both times above and the calculator does it, including the overnight case.

What are decimal hours?

Hours expressed as a decimal rather than hours and minutes, which is what payroll systems and invoices usually want. Thirty minutes is 0.5, fifteen minutes is 0.25, and twenty minutes is 0.333.

How do I calculate a night shift?

Enter the times as they are. When the end time is earlier than the start, the calculator treats it as the following day, so 22:00 to 06:00 correctly gives eight hours.

Does it handle shifts longer than 24 hours?

No — two clock times cannot express more than one day. Use the Date Difference Calculator when the period spans multiple days.