Clock Arithmetic: Adding and Subtracting Time of Day
How to add and subtract hours and minutes on a 24 hour clock, handle rollovers past midnight, and know when you need a full date calculator instead.
How adding time on a clock works
Time of day is a value that wraps around every 24 hours, so clock arithmetic is really arithmetic modulo one day. The cleanest way to compute it is to convert the start time into seconds since midnight, add or subtract the duration in seconds, then convert back into hours, minutes and seconds. A day has 86,400 seconds, so any total that lands outside the range from 0 to 86,399 has crossed a day boundary. This tool uses exactly that method, which keeps the result exact for both small durations and durations spanning many days.
Rolling over midnight in both directions
When a sum passes the end of the day, the clock rolls over and a new day begins, and when a subtraction dips below midnight, it borrows from the previous day. The number of whole days carried or borrowed is found by taking the total seconds and dividing by the seconds in a day, rounding down. Rounding down works cleanly for negatives too, so subtracting five hours from 02:00 borrows one day and leaves 21:00. That is why the tool can label results as next day, previous day, or several days later or earlier.
Why 24 hour time avoids mistakes
The calculator uses a 24 hour clock for both input and output, which removes the most common source of error in time math: confusing AM with PM. On a 12 hour clock, midnight and noon are both written 12:00, and it is easy to add twelve hours by mistake. In 24 hour notation, 00:00 is midnight, 12:00 is noon and 13:00 is 1 PM, each with a single unambiguous value. If your source data is in 12 hour form, convert it first: add 12 to PM hours except 12 PM, and treat 12 AM as 0.
When you need a full date calculator instead
This tool deliberately works on the time of day and a whole-day offset, not on a specific calendar date. That makes it perfect for questions like what time a shift ends or when a timer finishes, where only the clock matters. It is not the right tool when the calendar date is essential, when daylight saving time transitions shift the local clock, or when time zones are involved, because it treats every hour as a plain 60 minutes with no calendar context. For those cases, reach for a date-and-time calculator that tracks real dates and zone rules.