Hours Calculator

Updated July 2026

Enter a start time and an end time to see the duration in hours and minutes, as decimal hours, and as total minutes. It handles overnight shifts and can subtract an unpaid lunch break — perfect for work hours and timesheets. Everything runs privately in your browser.

To find the hours between two times, convert each to minutes since midnight, subtract the start from the end, then divide by 60. For decimal hours, divide leftover minutes by 60 — so 8 hours 30 minutes is 8.5 hours. If the end is earlier than the start, the span crosses midnight and 24 hours are added.
If the end is earlier than the start, an overnight shift is assumed.
Optional. Unpaid minutes subtracted from the total.
Total duration
Decimal hours
Total minutes
Hours & minutes
Gross (before break)
Break deducted

How this hours calculator works

The duration between two times is the gap from when you start to when you stop. The simplest reliable method is to convert each clock time into minutes since midnight, subtract the start from the end, and convert the result back into hours and minutes. Working in plain minutes avoids the awkward arithmetic of carrying and borrowing across the 60-minute boundary.

Once you have the total minutes, divide by 60 to get whole hours, and the remainder is the leftover minutes. For payroll you usually want decimal hours instead: divide the leftover minutes by 60, so 15 minutes is 0.25, 30 minutes is 0.5 and 45 minutes is 0.75. If the end time is earlier than the start time, the tool assumes the shift crosses midnight and adds 24 hours so the result is never negative. An optional unpaid break in minutes is subtracted at the end.

Worked example: a shift from 9:00 AM to 5:30 PM spans 8 hours and 30 minutes (510 minutes). Deduct a 30-minute lunch and you are left with 480 minutes — exactly 8 hours, or 8.0 decimal hours.

Reference note: calculations work to whole minutes and ignore seconds. Times use a 24-hour internal clock; your browser may display the picker in 12-hour or 24-hour format depending on its locale.

Frequently asked questions

How do I calculate hours between two times?
Convert both times to minutes since midnight, subtract the start from the end, then divide by 60 to get hours with a remainder of minutes. For example 9:00 to 17:30 is 1050 − 540 = 510 minutes, which is 8 hours and 30 minutes.
How do I convert minutes to decimal hours?
Divide the minutes by 60. So 30 minutes is 30 ÷ 60 = 0.5 hours and 45 minutes is 0.75 hours. A duration of 8 hours and 30 minutes equals 8.5 decimal hours, the format most payroll and timesheet systems expect.
How are overnight shifts handled?
If the end time is earlier than the start time, the calculator assumes the shift crosses midnight and adds 24 hours. For example 22:00 to 06:00 is treated as 8 hours rather than a negative result.
How do I subtract a lunch break?
Enter the unpaid break in minutes in the break field and it is subtracted from the gross duration. A 9:00 to 17:30 span is 8 hours 30 minutes; deducting a 30 minute lunch leaves 8 hours, or 8.0 decimal hours.
How many hours is 9 to 5?
From 9:00 AM to 5:00 PM is 8 hours, or 8.0 decimal hours and 480 minutes, before any break. Subtract a 30 or 60 minute lunch to get 7.5 or 7.0 paid hours.
Does it count seconds?
No. This calculator works to whole minutes, which is the standard granularity for work hours and timesheets. Times are entered as hours and minutes and the result is rounded to the nearest minute.
⚡ Hours Calculator — by larely ↗

Related tools

Week Number Calculator

Find the ISO week number for today or any date, plus the week's date range.

Leap Year Calculator

Check if any year is a leap year and find the next and previous ones.

Date Add / Subtract Calculator

Add or subtract years, months, weeks and days from any date.

Military Time Converter

Convert between 12-hour and 24-hour time, with a full chart.

Day of the Week Calculator

Find the day of the week for any date, plus week number and days from today.

Time Calculator (Add & Subtract)

Add and subtract time durations in days, hours, minutes and seconds.

Recurring Date Generator

List repeating dates — every N days, weekly, biweekly, monthly or yearly.

Schengen 90/180 Calculator

Track your Schengen days and see how long you can stay under the 90/180-day rule.

Business Days Calculator

Count business days between dates or add working days, excluding weekends and public ho…

Age Calculator

Your exact age in years, months and days, plus days until your next birthday.

Date Duration Calculator

Days, weeks, months and business days between any two dates.

Countdown Timer

Live countdown to any date and time, with a shareable link.

Browse all 251 free tools →