Skip to content

Time Duration Calculator

Hours between two times, including shifts past midnight.

Work out Time Duration. Hours between two times, including shifts past midnight. Handles the edge case everyone gets wrong.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these

24-hour clock, as HH:MM. Use 22:00 rather than 10:00 PM.

min

Elapsed time

8 h 30 min

8.5 decimal hours

Elapsed8 h 30 min
Break deducted0 min
Paid time8 h 30 min
Decimal hours8.5
Total minutes510
Crosses midnight?No

Decimal hours are what payroll systems want: 8 h 30 min is 8.5, not 8.30. Multiplying 8.30 by an hourly rate underpays by eighteen minutes an occurrence, which is the commonest arithmetic error on a timesheet.

How the Time Duration Calculator works

Enter a start and end time on the 24-hour clock for the elapsed time in hours, minutes and decimal hours, with an optional unpaid break deducted. An end time earlier than the start is read as a shift running past midnight rather than an error.

Also known as: hours between two times calculator · time difference calculator · elapsed time calculator · how many hours worked calculator

Frequently asked questions

How do I calculate hours between two times?

Convert both to minutes past midnight, subtract, and convert back. If the end is earlier than the start, add 24 hours — the shift crossed midnight.

What are decimal hours and why do they matter?

8 hours 30 minutes is 8.5 decimal hours, not 8.30. Payroll systems want the decimal form, and multiplying 8.30 by an hourly rate underpays by eighteen minutes every time. It is the commonest arithmetic error on a timesheet.

How do I handle a night shift?

Enter the times as they are — 22:00 to 06:00 — and the calculation treats it as eight hours across midnight. It reports that it did so, in case the times were simply entered the wrong way round.

Should breaks be deducted?

Unpaid breaks, yes. Paid breaks stay in. Which applies depends on your jurisdiction and contract — in many places a short rest break is paid and a longer meal break is not.

Put this calculator on your own site

Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.

The one-line version
<iframe src="https://www.thecalclibrary.com/embed/time-duration-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Time Duration Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/time-duration-calculator" style="color:#64748b">Time Duration Calculator</a> from The Calc Library</p>

The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.

Related calculators