Education
Time Calculator
Pick a mode, enter your times or durations, and the calculator returns the answer in H:MM, H:MM:SS, decimal hours, total minutes, and total seconds. Supports overnight rollover and day offsets when the result crosses midnight.
Mode
If end is before start, the calculator rolls past midnight.
Duration
8h 30m
8:30 in H:MM · 8:30:00 in H:MM:SS
Examples
9:00 to 17:30
= 8h 30m · 8:30 H:MM · 8.5 decimal hours
9:00 PM to 6:00 AM (overnight)
= 9h 0m
9:00 AM + 4h 15m
= 1:15 PM (same day)
1h 30m + 2h 45m
= 4h 15m
How it works
All three modes use the same idea: convert times and durations to a common unit (seconds), do the arithmetic, then convert back. Clock arithmetic also uses modular math so the result wraps cleanly across midnight.
Time between two clock times
duration = end − start (mod 24h if end < start)
Add / subtract a duration to a clock time
new clock = (start ± duration) mod 24h
day offset = floor((start ± duration) ÷ 24h)
Add / subtract two durations
total = A ± B (no wrap; can exceed 24h or be negative)
Internally each value is stored as total seconds. The display formats convert back to H:MM, H:MM:SS, decimal hours, total minutes, and total seconds.
What the calculator does
The time calculator answers three common questions in one place: how long is it from one clock time to another, what clock time do you reach by adding or subtracting a duration, and what do two durations add up to (or how do they differ). The result panel returns the answer in several common formats so you can copy whichever one fits your use case.
Time between two clock times
Pick the first mode, enter the start and end times, and the calculator returns the duration. If the end time is earlier than the start time, the calculator treats the gap as overnight: 9:00 PM to 6:00 AM resolves to 9 hours. The breakdown shows the duration as hours and minutes, in H:MM and H:MM:SS, and as decimal hours, plus an overnight flag when the result crossed midnight.
Add or subtract a duration from a clock time
Pick the second mode, enter a clock time, choose add or subtract, then enter the duration in hours and minutes (with optional seconds). The result is the new clock time in both 12-hour and 24-hour formats, plus a day offset when the result crosses midnight. Adding 25 hours to 9:00 AM gives 10:00 AM the next day; subtracting 12 hours from 9:00 AM gives 9:00 PM the previous day.
Add or subtract two durations
Pick the third mode, enter both durations in hours, minutes, and seconds, and pick add or subtract. The result is the combined duration. If subtraction produces a negative duration, the calculator shows the absolute value with an explicit note that the second duration is longer.
Output formats
- H:MM: standard clock-style format. 8h 30m shows as 8:30.
- H:MM:SS: same with seconds. 8h 30m 0s shows as 8:30:00.
- Decimal hours: duration as a single decimal. 8h 30m = 8.5 hours. Used in payroll and billing.
- Total minutes and total seconds: handy when the rest of your workflow is in those units.
- 12-hour and 24-hour clock: for Mode 2 results, both formats are shown alongside the day offset.
Worked examples
- 9:00 to 17:30: 8h 30m, or 8.5 decimal hours.
- 9:00 PM to 6:00 AM (overnight): 9h 0m.
- 9:00 AM + 4h 15m: 1:15 PM the same day.
- 9:00 AM + 25h 0m: 10:00 AM the next day.
- 1h 30m + 2h 45m: 4h 15m.
- 1h 30m − 2h 45m: −1h 15m (B is longer than A).
Time calculator vs time card calculator
The two are easy to confuse. The simplest way to keep them apart:
- This page is for general time math: durations between two times, clock arithmetic, and summing durations. It does not deal with breaks, pay, or weekly totals.
- Time card calculator is a weekly payroll workflow: shift-by-shift start, end, and break for each day, then paid hours, overtime, and gross pay.
For deeper pay math, see the overtime calculator. For age or date math between two calendar dates, use the chronological age calculator. For converting a word count into estimated speaking time, use the words to minutes calculator.
Common mistakes
- Subtracting clock times directly without rolling past midnight when the end time is earlier than the start.
- Confusing decimal hours with HH:MM. 1.5 is 1h 30m, not 1h 50m.
- Adding hours and minutes without converting carryovers. 45 minutes plus 30 minutes is 1h 15m, not 75m written as a clock time.
- Comparing two times across time zones or across daylight saving boundaries with plain clock math. Convert to one reference frame first.
- Treating a negative duration as wrong. It just means the second value is larger than the first; the magnitude is still the answer.
Related tools
- Time card calculator for shift-by-shift weekly hours, breaks, overtime, and gross pay.
- Overtime calculator for regular and overtime pay at any multiplier.
- Chronological age calculator for the gap between two calendar dates in years, months, and days.
- Words to minutes calculator for converting a word count or script into speaking time.
- All education calculators.
Note. All math is done in plain clock time with no time zone or daylight saving adjustment. If you need to compare times across zones or DST boundaries, convert to a single reference time first and then run the calculator.
Frequently asked questions
Subtract the start time from the end time. The simplest way to do it by hand is to convert both times to minutes since midnight, subtract, then convert back. For example, 9:00 to 17:30 is 17 × 60 + 30 − (9 × 60) = 1050 − 540 = 510 minutes, which is 8 hours 30 minutes. The calculator does this for you.
If the end time is earlier than the start time, the calculator rolls past midnight. For example, 9:00 PM to 6:00 AM is treated as 9 hours, not negative 15 hours. The result panel flags overnight results so the rollover is explicit.
Convert the clock time to minutes since midnight, add the duration in minutes, then take the remainder when divided by 1440 (the number of minutes in a day) to get the new clock time. The calculator also reports how many days the result crosses, so adding 25 hours to 9:00 AM gives 10:00 AM the next day.
Same as addition, but with a negative shift. If the result goes below zero, the calculator wraps backward across midnight and shows a negative day offset, for example a result on the previous day.
Add the total seconds of each duration and convert back to hours, minutes, and seconds. 1h 30m + 2h 45m = 4h 15m. Durations can be longer than 24 hours; the calculator does not wrap them.
Subtract the total seconds. If the second duration is longer than the first, the result is negative; the calculator shows that explicitly and tells you which side is longer.
Decimal hours expresses a duration as a single decimal number instead of hours and minutes. 1h 30m is 1.5 decimal hours, 8h 15m is 8.25 decimal hours. Payroll, billing, and time-tracking software often use decimal hours so durations are easy to multiply by an hourly rate.
This page is general time math: clock arithmetic, duration math, and unit output. The time card calculator is a payroll workflow that tracks shifts and breaks across a week and totals paid hours, overtime, and gross pay. Use the time card calculator when you need a weekly schedule with pay; use this calculator for one-off time math.
Yes for durations. Add or subtract durations supports hours, minutes, and seconds. Clock time math accepts an optional seconds component too. Time between two times uses the clock fields the browser provides, which default to HH:MM.
No. All math is done in plain clock time without time zone or daylight saving adjustments. If you need to convert across time zones, do that conversion first and then run the time math.
Related calculators
Education
Final Grade Calculator
Calculate your final course grade from your current grade and your final exam score.
Education
Weighted Grade Calculator
Combine assignments, quizzes, and exams by weight to get a precise weighted course average.
Education
Final Exam Calculator
Find out exactly what you need to score on your final exam to hit your target course grade.