Time Duration Calculator
Enter two times to get the hours and minutes between them, even past midnight.
https://numzal.com/en/time-duration-calculator/
- Updated
- Sources: NISTNIST
- 127 tests, 32 from worked examples127 tests
- Runs in your browser
Result
From 8:15 AM to 5:40 PM
9 hours 25 minutes
5:40 PM − 8:15 AM = 9:25
In decimal: 9.42 hours
- As h:mm
- 9:25
- In minutes
- 565 min
How it was worked out
5:40 PM − 8:15 AM = 9:25, or 565 minutes ÷ 60 = 9.42 hours.
To find the duration between two times, subtract the start from the end: from 8:15 AM to 5:40 PM is 9 hours 25 minutes (9:25, or 9.42 hours). When the end time is earlier than the start, it is on the next day: 10:00 PM to 6:00 AM is 8 hours.
This time duration calculator finds the hours and minutes between two times, even past midnight. It also adds and subtracts hours and minutes and totals the hours worked in a day or week, in decimal hours too.
How the time duration calculator works
The calculator has three modes: between two times (how long from one time of day to another), add & subtract (a list of durations) and hours worked (start, end and break for each day). Type times the way you write them, like 8:15, and pick AM or PM; a 24-hour time such as 17:40 works too. Every result shows hours and minutes and decimal hours. The math runs in your browser; nothing you type is sent anywhere.
Between two times. End time minus start time. From 8:15 AM to 5:40 PM: 8:15 AM to noon is 3 hours 45 minutes, noon to 5:40 PM is 5 hours 40 minutes, together 9 hours 25 minutes. Converting to 24-hour time makes it one subtraction: 17:40 − 8:15 = 9:25.
Past midnight. If the end is earlier than the start, count to midnight and add the rest. From 10:00 PM to 6:00 AM: 2:00 to midnight plus 6:00 after it is 8:00. From 11:30 PM to 12:15 AM is 45 minutes. The calculator does this on its own and says when the end is on the next day.
Adding and subtracting time. Add the minutes and the hours separately; every 60 minutes carry over as 1 hour. 8:30 + 7:45 + 9:15: the minutes make 90 (1 hour 30 minutes) and the hours 24, so the total is 25:30, a duration that can pass 24 hours. To subtract, borrow an hour as 60 minutes when needed: 10:00 − 2:45 = 9:60 − 2:45 = 7:15.
Hours worked. For each day: end − start − unpaid break. 9:00 AM to 5:30 PM with a 30-minute lunch is 8:00, and five such days are 40:00. Under “Scheduled hours and difference”, enter your scheduled hours per day to see how far over or under schedule each day and the week are.
Decimal hours. Payroll and timesheets often use decimal hours: divide the minutes by 60. 7 hours 30 minutes is 7.50 hours, 7:20 is 7.33. To go back, multiply the decimal part by 60: 7.4 hours is 7 hours 24 minutes.
12 AM and 12 PM. The calculator reads 12:00 AM as midnight and 12:00 PM as noon, the usual convention. NIST calls both labels ambiguous, so if a time sheet says “12 a.m.”, check which one was meant, or type the 24-hour time (0:00 or 12:00).
For days rather than hours, such as how old someone is on a date, use the age calculator.
Example: hours worked in a week
A week of a timesheet, with an unpaid break each day:
- Monday: 8:45 AM to 5:15 PM = 8:30; minus 30 minutes of break = 8:00 (8.00 hours).
- Tuesday: 9:00 AM to 5:30 PM = 8:30; minus 30 minutes of break = 8:00 (8.00 hours).
- Wednesday: 8:30 AM to 6:00 PM = 9:30; minus 45 minutes of break = 8:45 (8.75 hours).
- Thursday: 9:00 AM to 5:00 PM = 8:00; minus 30 minutes of break = 7:30 (7.50 hours).
- Friday: 9:00 AM to 3:30 PM = 6:30; minus 30 minutes of break = 6:00 (6.00 hours).
Total: 38 hours 15 minutes (38:15), or 38.25 hours in decimal. Choose “Hours worked”, enter these times and breaks, and the calculator shows the same total.
Hours in common shifts
Hours worked for typical start and end times, after an unpaid break, and for five such days.
| Shift | Break | Hours worked | 5 days |
|---|---|---|---|
| 9:00 AM–5:00 PM | none | 8:00 (8.00 h) | 40:00 |
| 9:00 AM–5:00 PM | 30 min | 7:30 (7.50 h) | 37:30 |
| 8:00 AM–5:00 PM | 60 min | 8:00 (8.00 h) | 40:00 |
| 7:00 AM–3:30 PM | 30 min | 8:00 (8.00 h) | 40:00 |
| 6:00 AM–4:30 PM | 30 min | 10:00 (10.00 h) | 50:00 |
| 7:00 AM–7:00 PM | 60 min | 11:00 (11.00 h) | 55:00 |
| 11:00 PM–7:00 AM | 30 min | 7:30 (7.50 h) | 37:30 |
Minutes to decimal hours
Each minute is 1/60 of an hour. Add the fraction from the table to the whole hours: 8 hours 15 minutes is 8.25 hours.
| Minutes | Decimal hours | Example: 8 hours and … |
|---|---|---|
| 0 min | 0.00 | 8:00 = 8.00 |
| 5 min | 0.08 | 8:05 = 8.08 |
| 10 min | 0.17 | 8:10 = 8.17 |
| 15 min | 0.25 | 8:15 = 8.25 |
| 20 min | 0.33 | 8:20 = 8.33 |
| 25 min | 0.42 | 8:25 = 8.42 |
| 30 min | 0.50 | 8:30 = 8.50 |
| 35 min | 0.58 | 8:35 = 8.58 |
| 40 min | 0.67 | 8:40 = 8.67 |
| 45 min | 0.75 | 8:45 = 8.75 |
| 50 min | 0.83 | 8:50 = 8.83 |
| 55 min | 0.92 | 8:55 = 8.92 |
Frequently asked questions
How do I calculate the time duration between two times?
Subtract the start time from the end time. It is easiest in 24-hour time: 8:15 AM is 8:15 and 5:40 PM is 17:40, so the duration is 17:40 − 8:15 = 9:25, or 9 hours 25 minutes. If the minutes of the end are smaller, borrow 60 minutes from the hours. In the calculator, choose “Between two times”.
How do I calculate hours that go past midnight?
Count from the start to midnight, then add the time after midnight. From 10:00 PM to 6:00 AM: 2:00 + 6:00 = 8:00. The calculator treats an end time earlier than the start as the next day.
How many hours is 9 to 5?
9:00 AM to 5:00 PM is 8 hours. With an unpaid 30-minute lunch, it is 7 hours 30 minutes of work, or 7.50 hours; five days are 37:30.
How do I add hours and minutes?
Add the minutes and the hours separately, then turn every 60 minutes into 1 hour. 8:30 + 7:45 + 9:15: 90 minutes is 1 hour 30 minutes, plus 24 hours, so 25:30. Use “Add & subtract” for as many times as you need.
How do I convert minutes to decimal hours?
Divide the minutes by 60 and add them to the hours: 7:30 = 7 + 30 ÷ 60 = 7.50 hours, 7:20 = 7.33, and 0:25 = 0.42. Back the other way, multiply the decimal part by 60: 0.75 hours = 45 minutes.
Is 12 AM midnight or noon?
By the usual convention, 12:00 AM is midnight (the start of the day) and 12:00 PM is noon. NIST notes that both labels are ambiguous, which is why schedules often write “12 noon” and “12 midnight”. The calculator reads 12 AM as midnight; type 0:00 or 12:00 in 24-hour time if you want to be sure.
How do I calculate time in Excel?
Type each time with a or p, like 8:15 a, and subtract: =B2-A2. To show a total of more than 24 hours, format the cell with the custom format [h]:mm;@. For decimal hours, multiply by 24: =(B2-A2)*24 in a cell formatted as Number. For a span past midnight, use =MOD(B2-A2,1).
Related calculators
- Salary CalculatorSalary to hourly, weekly and monthly pay
- Age Calculator Between Two DatesExact age between two dates
- Military Time Converter2:30 PM to 1430 and back
- Discord Time ConverterTimestamp codes that show local time
Add this calculator to your site
Free to use. Paste this code into your page. The small source line under the calculator is optional.