Time Duration Calculator

Find the time between a start and end time, for a work shift, a trip or a study session. Overnight times and unpaid breaks are handled for you.

Start and end

minutes
If the end time is earlier than the start, it's counted as the next day (an overnight shift).
Duration—
Decimal hours—
Total minutes—

How to calculate the time between two times

Convert both times to minutes after midnight, subtract, then convert back to hours and minutes.

minutes = (end hours × 60 + end minutes) − (start hours × 60 + start minutes)
hours = minutes ÷ 60 (whole number), with the remainder as minutes

Example: a shift from 9:00 to 17:30 (5:30 pm) with a 30-minute lunch break.

Start = 9 × 60 = 540 minutes. End = 17 × 60 + 30 = 1,050 minutes.

1,050 − 540 = 510 minutes. Minus the break: 510 − 30 = 480 minutes = 8 hours.

Overnight shifts

When a shift crosses midnight, the end time looks smaller than the start. Add 24 hours (1,440 minutes) to the end time before subtracting.

Example: a night shift from 22:00 to 06:00.

End = 6 × 60 + 1,440 = 1,800. Start = 22 × 60 = 1,320. 1,800 − 1,320 = 480 minutes = 8 hours.

Converting minutes to decimal hours

Timesheets and payroll systems often want hours as a decimal, such as 7.75 instead of 7 h 45 min. Divide the minutes by 60:

MinutesDecimal hours
150.25
200.33
300.50
400.67
450.75

A common mistake is writing 7 h 45 min as 7.45. That's actually 7 h 27 min, and on a timesheet it would underpay you by 18 minutes.

To work out pay, multiply decimal hours by your hourly rate: 7.75 hours × 20 = 155. See the salary to hourly calculator to turn hourly pay into weekly or yearly pay.

Frequently asked questions

Does it work with 12-hour (am/pm) times?

Yes. The time boxes follow your device's settings, so you may see am/pm or a 24-hour clock. Either way the result is the same.

What if a shift is longer than 24 hours?

This calculator handles spans up to 24 hours. For longer periods, use the date difference calculator and add the hours separately.

Should breaks be subtracted?

Unpaid breaks, such as a lunch break, are usually subtracted from paid hours. Short paid rest breaks usually aren't. Check your employer's rules or your local labor laws.

Does it account for daylight saving time?

No. On the night the clocks change, an overnight shift is really one hour longer or shorter than shown. Adjust by an hour for that one shift.

Last reviewed November 2026.