The problem: time units do not convert cleanly
Adding two durations seems straightforward. Two hours thirty minutes plus one hour forty-five minutes is four hours fifteen minutes. You carry the overflow when minutes exceed 60, same way you carry when ones exceed 10 in decimal addition. Base-60 arithmetic, inherited from the Sumerians 4,000 years ago, still works.
The trouble starts when you mix units. How many seconds are in a month? The question has no single answer. January is 31 days (2,678,400 seconds). February is 28 days (2,419,200 seconds) or 29 days (2,505,600 seconds) in a leap year. April is 30 days (2,592,000 seconds). The average Gregorian month is 30.44 days, which is 2,629,746 seconds. That is what the Duration Calculator uses as its conversion factor for months. It is correct in aggregate — over a long enough period, months average out to 30.44 days — and wrong for any specific month. If you add one "month" in seconds to January 31, you land on March 2, not February 28. That is because you added 30.44 days worth of seconds, not one calendar month.
The same problem applies to years. The tool uses 31,556,952 seconds (365.25 days), which accounts for leap years on average. A specific non-leap year is 31,536,000 seconds. A specific leap year is 31,622,400 seconds. The average is close enough for most calculations and off by up to 43,200 seconds (12 hours) for any specific year.
The Duration Calculator handles this by converting everything to seconds, doing the arithmetic in one unit, and converting back. It has seven modes: add and subtract durations, convert between units, calculate elapsed time between timestamps with break subtraction, track work hours with overtime, detect overlapping time intervals, solve speed-distance-time problems, and find meeting times across timezones. Each mode solves a specific time-arithmetic problem that people get wrong when they do it by hand.
Fastest path
Open the Duration Calculator and pick a mode from the tab bar. For adding or subtracting durations, enter each duration as hours, minutes, and seconds in a row, choose add or subtract, and the running total appears at the bottom. For unit conversion, enter a value, pick the source and target units, and read the result. For timestamp gaps, enter start and end date-times and optional break duration. For work hours, enter clock-in and clock-out times per day with breaks, and the tool computes weekly totals and overtime. For overlap, enter two intervals and the tool shows the intersection or gap. For speed-distance-time, enter two of the three values and the tool solves for the third. For meetings across timezones, add participants with their IANA timezone names and the tool shows each person's local time for the proposed meeting slot.
Duration arithmetic: base-60 carry
Adding durations is not decimal addition. When you add 45 minutes to 30 minutes, you get 75 minutes, which normalizes to 1 hour 15 minutes. The tool converts each row to total seconds, sums or subtracts, then converts back to days, hours, minutes, and seconds for display. This avoids carry errors entirely — working in a single unit (seconds) and only breaking into H:M:S for presentation.
Subtraction works the same way but has a guard against negative results. If you subtract a larger duration from a smaller one, the tool shows the absolute value with a note that the result is negative. This matters for real use cases: if you scheduled 3 hours for a task and it took 4 hours 20 minutes, the overrun is 1 hour 20 minutes, not a negative duration.
The tool exports results as CSV — useful when you are summing time logs for billing or timesheets.
Unit conversion: the seven factors
The tool converts between eight time units using seconds as the common base:
- 1 millisecond = 0.001 seconds
- 1 second = 1 second
- 1 minute = 60 seconds
- 1 hour = 3,600 seconds
- 1 day = 86,400 seconds
- 1 week = 604,800 seconds
- 1 month = 2,629,746 seconds (30.44 days, the Gregorian average)
- 1 year = 31,556,952 seconds (365.25 days, accounting for leap years)
The first six are exact. The last two are averages. This is the only honest way to handle the conversion because months and years do not have fixed lengths. If someone tells you a month is exactly 30 days, they are wrong 11 out of 12 times.
Interval overlap: max of starts, min of ends
The overlap mode answers a common scheduling question: do two time ranges intersect, and if so, for how long? The math is simple and worth knowing. Given two intervals, A (startA, endA) and B (startB, endB):
overlapStart = max(startA, startB)
overlapEnd = min(endA, endB)
overlap = overlapEnd - overlapStart (if positive)
gap = startB - endA (if B starts after A ends)
If overlapEnd is less than or equal to overlapStart, there is no overlap — the intervals are disjoint, and the gap is the difference. The tool shows both the overlap duration and a visual timeline so you can see the relationship at a glance.
This is the same algorithm used in calendar systems, scheduling software, and database range queries. The max-of-starts, min-of-ends pattern is the fundamental operation for interval intersection.
Speed, distance, and time: the triangle
The speed-distance-time relationship is a triangle with three formulas:
- Speed = Distance / Time
- Distance = Speed x Time
- Time = Distance / Speed
The tool solves for whichever variable you leave blank. It does all calculations in SI units (meters, meters per second) and converts to your selected display units (kilometers, miles, meters, feet). Pace is shown alongside speed for runners — minutes per kilometer or minutes per mile, computed as the reciprocal of speed.
The conversion between kilometers and miles is exact (1 mile = 1,609.344 meters). The tool does not approximate. Pace calculations inherit the precision of the speed calculation, so a 5-minute kilometer (12 km/h) shows as 8:02 per mile, not 8:00.
Work hours and overtime
The work hours mode tracks clock-in and clock-out times for each day of the week, subtracts break time, and computes daily and weekly totals. Overtime is calculated against a target you set — if you enter 40 hours as the target and the week totals 44 hours 30 minutes, the tool shows 4 hours 30 minutes of overtime and a progress bar at 111 percent.
Break subtraction matters. If you clock in at 9:00, take a 45-minute lunch, and clock out at 17:30, your worked time is 7 hours 45 minutes, not 8 hours 30 minutes. The tool subtracts breaks from the gross time between clock-in and clock-out. People who track time by subtracting end from start without accounting for breaks consistently over-report their hours.
Meeting across timezones
The timezone mode takes a proposed meeting time in one timezone and shows the equivalent local time for participants in other timezones. It uses IANA timezone identifiers (America/New_York, Europe/London, Asia/Kolkata) and computes UTC offsets using the JavaScript Intl API.
The critical detail: UTC offsets are not fixed. New York is UTC-5 during standard time (November to March) and UTC-4 during daylight saving time (March to November). The tool computes the offset at the date and time of the proposed meeting, not at the current date. This matters when scheduling meetings weeks in advance — the offset on the meeting date may differ from the offset today, especially around DST transition dates, which happen on different days in different countries.
Gotchas
- Average month and year lengths are approximations. The tool uses 30.44 days per month and 365.25 days per year. These are correct for aggregate calculations (how many seconds in 12 months) and wrong for specific calendar periods (how many seconds from January 1 to February 1). For calendar date arithmetic — adding a month to a date, finding the days between two calendar dates — use the Date Difference Calculator instead.
- The overlap mode assumes closed intervals. If interval A ends at 10:00 and interval B starts at 10:00, the tool reports zero overlap (they touch but do not overlap). Some scheduling systems treat this as a one-second overlap. The tool does not. If you need inclusive endpoint handling, add one second to the end time.
- Speed calculations use SI internally and convert for display. Entering 60 mph and 2 hours gives 120 miles. The tool converts 60 mph to 26.82 m/s, multiplies by 7,200 seconds, gets 193,104 meters, and converts back to 120 miles. Floating-point rounding can cause tiny discrepancies in the last decimal place, but the displayed result is rounded to a sensible precision.
- Work hours do not handle overnight shifts. If you clock in at 22:00 and clock out at 06:00, the tool interprets this as a negative 16 hours (06:00 is before 22:00 on the same day). For overnight shifts, enter the clock-out time as the next day. The tool's day-by-day input does not have a "crosses midnight" flag.
- Timezone offsets around DST transitions are ambiguous. When clocks spring forward (March in the Northern Hemisphere), one hour does not exist. When clocks fall back (November), one hour repeats. A meeting scheduled for 2:30 AM on a spring-forward day is invalid in timezones that observe DST. The tool does not flag this — it computes the offset and shows a time, but that time may not exist.
Summary
- Duration arithmetic uses base-60 carry math for hours, minutes, and seconds. The tool converts everything to seconds, does the arithmetic in one unit, and converts back. This eliminates carry errors but means months and years use average lengths (30.44 days, 365.25 days) that are correct in aggregate and wrong for specific calendar periods.
- Unit conversion uses seconds as the common base with eight units from milliseconds to years. The first six factors are exact. Months and years are averages. If someone says a month is 30 days, they are wrong 11 out of 12 times.
- Interval overlap detection uses the max-of-starts, min-of-ends pattern. If the result is positive, the intervals overlap. If it is zero or negative, they are disjoint and the gap is the difference. This is the same algorithm used in database range queries and calendar systems.
- Speed-distance-time is a triangle with three formulas. The tool solves for whichever variable you leave blank, does calculations in SI units, and converts for display. Pace is the reciprocal of speed.
- For calendar date arithmetic (adding a month to a date, days between two dates), use the Date Difference Calculator. For Unix timestamp conversion, use the Unix Timestamp Converter. For epoch-to-date conversion with four unit support, use the Epoch to Date Converter. Use the Duration Calculator for time arithmetic, unit conversion, overlap detection, work hours, and speed-distance-time.