Time Duration Calculator
Time Duration Calculator
How many hours are there between two times? Enter a start and end time (overnight shifts work too) or two full dates and times, subtract any unpaid break, and get the hours between the two times in hours and minutes, in decimal hours for timesheets and payroll, and in total minutes and seconds. It works for shifts, meetings, journeys and anything else you time.
How to use Time Duration Calculator
- Choose between two times of day or two dates and times.
- Enter the start and the end.
- Enter any unpaid break in minutes.
- Read the duration, including decimal hours (7 h 30 min = 7.5 h).
Worked examples
- A day shift: 09:00 to 17:30 is 8 hours, 30 minutes, or 8.5 decimal hours (510 minutes). With a 45-minute unpaid lunch it is 7 hours, 45 minutes, or 7.75 hours.
- A night shift: 22:00 to 06:30 crosses midnight, so the end is counted as the next day: 8 hours, 30 minutes. Take off a 30-minute break and it is exactly 8 hours.
- Across several days: in the dates mode, 1 March 08:00 to 3 March 14:15 is 2 days, 6 hours, 15 minutes, or 54.25 decimal hours.
How to calculate the hours between two times by hand
- Write both times in 24-hour format: 5:30 pm is 17:30.
- Subtract the start from the end: 17:30 − 09:00 = 8:30. If the minutes come out negative, borrow 60 minutes from the hours.
- If the end is earlier than the start, the period crosses midnight: add 24 hours to the end first (06:30 becomes 30:30, and 30:30 − 22:00 = 8:30).
- Subtract any break, then divide the minutes by 60 for decimal hours: 8 h 30 min = 8.5 h.
In a spreadsheet, with the start time in A1 and the end time in B1, =(B1-A1)*24 gives decimal hours, and =MOD(B1-A1,1)*24 also handles shifts that pass midnight.
Common mistakes
- Writing 8.30 for 8 hours 30 minutes. In decimal hours half an hour is 0.5, so 8 h 30 min is 8.5, not 8.30. Payroll systems usually want the decimal figure.
- Mixing up am and pm. 12:00 am is midnight and 12:00 pm is noon.
- Forgetting the clock change. On the night daylight saving time starts or ends, a shift really is an hour shorter or longer. The times-of-day mode ignores the change; the dates mode uses your device's time zone, so it includes it.
To turn the answer into seconds, minutes or days, use the Time Converter. To count days rather than hours, use the Days Between Dates Calculator.
When it comes in handy
- Filling in timesheets and working out pay.
- Measuring how long a task, trip or event took.
- Counting hours across midnight.
Frequently asked questions
What if the end time is earlier than the start?
How do I turn minutes into decimal hours?
How many hours are there between 9 am and 5 pm?
Can it add up a whole week of shifts?
Related guides
-
How to Compress Images for the Web Without Making Them Look Worse
Why images slow pages down, how to pick the right size, format and quality, and a quick workflow that keeps photos sharp and pages fast.
-
PNG vs JPG vs WebP: Which Image Format Should You Actually Use?
A plain-language comparison of PNG, JPG and WebP, with rules of thumb for choosing the right one and tools to convert between them.