Add & Subtract • Duration • Crosses Midnight

Time Calculator

Time & Duration

Add to a clock reading, subtract from it, or measure the span between two readings. Spans that pass midnight are handled without a negative result.

Today:
14:30, 2:30 pm and 2.30pm all parse.
Tick this when the end time lands on the next day.

Nothing you type leaves this page.
Quick Answer • How do I calculate the time between two times?

Subtract the start from the end, and add 24 hours if the result is negative because the span crossed midnight. 09:00 → 17:30 is 8 h 30 m (8.5 decimal hours, 510 minutes); 22:15 → 06:45 is also 8 h 30 m. To convert minutes to decimal hours, divide by 60 — 45 minutes is 0.75, not 0.45.

Add or subtract hours, minutes and seconds from a clock reading, or measure the time between two readings — with midnight handled properly. Every answer is also given in decimal hours, total minutes and total seconds, on both the 24-hour and 12-hour clock.

1. Clock time and elapsed time are different things

There are two kinds of time arithmetic and mixing them up is where most errors come from. A clock reading is a position in the day: it wraps at midnight, so 22:00 plus four hours is 02:00, not 26:00. A duration is a quantity: four hours plus four hours is eight hours, and eight hours plus twenty hours is twenty-eight hours, which is a perfectly sensible total for a week's work.

This calculator does both, and tells you which it is doing. Add or subtract time from a clock reading and the headline is a clock reading, with a day roll-over tile saying how many midnights you crossed. Ask for the time between two readings and the headline is a duration in hours, minutes and seconds, with hours free to run past 24.

Every result is also given in decimal hours, total minutes and total seconds, because those are the forms that go into timesheets, invoices and spreadsheets without further conversion.

2. Spans that cross midnight

A shift from 22:15 to 06:45 is eight and a half hours, but subtracting the two readings gives minus fifteen and three quarter hours. The calculator resolves it the way a rota does: when the end reading is earlier than the start, the end is taken to be on the following day and a full day is added to the span.

That leaves one genuinely ambiguous case — the two readings being identical. Is 09:00 to 09:00 zero minutes or a full twenty-four hours? Both are real answers, so there is a Runs past midnight checkbox to say which you mean. Tick it and identical readings give 24 hours; leave it clear and they give zero.

StartEndPast midnight?Duration
09:0017:308:30:00
22:1506:45inferred8:30:00
23:5000:10inferred0:20:00
09:0009:00no0:00:00
09:0009:00yes24:00:00

Adding to a clock reading works the same way in reverse. 21:30 plus seven hours is 04:30 with a day roll-over of +1 day; 02:00 minus four hours is 22:00 with −1 day. The reading you get is always a real time of day, and the tile tells you which day it belongs to. Turning that roll-over into an actual calendar date — and getting the month lengths and leap days right — is the date calculator's job.

3. Decimal hours, and the mistake that costs money

Payroll, invoicing and project tracking almost always want hours as a decimal, not as hours and minutes. Seven hours and forty-five minutes is 7.75 hours, because 45 ÷ 60 = 0.75. Writing it as 7.45 is the single most common timesheet error, and it understates the shift by eighteen minutes.

MinutesDecimalMinutesDecimal
50.083350.583
100.167400.667
150.25450.75
200.333500.833
250.417550.917
300.5601.0

Only 15, 30 and 45 minutes convert to a tidy decimal. Everything else recurs, which is why rounding rules exist at all — and why rounding each day before totalling a week is a bad idea. The hours calculator keeps whole seconds all the way through a weekly total for exactly that reason.

4. Noon, midnight and the 12-hour problem

The 12-hour clock has an unavoidable flaw at both ends of the day. 12:00 am is midnight and 12:00 pm is noon — the opposite of what the letters suggest, since ante meridiem means before noon and 12:00 pm is noon. Enough people get it backwards that style guides and airline schedules avoid the pair entirely, writing “12 noon” and “12 midnight”, or shifting a deadline to 11:59 pm or 12:01 am so there is nothing to misread.

