Time Duration Calculator

Time duration

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. 1

    Enter start and end

    Time-only for clock work, or full dates for multi-day durations.

  2. 2

    Handle midnight rollover

    If end is earlier than start, the tool assumes it's the next day.

  3. 3

    See the breakdown

    Days, hours, minutes, seconds — plus a decimal hour total for billing.

  4. 4

    Convert to any unit

    Total seconds, minutes or hours for copying into spreadsheets.

Common uses

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

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.