Time Duration Calculator
Use this time duration calculator to find the hours and minutes between two times, including overnight spans, or between two dates with times.
- Free
- No sign-up
- Handles overnight spans
- Two dates and times
Time duration calculator
Turns on by itself for overnight spans. Use it for 24 hours when both times match.
Type times like 9:30, 930, 9:30:15, or 21:30. Add seconds if you need them.
Duration
Crosses midnight
- Decimal hours
- 8.00
- Total minutes
- 480
- Total seconds
- 0
How the duration is worked out
Time duration is the length of time between a start and an end, counted in hours, minutes, and seconds. The calculator turns both times into seconds after midnight and subtracts the start from the end, using one of two rules:
| When | Duration |
|---|---|
| End is later than start (same day) | end − start |
| End is earlier than start (next day) | end + 24 h − start, marked Crosses midnight |
If one of the times is right now, the time until calculator counts down to the other one live.
In date mode it compares the full dates and times, so spans longer than a day work too. The answer is shown in days, hours, and minutes, with decimal hours and total minutes underneath. To turn that total into hours, days, or weeks, use the minutes to hours converter.
If you want to see the working written out, the step-by-step elapsed time version shows the working two ways.
Working in a spreadsheet instead? The guide to time formulas in Excel shows the MOD formula for spans past midnight.
Two spans worked out
An overnight span
How long is it from 10:30 PM to 6:45 AM?
- Write both in 24-hour time: 22:30 and 06:45.
- The end is earlier than the start, so it's the next day. Add 24 hours to the end: 06:45 becomes 30:45.
- Subtract: 30:45 − 22:30 = 8:15.
The span is 8 hours 15 minutes, or 8.25 decimal hours.
Across a weekend, in date mode
How long is it from Friday at 10:00 PM to Sunday at 6:00 AM?
- Friday 10:00 PM to Saturday 10:00 PM is 1 full day, or 24 hours.
- Saturday 10:00 PM to Sunday 6:00 AM is 2 hours to midnight plus 6 hours, so 8 hours.
- Add them: 1 day 8 hours, which is 32 hours or 1,920 minutes.
The button below fills in the coming Friday and Sunday on your own calendar, so you can see date mode reach the same answer.
Time duration questions
How many hours are there between two times?
Subtract the start time from the end time. From 9:00 AM to 5:00 PM is 17:00 − 9:00 = 8 hours. If the end time is earlier in the day than the start, the span runs past midnight, so add 24 hours to the end before subtracting.
How do I calculate time past midnight?
Add 24 hours to the end time. For 11:15 PM to 7:00 AM, write 7:00 AM as 31:00, then 31:00 − 23:15 = 7:45, so the span is 7 hours 45 minutes. The calculator does this for you and marks the result Crosses midnight.
Why might date mode be off by an hour around daylight saving time?
Date mode compares the two dates and times exactly as you typed them, the way a schedule reads. If a daylight saving change happens between them, the real time that passed is one hour more or less than that. For most schedules the clock reading is what you want, but keep this in mind for spans that cross a change date.
What is the result in decimal hours?
Decimal hours divide the minutes by 60, so 8 hours 15 minutes is 8.25 hours and 7 hours 40 minutes is 7.67 hours. The calculator shows it under the main answer, rounded to two places.
Related tools
- Elapsed time calculatorThe same answer with the steps written out.
- Hours ago calculatorWhat time it was, or will be, a number of hours from now.
- Timer calculatorAdd or subtract several durations.
- Military time converterSwitch between 12-hour and 24-hour time.
The time duration calculator on TimerCalculator.com was built by Cedrick Reese. It works in whole seconds and applies one overnight rule: if the end comes before the start, the end is the next day. Ahead of publishing this version, an automated browser test typed in 9:00 AM to 5:00 PM (8 hours), 10:30 PM to 6:45 AM (8 hours 15 minutes), and 11:00 PM to 7:00 AM (8 hours), then ran the weekend example in date mode and a span across the November clock change to confirm the daylight saving note.