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
You might be interested in:
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.
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.
To manually subtract two times in 24-hour format:
For example, to calculate the duration between 22:30 and 01:15 the next day:
The extra work is the conversion. Switch both times to 24-hour format, then subtract:
For example, to calculate the duration between 09:15 AM and 02:40 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.
=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 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.