About this tool
This calculator finds the elapsed time between two clock times, including overnight intervals, and adds or subtracts durations given in hours and minutes. It helps with work shifts, timesheets, travel times, sleep tracking and billing. Elapsed time is the length of the interval between a start and an end, as opposed to a clock time, which marks a point in the day.
How it works
Choose start and end clock times for elapsed time. Earlier end times automatically cross midnight; mark next day explicitly for equal or later end times.
In the second panel, enter two durations to add them or subtract the second from the first. Durations use whole hours and 0–59 minutes and are not capped at 24 hours, so you can total a week of shifts by adding them one at a time. Results include hours:minutes, total minutes, and decimal hours, the format many timesheet and invoicing systems ask for.
Example
22:30 to 06:15 is 7 hours 45 minutes overnight. Adding 2:30 and 1:45 gives 4:15. Subtracting 2:30 from 1:45 gives −0:45, or −0.75 decimal hours.
The overnight case splits at midnight: 22:30 to 00:00 is 1 hour 30 minutes, and 00:00 to 06:15 is 6 hours 15 minutes, for 7:45 in total. That equals 465 minutes or 7.75 decimal hours. With a 30-minute unpaid break, subtracting 0:30 from 7:45 in the second panel leaves 7:15, or 7.25 hours.
Assumptions and limits
Times are entered to the minute without seconds, and durations accept whole hours and 0–59 minutes. The tool uses clock times without calendar dates, so it ignores time zones and daylight saving changes and spans at most one extra day. It does not subtract breaks or apply payroll rounding rules.
Frequently asked questions
How do I calculate a full 24 hours?
Use the same start and end time and enable next day. Without the switch, equal clock times mean zero elapsed time. An explicit next-day end can also produce an interval longer than 24 hours.
Does 1:30 mean 1.30 decimal hours?
No. 1:30 means 1 hour and 30 minutes, which is 1.5 decimal hours. This calculator shows both formats.
How do I convert minutes to decimal hours?
Divide the minutes by 60 and add the result to the whole hours. For example, 7 hours 45 minutes is hours. The calculator shows this decimal value with every result.
How do I calculate hours worked on an overnight shift?
Enter the shift's start and end times; an end time earlier than the start is treated as the next day. A shift from 22:00 to 06:00 is 8 hours. Subtract any unpaid break using the duration panel.
Do daylight saving time changes affect the result?
This calculator does not apply them, because it works with clock times rather than dated, time-zone-aware timestamps. On the night clocks change, the actual elapsed time can be one hour more or less than shown.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
start_timeStart time | time: HH:MM, 24-hour | required |
end_timeEnd time | time: HH:MM, 24-hour | required |
next_dayEnd time is on the next day | true or false | default false |
operationOperation | one of: add, subtract | default add |
first_hoursFirst duration | whole number; allowed 0–1000000 | required |
first_minutesFirst duration | whole number; allowed 0–59 | counted as 0 |
second_hoursSecond duration | whole number; allowed 0–1000000 | required |
second_minutesSecond duration | whole number; allowed 0–59 | counted as 0 |
Examples
?start_time=22:30&end_time=06:15?start_time=09:00&end_time=09:00&next_day=true?start_time=08:00&end_time=12:30&operation=subtract&first_hours=7&first_minutes=45&second_hours=0&second_minutes=30
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="time-elapsed"][data-result-block="time-arithmetic"]