Hours Calculator

Calculate the hours between two times: enter a start and an end time and get the hours and minutes between them, plus the same span in decimal hours. An end time earlier than the start counts as the next day, so night shifts work, and an unpaid break can be taken off.

8 hours

Decimal hours:
8.00
Hours:minutes:
8:00
Total minutes:
480
From and to:
9:00 AM to 5:30 PM
Total time, start to end:
8 hours, 30 minutes

Several days to add up? Use the time card calculator.

How to use the hours calculator

  1. 1

    Enter the start time

    Type or pick the time the span begins, for example when you clock in.

  2. 2

    Enter the end time

    Type the time it ends. If it is past midnight, enter it as it is; it counts as the next day.

  3. 3

    Take off a break

    Enter an unpaid break in minutes, or leave 0. The hours update as you type.

How DateMath calculates hours between two times

DateMath subtracts the start time from the end time on a 24-hour clock. When the end is earlier than the start, DateMath counts it on the next day, so a night shift needs no date, and the same time twice is 0 hours. The unpaid break is then taken off, and decimal hours are the minutes divided by 60, rounded to two places.

  • US hours-worked rules. DateMath counts exact minutes and subtracts only the breaks you enter. The federal Fair Labor Standards Act rules count rest breaks of about 5 to 20 minutes as work time but not bona fide meal periods (ordinarily 30 minutes or more), and allow rounding clock times to the nearest 5 minutes, tenth or quarter of an hour only if employees are still paid for all the time they work. Source: 29 CFR 785.18, 29 CFR 785.19, 29 CFR 785.48.

DateMath's date math is tested against more than 100 cases worked out by hand. Every worked example and table on the site is computed with the same code the calculators run, so a page and its calculator can't disagree.

Hours calculator: the hours and minutes between two times

The hours calculator measures the time between two clock times, without dates. It answers "how many hours" questions such as the length of a shift, a meeting, a class or a job for a client, and gives the answer as hours and minutes, the way a clock reads, and as decimal hours, the way a timesheet or an invoice wants it.

What you enter

  • Start time and end time, to the minute, in your device's time picker (12-hour with AM and PM, or 24-hour, as your device is set).
  • Unpaid break in whole minutes, such as a lunch break. Leave it at 0 to get the full span.

What you get

The headline gives the hours and minutes, such as 8 hours for 9:00 to 5:30 with a 30-minute break. Below it you get the same time as decimal hours (8.00), as hours:minutes and as total minutes, the start and end in 12-hour time, and the total time from start to end before the break is taken off.

It works as a time calculator between hours and minutes of the same day, and of two days in a row: when the end time is earlier than the start, DateMath counts it on the next day. For a span that also needs dates, use the date duration calculator; to add hours to a time instead, the time calculator.

Hours between two times: examples

  • 9:00 AM to 5:00 PM8 hours (8.00 hours)
  • 8:30 AM to 4:45 PM8 hours, 15 minutes (8.25 hours)
  • 7:00 AM to 3:30 PM, minus a 30-minute break8 hours (8.00 hours)
  • 12:15 PM to 1:05 PM50 minutes (0.83 hours)
  • 10:00 PM to 6:30 AM the next day8 hours, 30 minutes (8.50 hours)
  • 11:45 PM to 12:15 AM the next day30 minutes (0.50 hours)
  • 6:00 AM to 6:00 PM, minus a 60-minute break11 hours (11.00 hours)

How to calculate hours between two times by hand

Subtract the start from the end on the 24-hour clock, minutes first. When the end's minutes are smaller, borrow an hour, which gives 60 minutes. Example: 8:47 AM to 5:12 PM.

  1. Write both times on the 24-hour clock: 8:47 AM is 08:47 and 5:12 PM is 17:12.
  2. Minutes: 12 is less than 47, so borrow 1 hour (60 minutes): 12 + 60 = 72, and 72 − 47 = 25.
  3. Hours: 17 − 1 borrowed = 16, and 16 − 8 = 8.

