Hours and Minutes Calculator

Find the time difference between two times in hours, minutes, and seconds. Choose between 12-hour (AM/PM) or 24-hour format for instant time duration results.

: :
: :

Elapsed time

Hours

Minutes

Seconds

How to Use the Hours and Minutes Calculator

Select the time format (12-hour AM/PM or 24-hour) and enter your start and end times. The calculator displays the elapsed duration in time duration format (hours, minutes, and seconds) and automatically converts it to decimal hours (for example, 1 hour and 30 minutes = 1.5 hours), total minutes, and total seconds. If you need higher precision, check the box to include seconds.

How to Calculate Time Duration Between Two Times

To calculate elapsed time manually, subtract the start time from the end time. The key is remembering that time runs on a base-60 sexagesimal system rather than decimal: if the end minutes are less than the start minutes, you must borrow 1 hour (60 minutes) to complete the subtraction. Below is the step-by-step method for each format.

In 24-hour format

To manually subtract two times in 24-hour format:

  1. If the end time is earlier than the start time (the span crosses midnight), add 24 hours to the end time.
  2. Subtract the minutes. If the end minutes are smaller than the start minutes, borrow 1 hour (60 minutes) from the end hours and add it to the minutes.
  3. Subtract hours and minutes separately: that pair is the elapsed time.

For example, to calculate the duration between 22:30 and 01:15 the next day:

  • Midnight crossing: add 24 hours to 01:15, turning it into 25:15.
  • Base-60 adjustment: since 15 is smaller than 30, borrow 1 hour (25 h becomes 24 h and the minutes become 15 + 60 = 75). This leaves 24:75, an auxiliary form for subtraction, not a clock time.
  • Subtract separately: 75 − 30 = 45 minutes and 24 − 22 = 2 hours. The duration is 2 hours and 45 minutes.

In 12-hour format (AM/PM)

The extra work is the conversion. Switch both times to 24-hour format, then subtract:

  1. For AM times: keep the hour the same, except for 12:00 AM, which converts to 00:00.
  2. For PM times: add 12 to the hour (for example, 2 PM = 14:00), except for 12:00 PM, which stays at 12:00.
  3. Once both times are in 24-hour format, subtract as in the previous method. Only if the end minutes are smaller, borrow 1 hour (60 minutes).

For example, to calculate the duration between 09:15 AM and 02:40 PM:

  • Convert to 24-hour: 09:15 AM stays 09:15, and 02:40 PM becomes 14:40 (2 + 12).
  • The minutes can already be subtracted (40 is greater than 15), so there is no need to borrow.
  • Subtract separately: 40 − 15 = 25 minutes and 14 − 9 = 5 hours. The duration is 5 hours and 25 minutes.

How to Calculate Time Between Hours in Excel

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.

  • Duration in clock format: With the start time in A2 and the end time in B2, use =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.
  • Duration in decimal hours: To get an operable number (for example, 1.5 instead of 01:30), multiply the calculation by 24: =MOD(B2-A2, 1)*24 and set the cell format to Number.
  • Duration in total minutes: To find the total elapsed minutes (for example, 90 instead of 01:30), multiply the result by 1440 (the minutes in a full day): =MOD(B2-A2, 1)*1440 and set the cell format to Number.

What Do AM and PM Stand For?

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 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.