How to calculate the time between two clock times
Elapsed time is the length of time between a start time and an end time on the clock: how long a shift lasted, how long a trip took, or how many hours a machine ran. The method is simple, but 12-hour times, midnight and breaks make it easy to slip.
Enter a start and an end time, choose AM or PM, and the calculator gives the duration in hours and minutes and in total minutes. In Goal mode it works the other way: it adds a duration to a start time and tells you the finishing time.
The method: convert both times to minutes after midnight
Turn each time into minutes after midnight, subtract the start from the end, and convert the answer back to hours and minutes. Using the 24-hour clock first avoids most AM/PM errors.
9:15 AM is 9 × 60 + 15 = 555 minutes. 5:40 PM is 17:40, or 1,060 minutes. 1,060 − 555 = 505 minutes, which is 8 hours 25 minutes.
Night shifts that cross midnight
When the end time is earlier than the start time, the period has crossed midnight. Add 24 hours (1,440 minutes) to the end time before subtracting. The calculator does this for you, so a night shift needs no special handling.
A shift from 10:30 PM to 6:15 AM: 1h 30m until midnight plus 6h 15m after it gives 7 hours 45 minutes.
Subtracting breaks
The calculator measures the full span between the two times. If an unpaid break falls inside that span, subtract it afterwards. A 9:15 AM to 5:40 PM day with a 45-minute lunch is 8h 25m − 45m = 7h 40m of working time. For a whole week of shifts, the Hours & Minutes Calculator is the quickest way to add the daily totals.
Finding the finishing time (Goal mode)
Goal mode adds a number of minutes to a start time. It is useful for cooking and charging times, appointment slots or the end of an exam.
An exam that starts at 1:50 PM and lasts 95 minutes ends at 3:25 PM. If the result passes midnight, the calculator tells you it falls on the next day.
The 12 o’clock trap
- 12:00 AM is midnight, the start of the day (00:00).
- 12:00 PM is noon (12:00).
- 12:30 AM is half an hour after midnight, not half an hour after noon.
- If a result looks 12 hours too long or too short, check the AM/PM choice first.
Limits to keep in mind
Because the inputs are clock times without dates, the result is always less than 24 hours. For periods that span several days, use the Date Difference Calculator for the days and add the hours separately. Daylight-saving changes, which some countries use, can add or remove an hour on the night of the change; the calculator does not apply them.
Frequently asked questions
How many hours is 8 AM to 5 PM?
Nine hours. Subtract any unpaid break to get working time, for example 8 hours with a one-hour lunch.
How do I calculate hours worked overnight?
Enter the start and end times as they appear on the clock. The calculator adds 24 hours automatically when the end time is earlier than the start time.
Can I get the answer in decimal hours?
The calculator shows total minutes. Divide by 60 for decimal hours: 505 minutes is 8.42 hours.
Last reviewed: 4 November 2026 · How we check our calculations · Report an error