Hours Calculator

Enter a start time and an end time to get the duration between them, in hours-and-minutes and as decimal hours. Subtract an unpaid break if you like. Overnight times are handled automatically.

min
Enter a start and end time, then press Calculate hours.

How the duration is calculated

Each time is converted to minutes since midnight, the start is subtracted from the end, and any unpaid break is removed:

minutes = ( end start ) break hours = minutes ÷ 60

If the end time is earlier than the start (an overnight span, like 22:00 to 06:00), 24 hours are added so the result is still positive.

Worked example

From 9:00 to 17:30 with a 30-minute break:

End − start: 17:30 − 9:00 = 8 hours 30 minutes (510 minutes).
Minus break: 510 − 30 = 480 minutes.
Duration: 480 ÷ 60 = 8 hours 0 minutes = 8.00 decimal hours.

Hours-and-minutes vs decimal hours

People read time as hours and minutes, but payroll and spreadsheets use decimal hours, where the minutes are expressed as a fraction of 60. So 8 hours 30 minutes is 8.5, and 7 hours 15 minutes is 7.25. This calculator shows both formats so you can use whichever you need.

Tip: for a full weekly timesheet with overtime over 40 hours and gross pay, use the Time Card Calculator instead.

Frequently asked questions

How do I calculate the hours between two times?

Convert both times to minutes since midnight, subtract the start from the end, remove any break, then divide by 60. If the end is before the start, add 24 hours for an overnight span.

How does it handle overnight shifts?

When the end time is earlier than the start, the calculator adds 24 hours, so a 22:00 to 06:00 span correctly returns 8 hours rather than a negative number.

What are decimal hours?

Decimal hours express minutes as a fraction of 60: 30 minutes is 0.5, 15 minutes is 0.25. Payroll and spreadsheets use this format, so 8 hours 30 minutes becomes 8.5.

How do I subtract a lunch break?

Enter the unpaid break in minutes and it is removed from the total. A 30-minute lunch on an 8.5-hour span leaves 8.0 paid hours.

MB
Mustafa Bilgic · Editor, Calcool
This is a straightforward time-arithmetic tool. For weekly totals, overtime rules and gross pay, see the Time Card Calculator; overtime over 40 hours/week follows the U.S. Department of Labor FLSA. Math runs in your browser.

Related calculators