Time Duration Calculator
How long is it between two clock times, including shifts that run past midnight?
← All time calculatorsInput
Accepts 12h or 24h format, e.g., 09:00 or 9:00 AM
Accepts 12h or 24h format, e.g., 17:30 or 5:30 PM
Controls output format only
Show seconds in results
End time is on the following day
Total Duration
8h 30m
Decimal Hours
8.50hrs
Total Minutes
510min
Day %
35.4%
Breakdown
- Hours and minutes
- 8h 30m
- Decimal hours
- 8.50
- Total minutes
- 510
- Total seconds
- 30,600
- Day percentage
- 35.4%
- Start
- 09:00
- End
- 17:30
Formula: Time format: 24-hour · Cross midnight: Enabled
8h 30m
This is the exact elapsed span from 09:00 to 17:30 on the same day.
- Start
- 09:00
- End
- 17:30
- Share of a day
- 35.4%
Timeline
Formula
End Time − Start Time = Duration
If end time is earlier than start time and 'Crosses midnight' is enabled, 24 hours are added to the end time. Equal start and end times produce zero duration.
Example: Standard Work Day
Tips
- The parser accepts both 12-hour and 24-hour formats regardless of the output setting.
- Enable 'Crosses midnight' for overnight shifts or events.
- Enable 'Include seconds' for precise timing.
- Results update automatically as you type.
Frequently Asked Questions
How do I calculate overnight duration?
Enable the 'Crosses midnight' option. This tells the calculator that the end time is on the following day, so it adds 24 hours to the end time before calculating the difference.
What if the end time is earlier than the start time?
If 'Crosses midnight' is enabled, the calculator assumes the end time is the next day. If disabled, it will show an error asking you to enable 'Crosses midnight'.
Can I use AM/PM format?
Yes. The parser accepts both 12-hour (AM/PM) and 24-hour formats regardless of the output format setting. The format toggle only controls how results are displayed.
How accurate is the calculation?
The calculation is exact to the second. Enable 'Include seconds' to see seconds in the result. The internal calculation uses integer seconds to avoid floating-point errors.
Can I share my calculation?
Yes. Click 'Share Link' to copy a URL that includes your inputs. Anyone with the link will see the same calculation.
Related Tools
Last reviewed: July 17, 2026