Time Between Times Calculator
Find the time difference between two clock times, with optional overnight handling.
Enter your values and click Calculate
This calculator finds the duration between two clock times — for example, from 9:15 AM to 4:45 PM. It returns the difference expressed as hours and minutes (H:MM), decimal hours for billing purposes, and total minutes. If your end time is on the following day — such as a night shift that crosses midnight — simply enable the overnight toggle and the calculator handles the rollover automatically. Useful for timesheets, freelance billing, shift scheduling, meeting duration tracking, and any situation where you need to know exactly how long elapsed between two times. The decimal hours output is particularly convenient for payroll and invoice calculations, since multiplying decimal hours directly by an hourly rate gives the correct payment amount without needing to convert minutes separately. For example, a shift from 9:00 AM to 4:45 PM is 7 hours 45 minutes, or 7.75 decimal hours — at $30/hr that works out to $232.50. The H:MM format suits timesheets while decimal hours suit billing software, so having both outputs together saves an extra conversion step.
How It Works
Each time is first converted to minutes since midnight: hours are converted using the AM/PM value (adding 12 for PM hours, and handling the edge cases of 12 AM as 0 and 12 PM as 12 correctly), then the minute component is added. The difference is end minutes minus start minutes. If the result is negative and overnight mode is off, an error is shown because the end is before the start. If the overnight toggle is enabled and the result is zero or negative, 1,440 minutes (24 hours) is added to wrap correctly across the midnight boundary — for example, a shift from 10:00 PM to 6:00 AM correctly computes 8 hours. Total minutes are divided by 60 to produce decimal hours (useful for billing), and the same total is also formatted as hours and minutes (H:MM) for readability on timesheets.