Time Duration Calculator
Find the time between two clock times — enter a start and end time, subtract a break, and read the duration in hours and minutes, total minutes and decimal hours.
- Free forever
- No sign-up
- Runs in your browser
Start time
End time
Break to subtract (minutes)
Leave blank for no break. Handy for an unpaid lunch.
Leave off to auto-detect overnight shifts when the end is before the start.
What is a time duration calculator?
A time duration calculator works out how long is between two clock times. You give it a start time and an end time, and it returns the gap in a few useful formats: hours and minutes for reading, total minutes for precision, and decimal hours for payroll and invoicing. It's the quick answer to questions like "I started at 08:45 and finished at 17:15 — how many hours is that?" without counting on your fingers or reaching for a spreadsheet formula.
How it works
The calculation is simple subtraction with two sensible extras built in:
- Basic duration. Each time is converted to minutes past midnight, then the start is subtracted from the end. 09:00 (540 minutes) to 17:30 (1050 minutes) gives 510 minutes, or 8h 30m.
- Crossing midnight. If the end time is earlier than the start time, the shift almost certainly ran overnight, so 24 hours (1440 minutes) is added automatically. A 22:00 start and 06:00 end therefore reads as 8 hours, not a negative number. You can also force this with the Ends next day checkbox when your times don't obviously cross midnight.
- Breaks. Any minutes you enter in the break field are subtracted from the gross duration, and the result never drops below zero.
Everything recalculates the instant you change a field, so you can nudge a time and watch the total update live.
How to use it
- Enter your start time (for example 08:45).
- Enter your end time (for example 17:15).
- Optionally type a break in minutes to subtract an unpaid lunch or rest period.
- If the shift ends the following day and the times don't already cross midnight, tick Ends next day.
- Read the duration headline, then the breakdown: total minutes, decimal hours and whether the shift crosses midnight. Use Copy to grab a one-line summary for your notes or timesheet.
A worked example
You start a night shift at 21:30 and clock off at 05:45 the next morning, with a 45-minute unpaid break:
- The end (05:45) is before the start (21:30), so the calculator adds 24 hours.
- Gross duration: 05:45 next day − 21:30 = 8h 15m (495 minutes).
- Subtract the 45-minute break: 495 − 45 = 450 minutes.
- Result: 7h 30m, which is 7.5 decimal hours.
Copy that and it lands in your timesheet in one line. If you're logging a whole week rather than a single shift, the Timesheet Calculator adds up seven days at once, and if some of those hours run past your contracted total, the Overtime Calculator turns them into overtime pay.
A note on longer gaps
This tool measures durations within a day or across a single midnight — it's built for shifts, sessions and appointments, not multi-day spans. If you need the number of days, weeks or months between two calendar dates, the Date Difference Calculator is the right one for that job.
Private by design
The whole calculation runs in your browser with plain JavaScript. Your times and breaks are never uploaded, stored or shared — they stay on your device, and nothing is sent to a server. That makes it safe for sensitive rotas or client billing. Browse more number and time tools on the all tools page.
Frequently asked questions
Comet's got your back
Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.
Visit help centreRelated tools
All Calculators tools →Timesheet Calculator
Add up a week of work hours — enter start, end and break times for Monday to Sunday and get your daily hours, weekly total and gross pay.
CalculatorsOvertime Calculator
Work out how many overtime hours you've done and what they pay — set your standard hours, hourly rate and overtime multiplier.
CalculatorsDate Difference Calculator
Count the days, weeks and months between two dates.
Calculators