Time Difference Calculator

Calculate the hours and minutes between two times — with breaks, overnight shifts and decimal hours for your timesheet.

min
—Duration
—Decimal hours
—Total minutes
—Total seconds

● Everything is calculated in your browser. Nothing is sent anywhere.

How to calculate the time between two times

  1. Enter the start time and the end time.
  2. Add the break to subtract (lunch, pauses), if any.
  3. 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 → endBreakDurationDecimal hours
09:00 → 17:3030 min8 h 00 min8.00
08:45 → 17:1545 min7 h 45 min7.75
22:00 → 06:00 (night shift)—8 h 00 min8.00
13:20 → 15:05—1 h 45 min1.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

  1. Convert both times to minutes since midnight: 09:00 = 540, 17:30 = 1050.
  2. Subtract: 1050 − 540 = 510 minutes. If the result is negative, add 1440 (24 hours).
  3. Subtract the break: 510 − 30 = 480 minutes.
  4. 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.