Free time calculator calculator
Find the exact duration between any two clock times — a start and an end — shown as hours and minutes plus the total in minutes, with overnight spans that cross midnight handled automatically. Enter a start and end time and the result is updated live, as you type.
On this page12 sections
Results are estimates. Consult a professional.
What is a time calculator?
A time calculator finds the duration between two clock times — a start time and an end time — and reports it as hours and minutes (plus the total in minutes). Enter when something began and when it ended, and this time duration calculator tells you instantly how long it lasted, even when the period runs past midnight.
It answers the everyday "how many hours between two times?" question that comes up with work shifts, study sessions, parking, cooking, travel, and timesheets. Instead of counting on your fingers or fighting a spreadsheet that resets at midnight, you read the answer directly: for a 09:00 start and a 17:30 end, the duration is 8 hours and 30 minutes, or 510 total minutes.
How to calculate the hours between two times
The reliable way to find a duration is to convert both times to minutes-from-midnight, subtract, and then translate back into hours and minutes. Work through it in order:
- Put both times in 24-hour form. Convert any PM time by adding 12 to the hour: 5:30 PM becomes 17:30, while AM times and noon stay as written.
- Turn each time into total minutes with (hour × 60) + minutes. So 09:00 → 540 minutes and 17:30 → 1,050 minutes.
- Subtract the start from the end. 1,050 − 540 = 510 minutes.
- If the result is negative, add 24 hours (1,440 minutes) — the span crossed midnight (covered in its own section below).
- Convert back to hours and minutes: hours = whole part of (total ÷ 60), minutes = remainder. 510 ÷ 60 = 8 remainder 30 → 8h 30m.
Because the calculator works in whole minutes, the answer is always exact — there is no rounding. The result appears as hours and minutes and as total minutes, both updated the moment you change either time.
A worked example using the time calculator
Daniel starts work at 09:00 and finishes at 17:30 (5:30 PM). He wants the exact duration for his timesheet. Here is how the calculator works it out.
Step 1 — Convert both times to minutes from midnight
Start 09:00 = (9 × 60) + 0 = 540 minutes. End 17:30 = (17 × 60) + 30 = 1,050 minutes.
Step 2 — Subtract the start from the end
1,050 − 540 = 510 minutes. The result is positive, so the period stays within the same day and no midnight correction is needed.
Step 3 — Convert back to hours and minutes
510 ÷ 60 = 8 with a remainder of 30, so the duration is 8 hours and 30 minutes. The calculator displays this as 8h 30m alongside 510 total minutes.
Calculating time that crosses midnight
When the end time is earlier on the clock than the start time, the period has crossed midnight — it ends on the next day. A plain subtraction would give a negative (nonsensical) answer, so the calculator adds 24 hours (1,440 minutes) to bring it right. This is the step spreadsheets famously get wrong because clock arithmetic resets at midnight.
Enter start 22:00 and end 06:00. Straight subtraction gives (6 × 60) − (22 × 60) = 360 − 1,320 = −960 minutes. Because that is negative, the calculator adds 1,440: −960 + 1,440 = 480 minutes. That is 8h 0m — and the widget shows 480 total minutes.
Converting minutes to decimal hours
Payroll and billing systems often want a duration as decimal hours rather than hours-and-minutes. Decimal hours are not the same as the minute value: 8 hours 30 minutes is 8.5 hours, not 8.30. To convert, divide the minutes by 60.
| Minutes | Decimal of an hour | Common example |
|---|---|---|
| 6 min | 0.1 | Short rounding unit |
| 15 min | 0.25 | Quarter hour |
| 20 min | 0.33 | Third of an hour |
| 30 min | 0.50 | Half hour |
| 45 min | 0.75 | Three-quarter hour |
| 50 min | 0.83 | — |
| 60 min | 1.00 | Full hour |
Minutes-to-decimal conversions (minutes ÷ 60). So 8h 30m = 8.5 decimal hours and 7h 45m = 7.75 decimal hours.
Overnight shifts, timesheets and everyday timing
A time duration calculator earns its keep anywhere you need exact elapsed time rather than a rough guess:
- Work shifts and payroll — measure a shift from clock-in to clock-out, including overnight shifts that run past midnight, then convert to decimal hours for the pay system.
- Timesheets and freelancing — total the hours billed to a client between a start and stop time before applying a rate.
- Parking, rentals and meters — work out how long a car has been parked or a tool hired to estimate the cost.
- Cooking and baking — confirm how long something has roasted, proofed or slow-cooked between two clock times.
- Travel and study — measure journey length or focused study time between two points on the clock.
For paid-hours math that subtracts an unpaid break, use the time card calculator. To total whole hours between two times, see the hours calculator, and to convert a duration into payroll decimal hours, the time to decimal calculator.
Common time calculator questions
How many hours is 9:00 to 5:30?
From 09:00 to 17:30 (5:30 PM) is 8 hours and 30 minutes, which is 510 total minutes or 8.5 decimal hours. That is the gross span before subtracting any unpaid break.
How does the calculator handle times that cross midnight?
When the end time is earlier on the clock than the start time, it adds 24 hours so the span is treated as ending the next day. For example, 22:00 to 06:00 returns 8h 0m (480 total minutes) instead of a negative number.
What is the difference between total minutes and decimal hours?
Total minutes is the whole duration counted in minutes (510). Decimal hours is that figure divided by 60 (8.5). Both describe the same length of time — payroll usually wants decimal hours, so 8h 30m becomes 8.5, never 8.30.
How this calculator works and sources
This time calculator converts both clock times to minutes from midnight, subtracts the start from the end, and adds 1,440 minutes (24 hours) when the result is negative so periods crossing midnight come out right. It then splits the total into whole hours and leftover minutes. The maths is pure integer arithmetic run entirely in your browser — nothing is sent anywhere — and follows the standard 24-hour clock convention, in which the day runs from 00:00 (midnight) to 23:59.
NIST (U.S. National Institute of Standards and Technology) — Times of Day FAQs, on the 24-hour clock and midnight (00:00 / 24:00) convention.ISO 8601 international standard date and time notation (NASA/GSFC overview) — 24-hour HH:MM time of day.Frequently asked questions about the free time calculator calculator
About this time calculator
This time calculator runs entirely in your browser. It converts both clock times to minutes from midnight, subtracts the start from the end, adds 24 hours when the span crosses midnight, and reports the duration as hours, minutes, and total minutes — instantly, with nothing sent to a server.
It is one of the timing tools on the everyday calculators shelf. For paid hours after a break use the time card calculator, and browse the full calculator directory for more.