Skip to main content

Hours Calculator

Calculate hours and minutes between two times, with breaks and overnight shifts.

Written by Golam Rabbani, Founder & Lead Engineer

Optional. Defaults to 0.

How to use this hours calculator

  1. Enter your start time in HH:MM (24-hour) format.
  2. Enter your end time.
  3. Optionally add unpaid break minutes and tick "end time is on the next day" for overnight shifts.
  4. Press Calculate to see the total in hours-and-minutes, decimal hours, and total minutes.
  5. Use Copy to grab the result, or Reset to start over.

About this hours calculator

The hours calculator works out the duration between two clock times — exactly what you need for a timesheet, a freelance invoice, or a payroll line item. It handles overnight shifts, unpaid breaks, and the conversion between hours-and-minutes and decimal hours that most payroll systems insist on.

Internally each time is parsed into minutes-since-midnight. The end time is subtracted from the start time; if the result is negative or you tick the overnight checkbox, 24 hours are added so a 22:00 → 06:00 shift correctly returns 8 hours. The break minutes are subtracted last. We assume both times are in the same time zone and that the shift is shorter than 24 hours; if you cross multiple days, run the calculator once per day.

For example, a shift from 09:15 to 17:45 with a 30-minute unpaid break returns 8 hours, 0 minutes — which is 8.00 decimal hours or 480 minutes. An overnight shift from 22:30 to 06:30 with no break returns 8 hours, 0 minutes — 8.00 decimal — using the "next day" toggle. The decimal-hours value is what you paste into a spreadsheet column; the H:M value is what you put on a paper timesheet.

FAQ

How do I handle an overnight shift?
Tick the "end time is on the next day" checkbox. The tool will add 24 hours to the end time before subtracting, so a 22:00 → 06:00 shift correctly returns 8 hours rather than -16.
What are decimal hours?
Decimal hours express minutes as a fraction of an hour. 30 minutes is 0.5 hours; 45 minutes is 0.75. Most payroll software prefers decimal hours because they multiply cleanly with hourly rates.
How do unpaid breaks affect the total?
Unpaid break minutes are subtracted from the gross duration. If your break is longer than the worked time, the calculator returns an error rather than a negative total.
Can I enter seconds?
No. The tool works in whole-minute precision, which matches every timesheet system we have seen. For sub-minute work, use the seconds-to-time converter.
Does the tool store my hours?
No. Everything runs in your browser. Nothing is sent to a server or saved between sessions.