Time Duration Calculator
Calculate the duration between two times. Optionally treat the end time as the next day when it is earlier than the start time.
Time Duration Calculator tool
Auto-detect treats an earlier end time as the next day.
| Metric | Value |
|---|
Privacy: calculations run locally in your browser. No times are stored or transmitted.
This calculator converts both times into seconds from midnight and subtracts the start time from the end time.
Core logic:
Duration (seconds) = end time − start time
If overnight applies, 24 hours (86,400 seconds) is added.
How to interpret results:
- Hours/minutes/seconds: readable duration format
- Total hours: useful for billing or time tracking
- Total minutes: useful for scheduling or reporting
Use overnight mode when shifts or events cross midnight (e.g., night work or late activities).
Examples
- Work shift tracking: Calculate working hours including overnight shifts.
- Task duration: Measure how long an activity takes.
- Sleep tracking: Calculate total sleep time across midnight.
Examples:
- 08:30 → 17:00 = 8h 30m (standard workday)
- 22:15 → 01:45 = 3h 30m (overnight shift)
- 09:00 → 09:00 = 0h (same start and end)
FAQ
- What does this calculator do?
It calculates the duration between a start time and an end time, showing results in hours, minutes, seconds, total hours, and total minutes.
- Does it support overnight durations?
Yes. If the end time is earlier than the start time, it can automatically treat it as the next day.
- What is the difference between modes?
Auto detects overnight automatically. Same-day restricts to one day. Overnight forces the calculation across midnight.
- How should I interpret total hours?
Total hours include fractional values and are useful for billing, time tracking, or reporting.
- Is my data stored?
No. All calculations run locally in your browser.