Hours Calculator

This hours calculator tells you how many hours and minutes are between two times. Enter a start time and an end time in 12-hour or 24-hour format and see the difference in hours and minutes, decimal hours and total minutes, even when the end time falls after midnight.

Time format
Hours and minutes
8:00
8 hours
Decimal hours
8.00
Total minutes
480
Day
Same day

If the end time is earlier than the start time, it is counted on the next day (for example 10:00 PM to 6:00 AM is 8 hours). Breaks are not subtracted here; use the hours worked calculator for that.

How do you calculate the hours between two times?

Subtract the start time from the end time after writing both in 24-hour form, and add 24 hours if the result is negative because the end is on the next day. 9:00 AM to 5:00 PM is 17:00 − 9:00 = 8 hours; 10:00 PM to 6:00 AM is 6:00 − 22:00 + 24:00 = 8 hours.

How to use the hour calculator

  1. Pick 12-hour (AM/PM) or 24-hour time. In 12-hour mode, choose AM or PM next to each box, or type it, as in 5:30 pm.
  2. Type the start time. Short forms work: 9 is 9:00 and 845 is 8:45.
  3. Type the end time. The result updates as you type.
  4. Read the time difference as hours and minutes, decimal hours or total minutes. Use the swap button if you entered the times the wrong way round.

Calculating time between two times by hand

Clock time is easiest to subtract in 24-hour form, where 1:00 PM is 13:00 and 11:30 PM is 23:30. Then:

  1. Subtract the start minutes from the end minutes. If the end minutes are smaller, borrow 60 minutes from the end hour.
  2. Subtract the start hour from the end hour.
  3. If the hours come out negative, the period crosses midnight: add 24 hours.

Example: 8:45 AM to 3:10 PM is 15:10 − 8:45. Borrowing gives 14:70 − 8:45 = 6 hours 25 minutes. To get decimal hours, divide the minutes by 60: 25 ÷ 60 = 0.42, so 6.42 hours. To count minutes between two times instead, multiply the hours by 60 and add the minutes: 6 × 60 + 25 = 385 minutes.

How many hours between common start and end times

The table below is calculated with the same engine as the tool. The figures are elapsed time; any unpaid break comes off separately.

TimesHours and minutesDecimal hours
9:00 AM to 5:00 PM8 hours8.00
8:00 AM to 5:00 PM9 hours9.00
7:00 AM to 3:00 PM8 hours8.00
7:00 AM to 7:00 PM12 hours12.00
10:00 PM to 6:00 AM (overnight)8 hours8.00

Overnight shifts

When the end time is earlier on the clock than the start time, this time difference calculator assumes the end is the next day. A night shift from 11:00 PM to 7:30 AM is 8 hours 30 minutes, not a negative number. Periods longer than 24 hours, such as a 30-hour on-call stretch, are better added up as separate durations in the time calculator.

Elapsed time versus hours worked

The total hours here are simply the clock difference. For pay, what counts is hours worked: under federal rules a bona fide meal period, ordinarily 30 minutes or more with you fully relieved of duty, is not work time (29 CFR 785.19), while short rest breaks of about 5 to 20 minutes are (29 CFR 785.18). To subtract an unpaid lunch for each day and total a week, use the hours worked calculator. If your schedule is written in 24-hour time, the military time converter shows the 12-hour equivalent.

Frequently asked questions

How many hours is 9 to 5?

9 AM to 5 PM is 8 hours. If you take an unpaid 30-minute lunch inside that time, the hours actually worked are 7 hours 30 minutes, or 7.5 hours.

How many hours is 8am to 5pm?

8 AM to 5 PM is 9 hours. With a one-hour unpaid lunch it is 8 hours of work, and with a 30-minute lunch it is 8.5 hours.

How many hours from 7am to 3pm?

7 AM to 3 PM is 8 hours. From 7 to 12 is 5 hours and from 12 to 3 is another 3 hours, for 8 in total.

How many hours is 7am to 7pm?

7 AM to 7 PM is 12 hours. A 12-hour shift is often scheduled this way, and any unpaid meal break is subtracted from the 12 hours.

How do you calculate hours?

Calculate hours by converting both times to 24-hour time, subtracting the start from the end, and adding 24 hours if the end is on the next day. For 8:45 AM to 3:10 PM: 15:10 − 8:45 = 6 hours 25 minutes, which is 6.42 decimal hours.