Time Duration Calculator
The Time Duration Calculator finds the exact duration between two times. It handles periods that cross midnight.
Time Duration Calculator
When the period begins.
When the period ends.
Check if the end time is on the next day.
What the result means
The duration is the difference between the two times. If the end time is earlier than the start time, the calculator assumes it crosses midnight unless you specify otherwise.
How to use this calculator
- 1Enter the start time.
- 2Enter the end time.
- 3Check 'crosses midnight' if the end time is on the next day.
- 4Press Calculate to see the duration.
The formula
The calculation uses a standard, verifiable formula. Here it is in its simplest form.
Duration = End Time − Start Time
If negative, add 24 hours
What each variable means
| Symbol | Name | Description |
|---|---|---|
| Start | Start time | When the period begins. |
| End | End time | When the period ends. |
Step-by-step example
Example: 09:00 to 17:30
Start time:09:00End time:17:30
- 1Start = 9 × 60 = 540 minutes
- 2End = 17 × 60 + 30 = 1050 minutes
- 3Duration = 1050 − 540 = 510 minutes
- 4= 8 hours 30 minutes
Result
8 hours 30 minutes
What changes the result
- Times are in 24-hour format.
- Crossing midnight adds 24 hours to the end time.
Edge cases to be aware of
Unusual situations handled correctly
- Same times result in 0 duration.
- End before start without midnight flag is treated as same-day.
Common mistakes
Avoid these errors
- Forgetting to check 'crosses midnight' for overnight shifts.
- Using 12-hour format without AM/PM.
Assumptions
- Times are in 24-hour format.
- The duration is always positive.
Limitations
- Does not account for time zones.
- Does not handle seconds.
Frequently asked questions
What does 'crosses midnight' mean?+
It means the end time is on the next day. For example, a shift from 22:00 to 06:00 crosses midnight. Check the box to add 24 hours to the end time.