Result: 8 hours, 25 minutes, or 8.42 decimal hours, the same as the calculator gives.

Overnight shifts: calculating hours past midnight

A shift that ends after midnight has an end time smaller than its start. Add 24 hours to the end and subtract as usual; the calculator does this whenever the end is earlier than the start, so you never need a date for a night shift. Example: 9:40 PM to 6:15 AM the next day.

  1. Write both times on the 24-hour clock: 9:40 PM is 21:40 and 6:15 AM is 06:15.
  2. The end is earlier than the start, so it is on the next day: add 24 hours, and 06:15 becomes 30:15.
  3. Minutes: 15 is less than 40, so borrow 1 hour (60 minutes): 15 + 60 = 75, and 75 − 40 = 35.
  4. Hours: 30 − 1 borrowed = 29, and 29 − 21 = 8.

Result: 8 hours, 35 minutes (8.58 hours). A shift can therefore be at most 23 hours, 59 minutes long here: 8:00 AM to 7:59 AM the next day. Spans of 24 hours or more need the dates, in the duration calculator.

How many hours is a shift? Common work hours

The hours of common shifts, before and after a 30-minute unpaid lunch. The last column is in hours:minutes, with decimal hours in brackets.

Shift lengths, computed with the hours calculator
ShiftHoursDecimalAfter a 30-minute break
9:00 AM to 5:00 PM8 hours8.007:30 (7.50)
8:00 AM to 5:00 PM9 hours9.008:30 (8.50)
9:00 AM to 5:30 PM8 hours, 30 minutes8.508:00 (8.00)
8:30 AM to 5:00 PM8 hours, 30 minutes8.508:00 (8.00)
7:00 AM to 3:30 PM8 hours, 30 minutes8.508:00 (8.00)
6:00 AM to 2:30 PM8 hours, 30 minutes8.508:00 (8.00)
7:00 AM to 7:00 PM12 hours12.0011:30 (11.50)
3:00 PM to 11:00 PM8 hours8.007:30 (7.50)
7:00 PM to 7:00 AM the next day12 hours12.0011:30 (11.50)
10:00 PM to 6:00 AM the next day8 hours8.007:30 (7.50)
11:00 PM to 7:00 AM the next day8 hours8.007:30 (7.50)

So 9 to 5 is 8 hours, and an 8-hour working day with a 30-minute lunch runs from 9:00 to 5:30. To add up the shifts of a whole week, with a different break each day, use the time card calculator.

Hours calculator with a break

Enter only the break you are not paid for. Under the federal Fair Labor Standards Act rules, short rest breaks of about 5 to 20 minutes count as work time, while a bona fide meal period, ordinarily 30 minutes or more without duties, does not; state law and your employer's policy can add their own rules. A 8:00 AM to 5:00 PM day with different unpaid breaks:

8:00 AM to 5:00 PM minus an unpaid break
Unpaid breakHours workedDecimal hours
No break9 hours9.00
15 minutes8 hours, 45 minutes8.75
30 minutes8 hours, 30 minutes8.50
45 minutes8 hours, 15 minutes8.25
60 minutes8 hours8.00
90 minutes7 hours, 30 minutes7.50

With two unpaid breaks in a day, add them and enter the sum: a 30-minute lunch and a 30-minute dinner break are 60 minutes.

Hours and minutes, hours:minutes and decimal hours

The calculator shows each result three ways, because different places want different forms. Hours and minutes is how you say it, hours:minutes is how a time clock prints it, and decimal hours are what you multiply by an hourly rate. Decimal hours are the minutes divided by 60, so 30 minutes is 0.5 and 15 minutes is 0.25.

The same time in four forms
Hours and minutesHours:minutesDecimal hoursMinutes
8 hours, 30 minutes8:308.50510
7 hours, 45 minutes7:457.75465
7 hours, 18 minutes7:187.30438
20 minutes0:200.3320
1 hour, 15 minutes1:151.2575
10 hours, 5 minutes10:0510.08605

