Hours Between Two Times Calculator

Calculate the hours and minutes between a start and end time, including spans that cross midnight, with a break deduction and decimal-hours output. Runs in your browser.

Duration
8h 30m
Decimal hours
8.50 hrs
Total minutes
510 min

The duration is the end time minus the start time. If the end is earlier than the start, the span is assumed to cross midnight into the next day (24 hours are added). Any break minutes are subtracted — handy for timesheets. Decimal hours (e.g. 8.5) are what payroll usually expects. These are clock times on a 24-hour day; daylight-saving transitions are not modeled. Everything runs in your browser.

About this tool

Working out how much time elapsed between two clock times sounds trivial until the end time is earlier than the start — an overnight shift that begins at 10 PM and ends at 6 AM, for instance — and a naive subtraction gives a negative or wrong answer. This calculator handles that correctly. It converts both times to minutes past midnight, subtracts, and when the end is earlier than the start it assumes the span runs into the next day and adds 24 hours, so a 22:00-to-06:00 shift correctly reads 8 hours. It then presents the result three ways: as hours and minutes (8h 00m), as decimal hours (8.00), and as total minutes — because different uses want different formats. The decimal-hours figure in particular is what payroll and timesheet systems almost always expect, since 8 hours 30 minutes is 8.5 hours, not 8.30. A break-deduction field lets you subtract unpaid break time (a 30-minute lunch, say) directly, which is the common need when totaling a workday. Typical uses include calculating shift length and pay, timing how long a task or process took, working out billable hours, and figuring sleep duration across midnight. A scope note: this works with times of day on a standard 24-hour clock and assumes at most a single day's crossing — it is not a full date-time calculator, so it does not account for daylight-saving-time transitions (when a day can be 23 or 25 hours long) or spans longer than 24 hours. For multi-day durations or DST-sensitive math, use a full date calculator. For the everyday question of 'how many hours is that shift,' it gives the answer instantly. Everything runs in your browser; nothing is uploaded.

How to use it

  • Enter the start time (24-hour or your browser's time picker).
  • Enter the end time — if it's earlier than the start, an overnight span is assumed.
  • Optionally enter unpaid break minutes to subtract.
  • Read the duration as hours-and-minutes, decimal hours, and total minutes.

Frequently asked questions

How do I calculate hours between two times?
Subtract the start time from the end time. If the end is earlier (an overnight shift), add 24 hours. This tool does that automatically, so 10 PM to 6 AM correctly returns 8 hours.
How does it handle times that cross midnight?
When the end time is earlier than the start time, it assumes the end is on the next day and adds 24 hours to the difference. It flags this so you know an overnight span was assumed.
What are decimal hours?
Hours expressed as a decimal rather than hours and minutes: 8 hours 30 minutes is 8.5 decimal hours. Payroll and timesheet systems usually want this form, since 8.30 would be misread.
Can I subtract a lunch break?
Yes. Enter the unpaid break in minutes and it is deducted from the total — useful for calculating paid working hours on a timesheet.
Does it account for daylight saving time?
No. It treats the times as clock times on a normal 24-hour day. On DST-transition days a real day is 23 or 25 hours; for that, use a full date-time calculator. It also assumes a span of 24 hours or less.
Is anything uploaded?
No. All calculations run entirely in your browser.

Related tools