Time & dates
Time Duration Calculator
Find how long a shift, flight, or sleep lasted — including periods that run past midnight.
- Enter a start and end time (24-hour clock).
- Leave “crosses midnight” on if the end can be the next day.
- Read hours, minutes, and decimal hours.
How it works
Enter a start and end time on the 24-hour clock. The calculator converts both to minutes after midnight and subtracts. If the end time is earlier than the start and “crosses midnight” is on, it adds 24 hours, because the end falls on the next day.
The result is shown in hours and minutes and as decimal hours. Decimal hours are what most timesheets and payroll systems use: 30 minutes is 0.5 hours and 15 minutes is 0.25 hours.
If you need to add up several shifts, work out each one separately and add the decimal hours together; this avoids errors from mixing hours and minutes. For example, shifts of 7.5, 8.25 and 6.75 hours add up to 22.5 hours for the week. Multiply decimal hours by your hourly rate to estimate pay. Remember to subtract unpaid breaks first, because the calculator measures the full time between the start and the end.
Formula
Duration = End − Start
If End < Start and crossing midnight: Duration = End − Start + 24 h
Worked examples
22:30 to 06:15 the next day: 06:15 − 22:30 + 24:00 = 7 h 45 min (7.75 h).
Day shift
09:00 to 17:30: 8 h 30 min, or 8.5 hours.
Night shift
21:00 to 05:30 the next day: 8 h 30 min, or 8.5 hours.
Sleep
23:15 to 07:00: 7 h 45 min, or 7.75 hours.
Understanding the result
Both times are assumed to be within 24 hours of each other. Decimal hours are handy for timesheets: 45 minutes = 0.75 hours.
Common mistakes
- Writing 8 h 30 min as 8.3 hours on a timesheet. The correct decimal is 8.5.
- Turning off “crosses midnight” for an overnight period, which gives an error.
- Forgetting to subtract unpaid breaks from the shift length.
- Using it for periods longer than 24 hours — use the Date Duration calculator instead.
When to use it
- Filling in timesheets and checking pay.
- Tracking sleep or study sessions.
- Working out flight or journey times in the same time zone.
- Planning cooking or event schedules.
FAQs
- What if the same start and end time are entered?
- The duration is 0. For a full 24-hour period, use the Date Duration calculator.
- Does it handle daylight-saving changes?
- No — it counts clock time, so a night with a clock change may be one hour off.
- How do I convert minutes to decimal hours?
- Divide the minutes by 60. For example, 45 ÷ 60 = 0.75 hours.
- Can I use a 12-hour clock?
- Your browser's time input may show AM/PM, but the result is the same.
- Does it work across time zones?
- No. Both times are treated as being in the same time zone.
- How do I subtract a lunch break?
- Work out the full shift first, then subtract the break. A 09:00 to 17:30 shift is 8.5 hours; with a 30-minute unpaid lunch, the paid time is 8 hours. Enter break times as decimal hours, so 45 minutes is 0.75.
- Can I add several durations together?
- Yes. Add the decimal hours from each result. Decimal hours are easier to total than hours and minutes, and most payroll systems use them.
Related calculators
- Date Duration CalculatorDays between two dates, elapsed or inclusive.
- Age CalculatorExact age in years, months, and days.
- Split Bill CalculatorShare a bill, tip, and extra charges fairly.