How this calculation works
Find the elapsed clock duration between a start and end time. When the end is earlier, the next-day option treats it as the following day rather than a negative duration. This is suitable for a single overnight interval; it does not subtract breaks or infer dates and time zones.
Worked example
This example uses illustrative inputs. Your current result is shown above.
From 09:00 to 17:30 on the same day, duration = 8 hours 30 minutes. In minutes, (17 × 60 + 30) − 9 × 60 = 510.
Assumptions and limits
- Start and end are 24-hour clock times without dates or time zones.
- The next-day option adds a day only when the end is earlier; equal times produce zero, not 24 hours.
- Breaks, payroll rounding and daylight-saving changes are not included.
Questions people ask
How do I measure a shift that ends after midnight?
Select the option that treats an earlier end time as next day. Without it, an earlier end is rejected because the duration would be negative.
Can I use equal start and end times for a full day?
No. Equal times return zero here. Use explicit date/time arithmetic for a full day or a multi-day interval.