Time Difference Calculator
Enter a start clock time and an end clock time to get the gap between them as hours and minutes, plus the total in minutes for timesheets. Everything uses the 24-hour clock, so 5pm is 17. Flip on the cross midnight toggle and an end time earlier than the start becomes an overnight shift.
How to calculate the time difference
- Type the start hour (0 to 23) and start minute (0 to 59) in the Start time boxes.
- Type the end hour and end minute in the End time boxes.
- If the end time falls on the following day, tick 'End time is on the next day (cross midnight)'.
- Read the big duration figure, such as 8h 30m, and the total minutes below it.
- Press Copy to grab the summary line for a timesheet or invoice.
Examples
A standard workday
09:15 to 17:45
8h 30m (510 minutes)
An overnight shift with cross midnight on
22:00 to 06:00, next day
8h 0m (480 minutes)
A short morning block
08:00 to 12:30
4h 30m (270 minutes)
Frequently asked questions
How do I calculate hours between two times?
Put both times into the 24-hour boxes. The tool converts each to minutes past midnight, subtracts the start from the end, and shows the gap as hours and minutes plus a running minute total.
What does the cross midnight toggle do?
It rescues overnight spans. With it ticked, an end time earlier than the start, such as 22:00 to 06:00, is read as the next day by adding 24 hours, which returns 8h 0m instead of an error.
What happens if the end time is before the start and the toggle is off?
That span is genuinely ambiguous, so rather than guess, the tool shows a message asking you to enable cross midnight for an overnight span. Nothing is silently assumed.
Why 24-hour time instead of AM and PM?
The 24-hour clock removes any AM or PM confusion around noon and midnight. Hours run 0 to 23 and minutes 0 to 59, so 1pm is 13 and midnight is 0. Values outside those ranges are rejected.
Can it give me the total in minutes?
Yes. Under the hours-and-minutes headline the tool prints the whole span in minutes, for example 510 minutes, which drops straight into payroll or billing math.
Does it account for seconds?
No. This calculator works to whole-minute precision only. If you need second-level timing, use a stopwatch or a tool that accepts seconds as a separate field.
Does it handle a span longer than 24 hours or across dates?
No. It compares two clock times within a single 24-hour window, so the maximum result is just under 24 hours. For multi-day gaps between calendar dates, use a date duration calculator instead.
Does daylight saving time change the result?
No. The tool subtracts pure clock values and knows nothing about time zones or DST transitions. On a night the clocks shift, the real elapsed time can differ by an hour from what the clock faces suggest.
Is my input sent anywhere?
No. The whole calculation runs in your browser with no network request, so the times you enter never leave your device.
Learn more
- How to calculate overnight shift hours correctly
Why a shift that crosses midnight breaks naive subtraction, how the 24-hour clock fixes it, and how to total overnight hours for payroll.
Related tools
Time Duration Calculator
Find the duration between two times of day. Enter a start and end time to get hours and minutes, total minutes and decimal hours, including overnight shifts.
Add Time Calculator
Add or subtract hours and minutes from a time of day. See the new clock time and whether it crosses into another day. Free and private.
Time Zone Converter
Convert a date and time from one time zone to another. Pick any two IANA zones and see the converted time with UTC offsets. Handles DST automatically.
Add Business Days Calculator
Add or subtract working days from a date, skipping weekends and any holidays you list. See the result date and its day of the week instantly.
Add Days Calculator
Add or subtract calendar days from any date and see the result with its day of the week. Free, instant and works for past or future dates.
Add to Date
Add or subtract days, weeks, months and years from any date and get the new date. Handles month-end and leap days correctly. Free and instant.