Everyday

Time Calculator

Add and subtract durations, or find the gap between two times — including spans that cross midnight.

Free, no sign-up Updates as you type Formula shown below
What do you need?
h
m
s
h
m
s
Result
In decimal hours
Total minutes
In other units
Advertisement

Why time arithmetic is awkward

Time is base 60, not base 10, which is why you cannot simply add the digits. 2:45 plus 1:30 is not 3:75 — the 75 minutes carries into the hours, giving 4:15.

Convert everything to seconds → add or subtract → convert back
Hours to seconds
× 3600
Minutes to seconds
× 60
Back to h:m:s
÷ 3600 for hours, remainder ÷ 60 for minutes
2h 45m plus 1h 30m
Convert. 2×3600 + 45×60 = 9,900 seconds. 1×3600 + 30×60 = 5,400 seconds.
Add. 9,900 + 5,400 = 15,300 seconds.
Convert back. 15,300 ÷ 3600 = 4 hours, remainder 900 seconds = 15 minutes.
Result: 4h 15m 0s
Or 4.25 hours in decimal, and 255 minutes in total.

The base-60 system reaches us from Babylonian astronomy, which used it because 60 divides evenly by 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30 — convenient before decimal fractions existed.

Decimal hours for payroll

Payroll systems and invoices almost always use decimal hours, because multiplying 7.75 by an hourly rate is straightforward while multiplying 7h 45m is not.

Decimal hours = Hours + (Minutes ÷ 60) + (Seconds ÷ 3600)
Minutes to decimal.
MinutesDecimalMinutesDecimal
50.083350.583
100.167400.667
150.250450.750
200.333500.833
250.417550.917
300.500601.000
The classic payroll error is treating minutes as decimals. Entering 7h 45m as 7.45 rather than 7.75 underpays by 18 minutes per shift. Across a year of five-day weeks that is roughly 39 hours of unpaid work.
Advertisement

Spans that cross midnight

A shift from 22:00 to 06:00 is eight hours, but naive subtraction gives −16. The fix is to add 24 hours to the end time when it is earlier than the start.

If end < start: duration = (end + 24h) − start

Tick "crosses midnight" above to apply this. For calculating worked hours with breaks and overtime across a week, the time card calculator is purpose-built for it, and the hours calculator handles a single span.

Frequently asked questions

How do I add hours and minutes?

Convert both durations to seconds, add them, then convert back. 2h 45m plus 1h 30m is 9,900 + 5,400 = 15,300 seconds, which is 4h 15m.

Adding the digits directly gives 3:75, which is not a valid time.

How do I convert minutes to decimal hours?

Divide by 60. So 45 minutes is 45 ÷ 60 = 0.75 hours, and 7h 45m is 7.75 decimal hours.

This is the format payroll systems expect, and getting it wrong is a common source of underpayment.

How do I calculate hours across midnight?

Add 24 hours to the end time before subtracting. From 22:00 to 06:00 becomes 30:00 − 22:00 = 8 hours.

Tick the "crosses midnight" option above and the calculator handles it.

Why is time base 60?

It comes from Babylonian astronomy via ancient Sumer. Sixty was chosen because it divides evenly by 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30 — very useful before decimal fractions were available.

The same system gives us 360 degrees in a circle.

This is an estimate, not advice. Results depend on the assumptions above and your own circumstances. Check figures with a qualified professional before acting on them. Read the full disclaimer.
Advertisement