How Time Duration Calculator Works
Both times are converted to minutes since midnight, and the start is subtracted from the end. If that comes out negative — meaning the end time is earlier in the clock than the start time — the tool assumes the shift crossed midnight and adds a full 24 hours (1,440 minutes) before showing the result, rather than reporting a negative duration.
How to Use This Tool
- Enter the time the shift, task or event started.
- Enter the time it ended.
- Select Calculate Duration to see the total length in hours and minutes, plus the total in minutes.
Example
A shift starting at 10:00 PM and ending at 6:00 AM the next day lasts 8h 0m — the tool detects the end time is earlier than the start and automatically counts it as crossing midnight, for a total of 480 minutes.
Helpful Tips
- For a same-day span, just enter both times normally — no extra steps needed.
- For an overnight shift, enter the end time as it appears the next morning; the tool will handle the day rollover for you.
- If a duration doesn't look right, double check whether you meant AM or PM — the time input uses your browser's local time format.
Frequently Asked Questions
How does the tool know a shift crossed midnight?
Can I calculate a shift longer than 24 hours?
Does the result account for breaks?
What if I enter the same time for start and end?
This tool runs entirely in your browser. Your input is not uploaded to any server.