Time Duration Calculator — Time Between Two Times
Enter a start and end date and time to get the exact elapsed duration — broken down into days, hours, minutes and seconds, plus a decimal total in hours and minutes. Overnight spans (an end time earlier in the clock than the start, on the next day) are handled correctly as long as the end date is set one day later. Everything runs in your browser; nothing is sent to a server.
About the time duration calculator
A time duration calculator finds the exact elapsed time between a start and end date/time — broken into days, hours, minutes and seconds, plus a decimal total. Set the end date one day later than the start to correctly handle an overnight span.
Working out "3 hours and 45 minutes" from "started at 9:15, finished at 1:00" in your head is easy to get slightly wrong, especially across a lunch break or past midnight. This calculator does the subtraction precisely: enter a start date/time and an end date/time, and it returns the exact gap in days, hours, minutes and seconds, along with a decimal-hours total useful for logging or billing.
Worked examples
| Start | End | Duration |
|---|---|---|
| 9:00 AM | 5:00 PM | 8h 00m |
| 9:00 AM | 5:30 PM | 8h 30m |
| 10:30 PM | 6:15 AM | 7h 45m (overnight) |
| 11:00 PM | 7:00 AM | 8h 00m (overnight) |
When to use it
- Logging how long a task, meeting or work session actually took.
- Checking a delivery or travel window between two timestamps.
- Working out how long is left in an event that started at a known time.
- Cross-checking a timesheet entry someone else filled in.
How to use it
- Enter the start date and time.
- Enter the end date and time — set the end date a day later if the span crosses midnight.
- Read the result in days/hours/minutes/seconds, or use the decimal total for logging.
Tips
- If your result looks negative or huge, check whether the end date needs to be the next day.
- Use the decimal-hours total (e.g. 3.75) when pasting into a spreadsheet or invoice.
FAQ
How do I calculate the duration between two times?
Enter a start date and time, and an end date and time. The calculator subtracts one from the other and shows the result in days, hours, minutes and seconds.
Does this handle overnight spans, like 11pm to 6am?
Yes — enter the end date as the next day and the calculation is exact.
How many hours is 9 to 5?
Eight hours, before any unpaid break is deducted. With a 30-minute unpaid lunch it is 7 hours 30 minutes of paid time, which is why timesheets ask for the break separately.
How do I calculate hours worked on an overnight shift?
Enter the start and end time as normal. Because the end time falls earlier on the clock than the start time, the calculator detects the overnight span and adds the day boundary automatically, so 10:30pm to 6:15am returns 7 hours 45 minutes rather than a negative result.
How do I convert the result into decimal hours for payroll?
Divide the minutes by 60: 45 minutes becomes 0.75, so 7 hours 45 minutes is 7.75. Minutes are out of 60 rather than 100, which is why 45 minutes is not 0.45.