The time desk
Free Online Time Duration Calculator
How long is it from one clock time to another? Enter both times and get the duration in hours and minutes, in decimal hours, in minutes and in seconds.
The formula
How the time between two clock times is worked out
Every answer this time duration calculator gives comes from one small piece of arithmetic: convert both clock times into minutes counted from midnight, subtract, then translate the result into whatever unit you need. That removes the step people get wrong by hand — borrowing 60 from the hours column when the end minutes are smaller than the start minutes.
Step 1 — put each time on one scale:
minutes since midnight = (hours × 60) + minutes
Step 2 — subtract, and wrap if the answer went negative:
duration = end − start, and if that is below zero, add 1440
The 1440 is the number of minutes in a full day. It is what makes 10:40 PM to 6:15 AM come out as a sensible 7 h 35 min instead of a nonsensical −16 h 25 min.
Turning the answer back into the unit you need
Once you have a count of minutes, four presentations fall straight out of it, and this page shows all four at once because different jobs need different ones:
- Hours and minutes (h:mm) — divide by 60 for the hours, take the remainder for the minutes. 455 minutes is 7 r 35, so 7:35.
- Decimal hours — divide by 60 and keep the fraction. 455 ÷ 60 = 7.58. Payroll, invoicing and project-tracking software almost always want this form; the hours to decimal converter covers the conversion on its own.
- Total minutes — the raw 455. Useful for parking meters, cooking, exam timing and anything billed per minute.
- Seconds — multiply the minutes by 60. 27,300 seconds, which is the unit scripts, timers and media tools tend to speak.
Those four never disagree, because all are derived from the same integer minute count rather than calculated separately.
Worked examples
Four durations, start to finish
The examples below are the four shapes that cover almost every query: a plain daytime span, one that needs the borrow, one that crosses midnight, and one where the minutes matter more than the hours.
1. A medical appointment block: 10:20 AM to 1:05 PM
Start 10:20 AM → (10 × 60) + 20 = 620. End 1:05 PM → 13:05 → (13 × 60) + 5 = 785.
785 − 620 = 165 min = 2 h 45 min = 2.75 h = 9,900 s
Notice what happened to the PM time: 1:05 PM became 13:05 before anything else. Converting to the 24-hour clock first is the single habit that prevents more errors than any other, and it is why the 12h/24h toggle above changes only how the answer is displayed, never how it is computed.
2. A flight that needs the borrow: 6:50 AM to 11:25 AM
Start 6:50 AM → 410. End 11:25 AM → 685.
685 − 410 = 275 min = 4 h 35 min = 4.58 h
By hand you would subtract 50 from 25, fail, borrow an hour, and turn 11:25 into 10:85 to reach 4 h 35 min. One caution on flights: published departure and arrival times are each in local time, so subtracting them gives the real flight duration only when both airports share a time zone.
3. An overnight shift: 9:45 PM to 6:30 AM
Start 9:45 PM → 21:45 → 1305. End 6:30 AM → 390.
390 − 1305 = −915 → −915 + 1440 = 525 min = 8 h 45 min = 8.75 h
Because the second time is earlier on the clock than the first, the calculator assumes it belongs to the following day and flags the result as crossing midnight. That assumption is correct for a night shift, a long bake or an overnight drive, and wrong only if you genuinely meant a span of more than 24 hours — see the limits further down.
4. A short study block where minutes are the point: 2:10 PM to 2:55 PM
Start 14:10 → 850. End 14:55 → 895.
895 − 850 = 45 min = 0:45 = 0.75 h = 2,700 s
Spans under an hour are where the decimal form earns its keep in reverse: 0.75 reads as three quarters of an hour instantly, while a bare "45" in a spreadsheet column is easy to mistake for 45 hours.
Quick reference
Durations you will meet most often
Spans that come up repeatedly — a standard workday, a parking stay, a long-haul flight — are worth recognising without calculating.
| From → to | h:mm | Decimal | Minutes | Seconds |
|---|---|---|---|---|
| 9:00 AM → 12:00 PM | 3:00 | 3.00 | 180 | 10,800 |
| 8:30 AM → 12:15 PM | 3:45 | 3.75 | 225 | 13,500 |
| 9:00 AM → 5:00 PM | 8:00 | 8.00 | 480 | 28,800 |
| 7:00 AM → 3:30 PM | 8:30 | 8.50 | 510 | 30,600 |
| 11:00 PM → 7:00 AM | 8:00 | 8.00 | 480 | 28,800 |
| 6:45 PM → 2:20 AM | 7:35 | 7.58 | 455 | 27,300 |
| 12:00 PM → 12:00 AM | 12:00 | 12.00 | 720 | 43,200 |
The two eight-hour rows are worth comparing: one runs through the middle of the day, one through the middle of the night, and the arithmetic treats them identically. Only the midnight flag distinguishes them on screen.
Midnight
What happens when the second time is earlier than the first
A duration between two clock times with no dates attached is ambiguous by nature. 8:00 PM to 4:00 AM could mean eight hours or thirty-two. The calculator resolves it the way nearly everyone means it: the second time is taken as the next occurrence of that time, so the answer is always between 0 and 24 hours.
Where this breaks down: a span longer than a day. If you were on site from Monday 9:00 AM to Wednesday 2:00 PM, that is 53 hours, and no two-field clock tool can know it. Count the whole days separately (2 × 24 = 48) and add the 5-hour remainder. For anything multi-day, enter each day as its own row in the timesheet calculator.
Midnight itself has a second trap: 12:00 AM is the start of the day (00:00) and 12:00 PM is noon. Writing "12:00" with no suffix is genuinely ambiguous, which is why schedules and timetables tend to use the 24-hour clock. This tool accepts both — type 23:30 or 11:30 PM and you get the same minute count. A fuller treatment lives in the guide on calculating hours across midnight.
Avoid these
Four mistakes that produce a wrong duration
Subtracting the clock faces as if they were decimals
10:45 minus 9:15 is not 1.30. Treating the minutes as hundredths inflates or deflates every result that has a non-zero minute figure, and over a week of entries the error compounds into real money. Convert to minutes, then to decimals — never the other way round.
Mixing up AM and PM on a long span
A missed suffix turns a 9-hour shift into a 3-hour one or vice versa. If the flagged result says the span crossed midnight and you did not expect that, the suffix is the first thing to check.
Forgetting that a break is not part of the duration
This page measures elapsed time between two points, nothing more. If 30 unpaid minutes have to come out before the figure reaches payroll, subtract them yourself or use the time card calculator, which has a break field built in. Whether a break is paid at all varies by employer, state and country, so the deduction is a decision you make, not one the arithmetic makes for you.
Rounding too early
Rounding 7.583 to 7.6 and multiplying by five days costs you half an hour of accuracy. Keep the minute counts whole for as long as possible and round only the final figure.
Under the hood
How this calculator stays exact
Times you type are parsed into whole minutes immediately, and every operation after that is integer arithmetic on those minutes. Nothing is ever held as a fraction of an hour mid-calculation, so there is no floating-point drift — decimal hours are produced only at the very end and rounded to two places, which is why 7:45 reports as 7.75 and 7:20 as 7.33 rather than 7.3333333. The formulas are covered by 50 automated unit tests that run on every change to the code.
Input is deliberately forgiving. 9, 930, 0930, 9:30, 9.30, 9:30 AM, 9:30pm and 21:30 are all understood, so you can paste straight from a roster, a booking confirmation or a text message without reformatting. Everything runs inside your browser — no network request, no account, no stored record of what you entered. More detail on the parsing rules is on the how it works page.
What the tool gives you is arithmetic, not advice. If the duration feeds a payslip, an invoice or a legal deadline, check it against the rules that actually govern it — break entitlements and overtime thresholds differ by country and by state, and no calculator can know which set applies to you.
Frequently asked questions
Common questions
How do you calculate the time between two times?
Convert both clock times to minutes counted from midnight, then subtract. For a time such as 2:45 PM, first make it 14:45, then calculate (14 × 60) + 45 = 885 minutes. Do the same for the other time and take the difference.
If the result is negative, the span crossed midnight, so add 1440 — the number of minutes in a day. Divide the final minute count by 60 for hours and keep the remainder as minutes: 525 minutes is 8 hours 45 minutes. The calculator on this page runs exactly that sequence and shows the answer in h:mm, decimal hours, minutes and seconds at once.
How many hours is 9 AM to 5:30 PM?
8 hours and 30 minutes, which is 8.5 decimal hours, 510 minutes or 30,600 seconds.
The working: 9:00 AM is 540 minutes after midnight, and 5:30 PM becomes 17:30, which is 1050 minutes. 1050 − 540 = 510 minutes, and 510 ÷ 60 = 8 remainder 30. If a 30-minute unpaid lunch comes out of that span, the paid figure drops to 8:00 or 8.00 decimal hours — this page measures elapsed time only and does not deduct breaks for you.
How do you calculate hours between two times that cross midnight?
Subtract as usual and add 24 hours whenever the answer comes out negative. From 10:15 PM to 6:45 AM: 22:15 is 1335 minutes, 6:45 AM is 405 minutes, and 405 − 1335 = −930. Adding 1440 gives 510 minutes, or 8 hours 30 minutes.
This calculator does that automatically. Any time you enter in the second field that is earlier on the clock than the first is treated as belonging to the next day, and the result is labelled as crossing midnight so you can confirm that is what you meant.
What is the difference between decimal hours and hours and minutes?
Hours and minutes split a duration into two numbers on a base-60 scale, so 7 hours 20 minutes is written 7:20. Decimal hours express the same duration as a single base-10 number, 7.33, where the part after the point is the fraction of an hour rather than a count of minutes.
They are easy to confuse because 7:20 and 7.20 look alike but differ by about eight minutes. Payroll systems, invoices and spreadsheets need decimal hours because you can multiply them directly by a pay rate; clocks and schedules use h:mm.
How many minutes is 1 hour 45 minutes?
105 minutes. Multiply the whole hours by 60 and add the leftover minutes: (1 × 60) + 45 = 105. In decimal hours the same duration is 1.75, and in seconds it is 6,300.
Working in total minutes is the safest way to combine durations, because you can add them with ordinary arithmetic and convert back only once at the end. Three blocks of 1 hour 45 minutes, for example, are 315 minutes, which converts cleanly to 5 hours 15 minutes.
Can this time duration calculator handle a 24-hour clock?
Yes. Enter 21:30 or 9:30 PM and you get the same answer, and the 12h/24h toggle switches how results are displayed without changing the arithmetic.
The parser is deliberately loose about format: 9, 930, 0930, 9:30, 9.30, 9:30am and 21:30 are all accepted, so you can paste a time straight out of a roster or a confirmation email. Twenty-four-hour notation also removes the midnight ambiguity, since 00:00 and 12:00 can never be mistaken for one another the way 12:00 AM and 12:00 PM can.
Why does my duration come out different from my employer's figure?
Three things usually explain the gap. The first is unpaid breaks: elapsed time between clock-in and clock-out is not the same as paid time once a meal period is deducted. The second is time-card rounding, where many employers round punches to the nearest quarter hour before totalling. The third is rounding decimals too early, which compounds across a week.
Compare the raw elapsed figure here with your employer's rule set before assuming an error. The guide on rounding time cards explains the common schemes in detail.
How do I calculate a duration longer than 24 hours?
A two-field clock calculator cannot do it on its own, because two clock times with no dates attached can never describe more than one day. If you were on site from Monday 9:00 AM to Wednesday 2:00 PM, count the whole days first — two days is 48 hours — then add the 5-hour remainder from 9:00 AM to 2:00 PM for a total of 53 hours.
For multi-day work, entering each day as a separate row in the timesheet calculator is faster and leaves an auditable record of where every hour came from.
Is anything I type into this calculator sent anywhere?
No. Every calculation runs client-side in your own browser. There is no network request when you press Calculate, no account to create, and no copy of your times stored on a server.
That matters if you are checking appointment times, shift patterns or anything else you would rather not hand to a third party. The share button works by encoding the values into the link itself, so a link is only seen by whoever you choose to send it to.
How accurate is the result?
Exact to the minute. Times are parsed into whole minutes and all arithmetic is done on those integers, so there is no floating-point drift accumulating through the calculation. Decimal hours appear only at the final step, rounded to two places, which is why 7:45 shows as 7.75 and 7:20 as 7.33.
The underlying formulas are covered by 50 automated unit tests that run on every change. The result is arithmetic, though — not payroll, tax or legal advice. Break and overtime rules vary by country and by state, and you should check yours before treating a figure as final.
Read next
Guides that explain the numbers
Last reviewed 1 November 2026 by the Hours Calculator Online team. Spotted a problem? Tell us and we will fix it.