Midnight has a second ambiguity that has nothing to do with notation: it sits between two days. “Closes at midnight on Friday” can mean the midnight that starts Friday or the one that ends it. ISO 8601 handles this by allowing 24:00 as an end-of-day marker for the same instant as 00:00 the next morning — the two are the same point in time, labelled from either side.

This calculator works in a 24-hour internal representation and shows you both notations in the result tiles, so you can read whichever your paperwork uses. Choose the format in the Show the result as dropdown; the input fields are native time controls, so they display in whatever convention your device is set to while holding a 24-hour value underneath.

No timezone conversion happens here Both readings are treated as times on the same clock. If you are working across timezones, convert to one zone first — and remember that a daylight saving transition makes one local day 23 or 25 hours long, so a span that crosses it will not match a wall-clock subtraction.

5. Seconds, negative spans and what gets rounded

Seconds are optional but supported throughout. The duration field takes hours, minutes and seconds independently, and none of them has to be inside its usual range: entering 90 minutes is the same as an hour and a half, and 3,600 seconds is the same as an hour. That means you can paste a figure straight out of a log or a stopwatch without converting it first.

Subtracting a longer duration than the clock reading holds simply rolls backwards past midnight rather than producing a negative time of day, and the day roll-over tile records it. Durations themselves can be negative and are shown with a leading minus sign rather than silently flipped, so a mistake looks like a mistake.

Arithmetic is done in whole seconds. Decimal hours are shown to two places, which is the precision payroll systems use, and the underlying seconds are what feed the totals — so a column of times will always add up to the total shown, even when each individual figure displays as a rounded decimal. If you need a different rounding rule, such as to the nearest quarter hour, apply it once at the end rather than to each row.

Anything that is not a unit of time — a distance, a weight, a data size read off the same log — belongs in the unit converter, which keeps the same rule of converting once rather than at every step.

6. Time Calculator FAQs

How do I add hours and minutes to a time?

Choose "Add time to a clock reading", set the starting time, then enter the hours, minutes and seconds to add. The result is given on both the 24-hour and 12-hour clock, with a day roll-over figure if the total passed midnight.

How many hours is 9:00 to 17:30?

Eight and a half hours — 8:30:00, or 8.5 decimal hours, 510 minutes, 30,600 seconds. Choose "Time between two clock readings" and enter both times to see all of those at once.

How do I work out a shift that runs past midnight?

Just enter the two readings. When the end time is earlier than the start time it is treated as the next day, so 22:15 to 06:45 returns 8 hours 30 minutes. The only case that needs the "Runs past midnight" checkbox is two identical readings, where zero and 24 hours are both valid answers.

What is 45 minutes as a decimal?

0.75 hours. Divide the minutes by 60: 15 minutes is 0.25, 30 is 0.5, 45 is 0.75. Only those three land on tidy decimals — 20 minutes is 0.333 recurring — which is why the calculator shows the decimal figure alongside hours and minutes.

Is 12:00 pm noon or midnight?

Noon. 12:00 am is midnight. Because the pair is so widely misread, deadlines are often written as 11:59 pm or 12:01 am instead, and ISO 8601 allows 24:00 as an end-of-day marker for the same instant as 00:00 the following morning.

Can I enter more than 59 minutes or 60 seconds?

Yes. The duration fields are not capped at clock ranges, so 90 minutes and 1 hour 30 minutes give the same result, and 3,600 seconds equals an hour. Paste figures straight from a log without converting them.

Does it handle timezones or daylight saving?

No — both readings are treated as times on the same clock. Convert to a single timezone first. Bear in mind that a daylight saving change makes one local day 23 or 25 hours long, so a span crossing it will not match a plain wall-clock subtraction.

Is my data sent anywhere?

No. All arithmetic runs in your browser in whole seconds. Nothing is uploaded, logged or stored, and the page works offline once it has loaded.