⏱️ Time Calculator
Add or subtract durations in hours, minutes, and seconds seamlessly.
Adding and subtracting time without wrestling a spreadsheet
Time arithmetic is base-60 inside base-24, which is why it goes wrong. Adding 2:45 and 3:30 gives 5:75 if you treat it as decimals, and 6:15 if you carry at sixty. Every error in a timesheet comes from one of those two conversions.
The reliable method: convert, calculate, convert back
- Turn every duration into seconds, or into minutes if seconds are not involved.
- Add or subtract the plain numbers.
- Convert back by dividing: seconds by 3,600 for whole hours, the remainder by 60 for minutes, and what is left is seconds.
2:45:30 plus 1:38:45 becomes 9,930 + 5,925 = 15,855 seconds. Divide by 3,600 to get 4 hours with 1,455 left over; divide that by 60 to get 24 minutes with 15 seconds remaining. Answer: 4:24:15.
Decimal hours versus hours and minutes
Payroll systems almost always work in decimal hours, and this is where most mistakes happen. 7 hours 30 minutes is 7.5 hours, but 7 hours 15 minutes is 7.25, not 7.15. To convert, divide the minutes by 60:
| Minutes | Decimal | Minutes | Decimal |
|---|---|---|---|
| 5 | 0.083 | 35 | 0.583 |
| 10 | 0.167 | 40 | 0.667 |
| 15 | 0.250 | 45 | 0.750 |
| 20 | 0.333 | 50 | 0.833 |
| 25 | 0.417 | 55 | 0.917 |
| 30 | 0.500 | 60 | 1.000 |
Writing 7.45 when you mean 7 hours 45 minutes understates the time by 30 minutes, since 7:45 is 7.75 hours. On a weekly timesheet that one habit can lose several hours of pay.
Crossing midnight
A shift from 22:00 to 06:00 appears to be minus sixteen hours if you subtract naively. Add 24 hours to the end time when it is earlier than the start: 06:00 becomes 30:00, and 30:00 − 22:00 = 8 hours. Any calculation that spans midnight needs this adjustment, which is why overnight shifts are a common source of payroll errors.
12-hour and 24-hour clocks
The two awkward cases are noon and midnight. 12:00 AM is midnight, the start of the day, and 12:00 PM is noon. For afternoon times, add 12 to convert to 24-hour: 3:45 PM is 15:45. For morning times the hour is unchanged, except 12 AM which becomes 00. Many style guides recommend writing noon and midnight in words precisely because the AM and PM forms are so often inverted.
Daylight saving
Twice a year a day is 23 or 25 hours long. In spring the clocks skip an hour, so a time like 02:30 does not exist; in autumn an hour repeats, so 01:30 happens twice. Any duration calculated across a transition in local time will be out by an hour unless the calculation is done in UTC and converted at the end. This is standard practice in software for exactly this reason.
A worked example
A week of shifts: 7:45, 8:30, 6:15, 9:00 and 7:20. In minutes: 465 + 510 + 375 + 540 + 440 = 2,330 minutes. That is 38 hours and 50 minutes, or 38.83 decimal hours. At $22.50 an hour the gross is $873.75. Recording the same week as 7.45 + 8.30 + 6.15 + 9.00 + 7.20 = 38.10 hours would lose $16.43.
Frequently Asked Questions (FAQs)
How do I convert minutes to decimal hours?
Divide by 60. Fifteen minutes is 0.25 hours, twenty minutes is 0.333, and forty-five is 0.75. The common error is writing the minutes after the decimal point, which treats 45 minutes as 0.45 of an hour and loses 18 minutes.
How do I calculate hours across midnight?
Add 24 hours to the finish time when it is earlier than the start time, then subtract. A shift from 23:00 to 07:00 becomes 31:00 − 23:00 = 8 hours. Without the adjustment you get a negative number.
Is 12 AM midnight or noon?
12 AM is midnight and 12 PM is noon. AM means ante meridiem, before midday, so the hour starting at midnight is AM. The convention confuses almost everyone, which is why timetables usually write 00:00 and 12:00 or spell the words out.
How many seconds are in a day?
86,400 under normal circumstances. Occasionally a leap second is added to keep atomic time aligned with the Earth's rotation, making a day 86,401 seconds. The practice is due to be discontinued by 2035.
Why does my timesheet total differ from my manual count?
Usually decimal conversion. Check whether 7 hours 30 minutes was entered as 7.5 or as 7.30. Also check whether breaks are deducted automatically, and whether overnight shifts have been handled across the midnight boundary.
How do I handle time zones?
Convert both times to UTC, do the arithmetic, then convert the result back. Calculating durations directly in local time breaks across daylight saving transitions and across any period where either zone changed its offset.