Time Difference

Calculate the difference between two times or datetimes

100% free. Runs entirely in your browser - your files and data never leave your device and nothing is uploaded to any server.

All dates and times follow your device's time zone

Quick Presets

Duration

8h 00m

8.00Decimal hours
8:00HH:MM
480Total Minutes
28,800Total Seconds

Timesheet

Add each shift or task to total your hours. Saved in this browser only.

No entries yet - press Add to timesheet after a calculation.

About this tool

Find the hours and minutes between two times - 9:00 to 17:30, or a night shift from 22:00 to 06:00 - or between two full dates and times days apart. Take off an unpaid break and the calculator shows the net time in hours and minutes, decimal hours, total minutes and total seconds, and what it is worth at your hourly rate. Add each shift to the built-in timesheet to total a week, or switch to Add / subtract to find the clock time a number of hours and minutes after or before a start time.

How to use this tool

  1. Choose a modeTime Only for two clock times on the same day or overnight, Date + Time for spans across several days, or Add / subtract to move a time forward or back.
  2. Enter the start and endType the times, press Now to fill in the current time, or tap a preset such as 9:00 → 17:00 or 22:00 → 06:00.
  3. Take off breaks and add a rateEnter unpaid break minutes to get net hours, and an optional hourly rate to see the earnings for that time.
  4. Copy it or log itCopy the result, or add it to the timesheet to total several shifts and copy the list as text or CSV.

Calculate the time difference between two times

Enter a start and an end time and the calculator returns the difference in hours, minutes and seconds. In Time Only mode, an end time earlier than the start is treated as the next day, so a 22:00 to 06:00 night shift is 8 hours. Switch to Date + Time when the gap spans several days.

A worked example: a team starts warming up at 8:20 a.m. and the game ends at 11:15 a.m. From 8:20 to 11:20 would be exactly 3 hours; the end is 5 minutes earlier, so the total is 2 hours 55 minutes.

How to calculate hours between two times by hand

Write both times in 24-hour format, then subtract the start from the end, hours first and then minutes. If the end minutes are smaller than the start minutes, borrow an hour: 17:10 minus 08:45 becomes 16:70 minus 08:45, which is 8 hours 25 minutes. For an overnight span, add 24 hours to the end time first: 06:00 becomes 30:00, and 30:00 minus 22:00 is 8 hours.

To turn the result into decimal hours, divide the minutes by 60 and add them to the hours: 8 hours 25 minutes is 8 + 25/60 = 8.42 hours. In Excel or Google Sheets, put the times in two cells and use =(B1-A1)*24 for decimal hours, or =MOD(B1-A1,1)*24 when the shift can cross midnight.

Key features

  • Handles overnight shifts automatically - an end time earlier than the start counts as the next day.
  • Shows the result four ways: hours and minutes, decimal hours, total minutes and total seconds.
  • Break deduction and hourly-rate earnings turn a shift time into payable hours in one step.
  • A timesheet that totals several shifts and exports as CSV, saved in your browser only.

Common uses

  • Working out hours on a timesheet, including night shifts that cross midnight.
  • Converting a shift to decimal hours for payroll or a freelance invoice.
  • Checking the layover between two flights or the gap between appointments.
  • Finding what time a task will finish when it takes 3 hours 45 minutes from now.

Tips for better results

  • Use Date + Time whenever the span is longer than 24 hours - Time Only always assumes the end is within a day of the start.
  • Enter the break before reading decimal hours, so payroll gets net time rather than time on site.
  • Decimal hours are minutes divided by 60: 15 minutes is 0.25, 30 is 0.5, 45 is 0.75.
  • Rename each timesheet row (Monday, Client A...) before copying the CSV so the export is easy to read later.

Mistakes to avoid

  • Writing 7 hours 30 minutes as 7.30 on a timesheet - in decimal hours it is 7.5.
  • Comparing a time in one time zone with a time in another without converting first.
  • Reading a 12-hour time as 24-hour, turning 1:00 p.m. into 01:00.
  • Forgetting to subtract unpaid breaks before billing hours.

Frequently asked questions

Yes. In Time Only mode an end time earlier than the start is counted as the next day, so 22:00 to 06:00 is an 8-hour overnight shift. If the two points are more than a day apart, switch to Date + Time and enter full dates, and the full elapsed duration is calculated.

Four at once: hours and minutes (for example 8h 25m, with seconds when there are any), decimal hours (8.42), total minutes (505) and total seconds (30,300). In Date + Time mode, a span of a day or more also shows the number of days. If you enter a break, all of them show the net time after the break.

No - both times are treated as being in the same time zone, so the result is the plain gap between them. If the two times are in different places, convert one of them first with the Timezone Difference tool, then enter both here.

Enter the start and end time; if the shift crosses midnight, include the dates. Subtract unpaid breaks from the result to get the hours to bill or record on a timesheet.

Divide the minutes by 60: 7 hours 45 minutes is 7.75 hours, 20 minutes is 0.33 hours. Payroll and invoicing systems usually expect decimal hours.

On the night daylight saving starts or ends, a day is 23 or 25 hours long. A difference that spans that night includes the missing or extra hour, which is correct but easy to forget.

8 hours 30 minutes, or 8.5 hours. Take off a 30-minute unpaid lunch and it is 8 hours. Enter the times above - with the break - and the calculator shows both the clock time and the decimal hours for your timesheet.

Work out each shift, press Add to timesheet, and repeat for the other days. The timesheet keeps a running total in hours and decimal hours, and you can rename each row and copy the list as CSV for payroll.