โฑ๏ธ Time Duration Calculator โ hours, minutes, no guesswork
โ Math & EverydayThe clock tells you when something started and when it ended. The bit in between is where the mental maths gets messy โ especially if midnight is involved. Put in two times and see the gap in hours, minutes and seconds, or switch modes to add time and total up a few blocks.
Your result
Clock maths, explained. Times assume 24-hour days unless you tell the calculator otherwise.
One timeline. No mental maths.
The same time, said four ways
30 minutes is 0.5 hours, not 0.30 hours. Decimal hours are rounded for display; the seconds figure is exact.
What if you take a break?
A break is your own estimate. It is not subtracted from the elapsed time, and this page makes no claim about paid breaks or employment rules.
What fits in that much time?
Illustrations only โ fixed lengths chosen to make the number tangible, not viewing or break recommendations.
The clock tells you when. This tells you how long.
Ten past nine to twenty to six sounds like an easy subtraction until you try to do it while checking a timetable, comparing shift hours or wondering whether you've got enough time to get somewhere.
Most of the confusion comes from treating minutes as though they're ordinary decimals. An hour has sixty of them, not a hundred. And once a time crosses midnight, the end of the day suddenly becomes part of the calculation, too.
This calculator keeps those small traps out of your way. Use it for a work or study session, a journey, an event, the gap between two appointments, or anything else with a start and a finish. Want to plan ahead instead? Add time to a clock reading. Got several blocks to combine? Total them here rather than juggling the minutes in your head.
The answer is just time โ laid out clearly enough that you can see where every minute went.
Time plays tricks with numbers
8.30 hours isn't eight hours and thirty minutes.
It looks right on a spreadsheet, but 8.30 decimal hours is 8 hours and 18 minutes. The decimal part is 0.30 of sixty minutes. To write eight hours and thirty minutes in decimal, you need 8.5 hours. Twelve missing minutes are quite a surprise on a timesheet.
A tiny five-minute habit has a thirty-hour birthday.
Five extra minutes a day barely feels like time at all. Do it every day for 365 days and it becomes 30 hours and 25 minutes โ more than a full day, built from moments that would barely register on a clock.
Midnight is the ultimate subtraction trap.
Start something at 11:50 PM and finish at 12:10 AM and you've spent just 20 minutes. Subtract the clock faces as if they were normal numbers and you'd get nonsense. The clock didn't go backwards; the date moved forward.
A ten-second wait can eat more time than you think.
A ten-second interruption repeated a hundred times in a day adds up to 16 minutes and 40 seconds. The little waits are short. Their total isn't quite so little.
The same clock time can happen twice.
On the night a place turns its clocks backward for daylight saving, a local clock reading such as 1:30 AM or 2:30 AM can occur twice, depending on the region. Two matching clock faces don't always mean two matching moments โ which is why this tool says exactly when it's doing simple clock maths rather than time-zone-aware elapsed time.
How does this time duration calculator work?
It turns each clock time into a number of seconds since midnight, does the arithmetic once, and then turns the answer back into days, hours, minutes and seconds. That is all โ but getting the day boundary and the difference between clock-style and decimal hours right is what makes it reliable.
1. A clock time becomes seconds
secondsSinceMidnight = hours ร 3,600 + minutes ร 60 + seconds
09:15:00 becomes 9 ร 3,600 + 15 ร 60 = 33,300 seconds. 17:45:00 becomes 17 ร 3,600 + 45 ร 60 = 63,900 seconds.
2. Find the difference
durationSeconds = endSeconds + (endDayOffset ร 86,400) โ startSeconds
In Automatic mode, the offset is one day only when the end clock time is earlier than the start; equal times stay at zero. Next day always adds a day, even for equal times. Same day uses no offset and refuses an end time that is earlier than the start.
Worked example: 63,900 โ 33,300 = 30,600 seconds, which is 8 hours 30 minutes. Overnight example: 22:45 to 06:20 next day is (6 ร 3,600 + 20 ร 60 + 86,400) โ (22 ร 3,600 + 45 ร 60) = 27,300 seconds, or 7 hours 35 minutes.
3. Break the answer into units
wholeDays = floor(seconds รท 86,400)
hoursAfterDays = floor((seconds mod 86,400) รท 3,600)
remainingMinutes = floor((seconds mod 3,600) รท 60)
remainingSeconds = seconds mod 60
Two readings are deliberately kept apart: 27 h 15 m is the total hours, while 1 day 3 h 15 m is the days-plus-remainder version. Both describe the same number of seconds, and neither hides the other.
4. Decimal hours are not clock notation
decimalHours = hours + minutes รท 60 + seconds รท 3,600
Eight hours thirty minutes is 8.5 decimal hours, not 8.30. One hour forty-five is 1.75, not 1.45. A second-level answer such as 1 h 3 m 25 s is about 1.0569 decimal hours; the page keeps the exact hours, minutes and seconds beside it so the rounded decimal is never the only answer.
5. Add or subtract a duration
signedTotal = startSeconds + (operation ร durationSeconds)
dayOffset = floor(signedTotal รท 86,400)
clockSecond = ((signedTotal mod 86,400) + 86,400) mod 86,400
The second modulo is deliberate. JavaScript's % keeps the sign of a negative number, so subtracting past midnight would otherwise produce a broken reading. Normalising it first gives a valid clock time and the correct day: 00:30 โ 1 h = 23:30, previous day, not โ00:30.
More examples: 23:15 + 2 h = 01:15, next day. 09:00 + 27 h 15 m = 12:15, next day. 00:00 โ 49 h = 23:00, three days earlier.
6. Add up several durations
duration_i = hours_i ร 3,600 + minutes_i ร 60 + seconds_i
totalSignedSeconds = ฮฃ (sign_i ร duration_i)
A negative total is valid in this mode. Its units are taken from the absolute value and a single minus sign is printed once: +1 h โ 2 h = โ1 h, described as 60 minutes below zero, never as negative hours and negative minutes at the same time.
7. What the calculator assumes
This is a clock-time calculator. It treats a day as exactly 24 hours and does not ask where in the world the times happened. That's right for straightforward questions such as โHow long from 9:15 to 5:45?โ but not always for the number of real hours between dated events around a daylight-saving clock change. For those, you need an actual date and time zone. This page doesn't pretend to know one.
- A time value does not identify a date or an instant by itself.
- Elapsed time and the difference between two local clock readings can diverge across a daylight-saving change.
- In the core mode, the implicit rollover is at most one day. It is never guessed as several.
- Seconds are optional; a blank or hidden seconds field still contributes the value it holds.
- The break option subtracts from a separate time after break figure, not from the elapsed span.
- Display rounding never feeds back into the calculation: the exact integer seconds are kept throughout.
- Nothing is stored or sent anywhere; the arithmetic runs in the page.
Frequently asked questions
How do I calculate the hours between two times?
Enter the starting and ending clock times. The calculator turns both into seconds, subtracts the start from the end and shows the gap in hours, minutes and seconds. For example, 9:15 AM to 5:45 PM is 8 hours 30 minutes.
What happens if the end time is after midnight?
In Automatic mode, an end time earlier than the start is treated as the following day. For example, 10:45 PM to 6:20 AM is 7 hours 35 minutes. You can also explicitly choose Same day or Next day so there's no guesswork.
What if the start and end times are identical?
Automatic and Same day treat matching times as zero elapsed time. If you meant the same clock time on the next day, choose Next day for exactly 24 hours. The choice matters because a clock reading alone doesn't tell you the date.
How do I convert hours and minutes into decimal hours?
Divide the minutes by sixty and add them to the whole hours. Eight hours and thirty minutes is 8.5 hours; eight hours and fifteen minutes is 8.25 hours. Writing 8:30 as 8.30 decimal hours is a common mistake โ 0.30 hours is only 18 minutes.
Can I subtract a lunch break from the total?
Yes. In the Between two times mode, choose a break length to see time after break alongside the unchanged elapsed duration. A 9:15 AMโ5:45 PM span is 8h30m elapsed; with a 30-minute break it's 8 hours after break. This is a calculation, not a judgement about paid breaks or employment rules.
Can I add hours and minutes to a start time?
Yes. Open Add / subtract time, choose a starting clock time and a duration, and select Add or Subtract. The result shows the new time and whether it falls on the same day, next day or a previous day.
What does 12 AM or 12 PM mean?
12:00 AM is midnight (00:00 on a 24-hour clock). 12:00 PM is midday or noon (12:00 on a 24-hour clock). One minute before 12:00 AM is 11:59 PM; one minute after is 12:01 AM.
Does daylight saving change the answer?
It can change the real elapsed time between two dated moments. This tool calculates ordinary clock durations and treats each day as 24 hours; it does not know the date or time zone. During a daylight-saving change, an actual shift between two local times may be an hour shorter or longer than the clock arithmetic suggests. Don't use these numbers as a substitute for a time-zone-aware record where that distinction matters.
Can I total several work or study sessions?
Yes. Use Add up durations to enter several time blocks and add or subtract them. The calculator handles carrying sixty minutes into the next hour for you, then shows both clock-style and decimal-hour totals.
Is this the same as a date difference calculator?
Not quite. This page specialises in clock times and durations: 9 AM to 5 PM, a two-hour delay, or three separate sessions. A date difference calculator is for spans between calendar dates, such as how many days there are from 15 June to 1 September. The two tools answer different questions, and calendar dates introduce leap years and month lengths that a clock-time calculation doesn't need.
More calculators
๐ก Cozy's pick
Not sure where to go next? Let Cozy pick one of his favourites for you to try โ the lighter end of the site, picked at random, and never the one you are reading.
