Time Duration Calculator

Find the exact duration between two times — perfect for shifts, timesheets, and schedules.

What is it?

This calculator finds the exact duration between a start time and an end time, including overnight spans that cross midnight — useful for work shifts, timesheets, and schedules.

Formula

Duration = End Time − Start Time (in minutes since midnight)

Formula Explanation

Both times are converted to total minutes since midnight (hours × 60 + minutes), then subtracted to get the duration in minutes. For overnight shifts, checking "ends next day" adds 24 hours (1440 minutes) to the end time before subtracting, correctly handling durations that cross midnight.

Example Calculation

From 9:00 AM to 5:30 PM: duration = 8 hours 30 minutes (8.5 decimal hours) — a typical full workday with a half-hour built in.

How to Use

  1. Enter the start time.
  2. Enter the end time.
  3. Check "ends next day" if the end time is on the following day (e.g. an overnight shift).
  4. Click Calculate Duration to see the total time elapsed.

Benefits

  • Correctly handles overnight durations that cross midnight.
  • Shows results in hours+minutes, decimal hours, and total minutes.
  • No manual clock arithmetic or unit conversion needed.

Use Cases

  • Calculating work shift lengths for timesheets or payroll.
  • Finding cooking, workout, or travel duration between two clock times.
  • Checking how long a meeting or event lasted.

What Your Result Means

The duration is the exact elapsed time between your two times. Decimal hours (e.g. 8.5 instead of 8h 30m) are especially useful for payroll systems that calculate wages based on fractional hours.

Tips

  • Use decimal hours when entering time into payroll or invoicing software.
  • Always check "ends next day" for shifts that start in the evening and end after midnight.
  • Double-check AM/PM if your browser's time picker displays a 12-hour clock.

Common Mistakes

  • Forgetting to check "ends next day" for overnight shifts, which produces a negative or incorrect duration.
  • Mixing up start and end times, reversing the calculation.
  • Assuming the result is in decimal format when it's shown as hours and minutes, or vice versa.

FAQs

How do I calculate an overnight shift, like 10 PM to 6 AM?

Enter 22:00 as the start time and 06:00 as the end time, then check "ends next day" — the calculator will correctly return 8 hours.

What are decimal hours used for?

Decimal hours (like 7.5 instead of 7h 30m) are commonly used in payroll and invoicing systems that calculate pay based on fractional hours worked.

Can I use this for cooking or workout durations?

Yes, enter any start and end time to find the duration — it works for any activity, not just work shifts.

Why did I get an error saying end time must be after start time?

This happens when the end time is earlier than the start time and "ends next day" isn't checked — enable that option for any duration that spans past midnight.

Times are based on your browser's local time input and do not account for timezone changes.

Last updated: July 26, 2026