Calculate the hours between two times, in 12-hour (AM/PM) or 24-hour format. Results in duration (h:m:s), decimal hours, minutes and seconds.
Duration
Hours
Minutes
Seconds
You might be interested in:
Choose 12-hour (AM/PM) or 24-hour format and enter a start time and an end time. From 9:00 AM to 5:30 PM the hours calculator returns 8 hours and 30 minutes, which is 8.5 decimal hours, 510 minutes, and 30600 seconds. If the end time is earlier than the start, the span crosses midnight: 10:00 PM to 6:00 AM is 8 hours. Check the box to include seconds.
Subtract the start time from the end time. Time uses a base-60 system, not base 10: if the end minutes are smaller than the start minutes, borrow 1 hour (60 minutes). Decimal hours are the minutes divided by 60. 8 hours and 45 minutes is 8.75 hours, not 8.45. 15 minutes = 0.25 hours, 30 minutes = 0.5 hours, and 45 minutes = 0.75 hours.
To calculate the hours between two times in 24-hour format:
For example, the hours from 22:30 to 01:15 the next day:
The extra work is the conversion. Switch both times to 24-hour format, then subtract:
For example, the hours from 8:45 AM to 5:15 PM:
Excel stores each time as a fraction of a day, including seconds. The formulas below subtract two cells; the cell format decides whether you see a clock or a number. A clock reading of 8:30 is 8.5 decimal hours, not 8.30.
=MOD(B2-A2, 1). The formula already keeps the seconds; what changes is the custom cell format: [h]:mm for hours and minutes, or [h]:mm:ss if you also want to see the seconds. It works for the same day and for shifts that cross midnight, without negative-number errors.=MOD(B2-A2, 1)*24 and set the cell format to Number.=MOD(B2-A2, 1)*1440 and set the cell format to Number.They divide the day into two 12-hour periods: AM (from Latin ante meridiem, "before midday") runs from midnight to 11:59 AM, and PM (from Latin post meridiem, "after midday") runs from noon to 11:59 PM. In this hours calculator, picking the correct designation for each time is essential: if you choose 11:45 PM as the start and 12:20 AM as the end, the tool detects the midnight crossing and returns a 35-minute duration. Keep the most common pitfall in mind: 12:00 AM is midnight (00:00) and 12:00 PM is noon (12:00); confusing them shifts your result by 12 hours.