Don't read hours:minutes as a decimal: 7:18 is 7.30 hours, not 7.18. The hours to decimal calculator converts any amount both ways and has a chart for every minute of the hour.

Midnight, noon, 24 hours and daylight saving time

  • Midnight is 12:00 AM (00:00) and noon is 12:00 PM (12:00). A shift that ends at midnight ends at 12:00 AM: 4:00 PM to 12:00 AM the next day is 8 hours.
  • The same start and end time gives 0 hours, not 24: 8:00 AM to 8:00 AM is 0 minutes. For a 24-hour shift, use the duration calculator with dates.
  • Daylight saving time is not applied: the calculator works in clock time. In most of the US the clocks spring forward on the second Sunday in March and fall back on the first Sunday in November, both at 2:00 AM. A 10:00 PM to 6:00 AM the next day shift shows 8 hours either way, but on the spring-forward night only 7 hours pass, and on the fall-back night 9 hours.
  • Seconds are not entered; times are to the minute, like most time clocks.

When to use the hours calculator

  • A shift's hours. 6:45 AM to 3:15 PM with a 30-minute lunch is 8 hours worked.
  • Billing time. A job from 1:15 PM to 3:50 PM is 2 hours, 35 minutes, or 2.58 hours on an invoice.
  • Parking, rentals and childcare. 7:40 AM to 6:05 PM is 10 hours, 25 minutes.
  • Travel in one time zone. A 10:35 AM to 2:10 PM trip takes 3 hours, 35 minutes; across time zones, convert both times to the same zone first.

To calculate the hours on a whole time card, use the time card calculator; to find what time it will be a number of hours from now, the time calculator; for workdays between dates, the business days calculator.

Frequently asked questions

How do I calculate the hours between two times?
Subtract the start time from the end time: enter both and the calculator shows the hours and minutes between them. By hand, write both in 24-hour time first, so 9:15 AM to 5:45 PM is 17:45 − 9:15 = 8 hours 30 minutes.
How do I calculate hours worked overnight?
Enter the end time as it is: when it is earlier than the start, the calculator counts it on the next day, so 10:00 PM to 6:30 AM is 8 hours 30 minutes. By hand, add 24 hours to the end time first: 6:30 becomes 30:30, and 30:30 − 22:00 = 8:30.
How do I subtract a lunch break from my hours?
Type the unpaid break in minutes in the Break field and it is taken off the time between start and end. 8:00 AM to 4:30 PM is 8 hours 30 minutes, so with a 30-minute lunch it is 8 hours worked. For a whole week of shifts, use the time card calculator.
How many hours is 9 to 5?
8 hours: 9:00 AM to 5:00 PM is 8 hours, or 7 hours 30 minutes worked after a 30-minute unpaid lunch. 9:00 AM to 5:30 PM with a 30-minute lunch is exactly 8 hours worked.
Where does the calculator show decimal hours?
In the Decimal hours line under the result, rounded to two places, next to the same span as hours:minutes and in total minutes: 8 hours 30 minutes shows as 8.50 and 8:30. To convert any other amount, use the hours to decimal calculator.
Does the hours calculator handle AM and PM?
Yes. The time fields follow your device's setting, 12-hour with AM and PM or 24-hour, and the result repeats the start and end in 12-hour time. 12:00 AM is midnight and 12:00 PM is noon.
What if the start and end times are the same?
The result is 0 hours, not 24. For a shift of exactly 24 hours or longer, use the date duration calculator, which takes a date with each time.
Can I calculate hours across more than one day?
Not with this calculator: it measures up to 23 hours 59 minutes, from the start to the next time the clock shows the end time. For longer spans, enter dates and times in the date duration calculator.
Does the hours calculator account for daylight saving time?
No. It measures clock time, so a night shift across the spring-forward change shows one hour more than really passed, and one across the fall-back change one hour less. Correct the result by that hour on those two nights.

More date and time tools