Time Duration Calculator
Between a shift that starts at 22:00 and one that ends at 06:45 the next day, how many hours were worked? 8:45, but the arithmetic crosses midnight and hands get twisted. This calculator takes two timestamps (with or without dates) and returns the elapsed time as days, hours, minutes and seconds — plus the raw total in any single unit, for payroll, timesheets and billing.
How duration is measured
-
1
Enter start and end
Time-only for clock work, or full dates for multi-day durations.
-
2
Handle midnight rollover
If end is earlier than start, the tool assumes it's the next day.
-
3
See the breakdown
Days, hours, minutes, seconds — plus a decimal hour total for billing.
-
4
Convert to any unit
Total seconds, minutes or hours for copying into spreadsheets.
Common uses
- Payroll: sum shift durations for overtime calculations.
- Billing: convert precise clock intervals into hour-decimal for invoices (8:45 = 8.75 hours).
- Travel: flight times across time zones; journey durations on itineraries.
- Project tracking: see how long a task actually took without resorting to spreadsheets.
- Cooking and fermentation: time a dough prove from 21:00 to 09:00 precisely.
Decimal hours for billing
Most invoicing software wants hours as decimals, not h:mm. Conversion:
| h:mm | Decimal |
|---|---|
| 0:15 | 0.25 |
| 0:30 | 0.50 |
| 0:45 | 0.75 |
| 1:30 | 1.50 |
| 7:45 | 7.75 |
| 8:30 | 8.50 |
Midnight rollover logic
If you enter 22:00 start and 06:45 end without dates, the tool assumes end is the next day and returns 8h 45m. If you did mean same-day, that would be -15h 15m backward — which is why the assumption is biased toward forward-in-time.
For cross-day durations you want precise, enter full dates on both ends.
Subtle gotchas
- Timezone-naive. This tool ignores timezones. A flight that “lasts” 10h 30m by wall clock may be 9h 30m by GMT if you crossed a zone. For timezone-aware duration, use a dedicated tool.
- DST transitions skew results. A shift from 01:00 to 04:00 on the spring-forward night is really only 2 hours, not 3.
- Leap seconds are ignored (as they are in every practical tool).
Exporting
The decimal-hours and total-seconds outputs are formatted for clean paste into Excel, Google Sheets or Notion. Copy either directly without reformatting.
Frequently Asked Questions
Yes — enter both start and end as full dates (2026-01-01 09:00 and 2026-01-03 17:30) and the result returns as days + hours + minutes.
Compute the full shift duration here, then subtract break time separately (another run through the calculator, or just mental subtraction). Many payroll systems want actual work hours, not shift length.
The calculator is timezone-naive — it treats both times as being in the same unspecified timezone. If you mixed, say, UTC and PST without converting first, the result will be off by the timezone offset.
No. Everything runs in your browser.