Find Time Difference
Calculate the exact difference between two times in hours, minutes, and seconds
Drop in two times — start and end — and get the exact gap in hours, minutes, and seconds. Decimal hours, total minutes, and milliseconds are included so you can paste the number straight into a timesheet or invoice. Overnight shifts that cross midnight are handled automatically. And everything runs in your browser. Nothing gets uploaded.
How It Works
Both times get converted to total seconds from midnight. The tool subtracts the start from the end. If the result is negative (meaning the end time is earlier), it adds 86,400 seconds — one full day — to handle the midnight crossover. Then it breaks the total back into hours, minutes, and seconds.
Examples
Morning Commute Timing
You left home at 7:15 AM and arrived at 8:42 AM. How long was the drive?
Start: 07:15:00
End: 08:42:00
1 hour, 27 minutes, 0 seconds
Total: 1.45 hours / 87 min
Overnight Hospital Shift
A nurse’s shift starts at 10:30 PM and ends at 6:45 AM the next morning. The clock crosses midnight, so manual math is a headache.
Start: 22:30:00
End: 06:45:00
8 hours, 15 minutes, 0 seconds
Crosses Midnight: Yes
Total: 8.25 hours / 495 min
Tracking a Cooking Timer Down to Seconds
You put bread in the oven at 3:08:20 PM and pulled it out at 3:52:45 PM.
Start: 15:08:20
End: 15:52:45
0 hours, 44 minutes, 25 seconds
Total: 2,665 seconds
Who Uses This
Calculating exact shift durations to convert into billable or payable hours.
Logging overnight shift lengths for scheduling rotations and overtime tracking.
Figuring out how much study time fits between classes or before a deadline.
Measuring transit times between pickup and delivery to stay within SLA windows.
Common Mistakes
Typing 2:00 when you mean 2 PM gives you 02:00 (2 AM). For afternoon and evening, add 12 — so 2 PM is 14:00, 9 PM is 21:00.
If you leave seconds blank on one time but enter them on the other, the difference can be off by up to 59 seconds. Fill in both or leave both at 00.
This calculates a single time-to-time difference within a 24-hour window. If your start and end are more than 24 hours apart, you will need a full date difference calculator instead.
Technical Details
- Processing: 100% client-side JavaScript — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Time Range: 00:00:00 to 23:59:59 (24-hour window)
- Precision: Down to the second; milliseconds shown as total only
- Midnight Crossover: Automatically handled when end time is earlier than start
Frequently Asked Questions
How do you calculate the difference between two times?
Convert both times to seconds from midnight, then subtract the start from the end. If the result is negative, add 86,400 (the number of seconds in a day) to account for the midnight crossover. The final number of seconds is split back into hours, minutes, and seconds.
What if the end time is earlier than the start time?
The calculator assumes you crossed midnight. So 11:00 PM to 2:00 AM gives you 3 hours, not negative 21. It adds a full day’s worth of seconds and works from there. You’ll see a “Crosses Midnight: Yes” label in the results.
Can I calculate time difference in decimal hours?
Yes. The results include a “Total Hours” figure as a decimal. For example, 1 hour and 30 minutes shows as 1.50 hours. That’s the number most payroll and billing systems want.
Does this time calculator account for time zones?
No — it calculates a raw time-to-time difference. Both times are treated as being in the same time zone. If you need to compare times across zones, convert them to the same zone first, then plug them in.
Is this tool free and private?
Completely free, no signup required. All math runs in your browser with JavaScript — your times are never sent to a server. Works offline too, once the page has loaded.