How the Time Calculator Works
The time calculator has two modes. Add/subtract mode starts with one clock time, converts the duration to seconds, adds or subtracts that duration, and wraps the result around the 24-hour clock. Time-difference mode compares two clock times and returns elapsed hours, minutes, seconds, total minutes, decimal hours, and whether the interval crossed midnight.
Time arithmetic uses a mixed-radix system: 60 seconds in a minute, 60 minutes in an hour, and 24 hours in a day. Converting to seconds internally prevents carry mistakes such as treating 90 minutes as 0.90 hours or forgetting that 23:30 plus 2 hours lands at 01:30 the next day.
Worked Examples
| Scenario | Inputs | Result |
|---|---|---|
| Add time | 09:00 + 1 hour 30 minutes | 10:30:00 AM |
| Subtract time | 02:00 - 5 hours | 9:00:00 PM, previous day |
| Difference | 22:00 to 06:00 | 8 hours, next day |
Decimal Hours for Timesheets
Decimal hours convert minutes to fractions of an hour. Fifteen minutes is 0.25 hours, 30 minutes is 0.50 hours, and 45 minutes is 0.75 hours. This is useful for billing and timesheet worksheets, but employers may use rounding rules or payroll policies that differ from the exact elapsed time shown here.
Limits and Time Zone Notes
All times are interpreted as local clock times. If you are comparing events in different time zones, convert both to the same zone first or use the time zone converter. During daylight-saving changes, wall-clock time and real elapsed time can differ by an hour because a local hour may be skipped or repeated.
