Time Difference Calculator
Calculate the hours and minutes between two times — with breaks, overnight shifts and decimal hours for your timesheet.
● Everything is calculated in your browser. Nothing is sent anywhere.
How to calculate the time between two times
- Enter the start time and the end time.
- Add the break to subtract (lunch, pauses), if any.
- Read the duration in hours and minutes, and in decimal hours — the format used for payroll and invoices.
If the end time is earlier than the start time (22:00 → 06:00), the calculator understands that the period crosses midnight: that's 8 hours, not −16.
Examples
| Start → end | Break | Duration | Decimal hours |
|---|---|---|---|
| 09:00 → 17:30 | 30 min | 8 h 00 min | 8.00 |
| 08:45 → 17:15 | 45 min | 7 h 45 min | 7.75 |
| 22:00 → 06:00 (night shift) | — | 8 h 00 min | 8.00 |
| 13:20 → 15:05 | — | 1 h 45 min | 1.75 |
Minutes to decimal hours
Divide the minutes by 60: 15 min = 0.25 h, 20 min = 0.33 h, 30 min = 0.5 h, 40 min = 0.67 h, 45 min = 0.75 h. So 7 h 30 min is 7.5 hours, not 7.30 — a frequent error on timesheets. At 20 per hour, 7.5 hours is worth 150.
How to calculate it by hand
- Convert both times to minutes since midnight: 09:00 = 540, 17:30 = 1050.
- Subtract: 1050 − 540 = 510 minutes. If the result is negative, add 1440 (24 hours).
- Subtract the break: 510 − 30 = 480 minutes.
- Divide by 60: 480 ÷ 60 = 8 hours.
Time difference in Excel or Google Sheets
With the start in A2 and the end in B2: =MOD(B2-A2,1) formatted as [h]:mm gives hours and minutes, even across midnight. For decimal hours, multiply by 24: =MOD(B2-A2,1)*24. To subtract a 30-minute break: =(MOD(B2-A2,1)-TIME(0,30,0))*24.
FAQ
How do I calculate the time difference between two dates?
For days, months and years between two dates, use the Date Difference Calculator; for working days only, the Business Days Calculator.
What about the time difference between two countries?
That's a time zone question: use the Time Zone Converter or the World Clock.
Does it work with the 24-hour clock and AM/PM?
Yes, the time fields follow your device's format — 24-hour or 12-hour with AM/PM.
How do I add up hours for a whole week?
Calculate each day in decimal hours and add them: 8 + 7.75 + 8 + 8.5 + 6 = 38.25 hours. Decimal hours are much easier to add than hours and minutes.