Skip to content
toolstome

How to calculate the hours between two times

Counting hours on a clock is harder than it looks, because time works in sixties and wraps around at midnight. Whether you are filling in a timesheet, checking a payslip or planning a shift, the method is the same: turn both times into minutes, subtract, deal with midnight, take off breaks and, if your payroll needs it, convert the result to decimal hours.

Open Time Calculator

Step by step

  1. 1

    Write both times in 24-hour format

    5:30 pm becomes 17:30 and 9:15 am stays 09:15. This avoids am/pm mistakes.

  2. 2

    Turn each time into minutes

    Multiply the hours by 60 and add the minutes: 09:15 is 555 minutes and 17:30 is 1,050 minutes.

  3. 3

    Subtract the start from the end

    1,050 minus 555 is 495 minutes. If the result is negative, the shift crossed midnight: add 1,440 minutes (24 hours).

  4. 4

    Take off unpaid breaks

    A 30-minute lunch leaves 465 minutes.

  5. 5

    Convert to hours and minutes

    465 divided by 60 is 7 with 45 left over: 7 hours 45 minutes.

  6. 6

    Convert to decimal hours if needed

    Divide the minutes by 60: 7 h 45 min is 7.75 hours. Multiply by the hourly rate for pay.

Worked examples

Day shift: 08:45 to 17:15 with a 30-minute break. 17:15 is 1,035 minutes and 08:45 is 525, so the difference is 510 minutes. Minus 30 gives 480 minutes: 8 hours, or 8.00 decimal hours.

Night shift: 22:00 to 06:30. 390 minus 1,320 is −930, so add 1,440 to get 510 minutes: 8 hours 30 minutes, or 8.5 decimal hours.

Decimal hours are not the same as hours:minutes

7.30 hours on a payroll system means seven and three tenths of an hour, which is 7 hours 18 minutes, not 7 hours 30 minutes. Mixing the two is one of the most common payslip errors. Common conversions: 15 minutes is 0.25, 30 minutes is 0.5, 45 minutes is 0.75 and 20 minutes is about 0.33.

Adding up a week

To total several shifts, add the minutes first and convert at the end, so rounding does not build up. The time calculator's list mode does this: enter each day's duration on its own line and it gives the total in hours:minutes and decimal hours.

Frequently asked questions

How do I calculate hours worked across midnight?

Subtract the start time from the end time in minutes, and if the result is negative add 24 hours (1,440 minutes).

How do I convert minutes to decimal hours?

Divide the minutes by 60. For example, 45 minutes is 0.75 hours, so 7 hours 45 minutes is 7.75 hours.

Does the calculator handle 12-hour times?

Yes. Enter 5:30 pm or 17:30; both work.

What about time zones and daylight saving?

The time calculator does not apply them. For a shift that crosses a clock change, add or subtract the hour yourself.

Tools used in this guide

Last updated November 30, 2026 · All guides

Categories

Recently used tools

Tools you open will appear here.

More