Time Duration Calculator
Calculate the duration between two times in hours and minutes, including periods that run past midnight. Shows decimal hours for payroll.
Last reviewed: 30 July 2026
Related calculators
-
Hours Worked Calculator
Work out paid hours from a shift, after unpaid breaks.
-
Timesheet Calculator
Total a week of shifts, with breaks, overtime and pay.
-
Date Difference Calculator
Find the exact gap between two dates in every useful unit.
-
Meeting Time Planner
Find meeting slots that work across several countries.
-
Time Zone Converter
Convert a time between any two cities, with DST handled.
How this calculation works
Both times are converted to minutes past midnight and one is subtracted from the other. Any break you enter is then deducted. Working in minutes rather than in clock arithmetic keeps periods that cross midnight simple and exact.
Crossing midnight
When the finish time is earlier in the day than the start time, the period is assumed to run into the next day and 24 hours are added. A shift from 22:00 to 06:00 is therefore eight hours, not minus sixteen. Untick the option if you want a backwards period reported as a negative duration instead.
Decimal hours
Decimal hours express minutes as a fraction of an hour: 30 minutes is 0.5, 15 minutes is 0.25, and 20 minutes is 0.33. Payroll systems almost always want this format. Writing 7 hours 30 minutes as “7.30” instead of 7.5 understates the time by 12 minutes.
Time formats accepted
You do not have to match a particular format. 9, 9:30,
9.30, 930, 0930, 9am and
5:30 pm are all understood. Anything that cannot be read as a time produces a
clear error rather than a wrong answer.
Worked example
A night shift from 22:00 to 06:30 with a 45-minute break
- 22:00 is 1,320 minutes past midnight; 06:30 is 390 minutes.
- Because the finish is earlier, a day is added: 390 + 1,440 = 1,830 minutes.
- 1,830 − 1,320 = 510 minutes, or 8 hours 30 minutes on the clock.
- Deducting the 45-minute break leaves 465 minutes: 7 hours 45 minutes.
- That is 7.75 decimal hours.
Limitations
- Periods longer than 24 hours are not supported; use the date difference calculator.
- Daylight-saving changes are not applied.
- Seconds are not handled — times are read to the nearest minute.
Frequently asked questions
How do I calculate a period that runs past midnight?
Just enter it. When the finish time is earlier than the start time, the calculator assumes the period ran into the next day, so 22:00 to 06:00 gives eight hours. If you genuinely meant a backwards period, untick "Allow the period to cross midnight" and the result is shown as negative.
What time formats can I type?
Almost anything sensible: 9, 9:30, 9.30, 0930, 930, 9am, 5:30 pm and 17:30 all work. You can also use 24:00 to mean the end of the day.
What are decimal hours for?
Payroll, invoicing and timesheet systems usually want hours as a decimal rather than hours and minutes. Seven hours and thirty minutes is 7.5 decimal hours, not 7.30 — a mistake that quietly costs money on every timesheet it appears on.
Does this account for daylight saving?
No. This calculator measures the gap between two clock readings on the same notional day. On the two days a year when clocks change, the real elapsed time differs by an hour. For durations spanning a clock change, use the time zone converter.
Can I add a break?
Enter the break in minutes and it is deducted from the total. If you need to total several shifts across a week, the timesheet calculator does that in one go.