How long did that take? It sounds like the simplest question about time there is — start a stopwatch, stop it, read the number. Yet measuring elapsed time correctly trips up everyone from casual users adding up hours in a spreadsheet to seasoned programmers timing their code. The pitfalls hide in plain sight: clocks that jump backward, minutes that refuse to add up past 60, and the slippery difference between a point in time and a length of time.
This guide untangles it. We will separate the two fundamentally different things people mean by "time", explain why the clock on your wall is the wrong tool for measuring duration, and walk through adding durations together without the classic base-60 mistakes.
A moment is not a duration
The single most important distinction in all of timekeeping is between a moment and a duration. A moment is a point on the timeline — "3:47pm", "the launch", "when the race started". A duration is a length — "90 minutes", "3.2 seconds", "two working weeks". They are as different as a location and a distance.
Elapsed time is always a duration, and you get it by subtracting one moment from another. The finish moment minus the start moment gives the elapsed duration. Keeping these two ideas separate in your head — and in any spreadsheet or program — prevents a whole category of errors. A duration calculator works entirely in this "moment minus moment equals duration" logic.
Why you must not trust the wall clock
Here is the trap that catches programmers. To measure how long something took, the obvious approach is to read the clock at the start and again at the end and subtract. But the everyday "wall clock" — the one showing the local time of day — is not stable. It can jump.
- Daylight saving shifts it forward or back by an hour twice a year.
- Manual or network time corrections can nudge it in either direction at any moment.
- Leap seconds occasionally add a second.
- If the clock jumps backward mid-measurement, your elapsed time can come out negative — an event that appears to finish before it began.
Adding durations: the base-60 problem
Durations in hours, minutes, and seconds do not add up like ordinary decimal numbers, because time is base 60: 60 seconds make a minute, 60 minutes make an hour. Add 45 minutes to 30 minutes and the answer is not "75 minutes" left as-is — it is 1 hour and 15 minutes.
Add each unit separately
Sum the seconds, sum the minutes, sum the hours, keeping them in their own columns for now.
Carry seconds into minutes
If the seconds total 60 or more, subtract 60 and carry 1 into the minutes. Every full 60 seconds becomes a minute.
Carry minutes into hours
Do the same at the minute level: every 60 minutes becomes an hour.
Read off the tidy result
What remains is a properly normalised duration, like 2h 05m 30s rather than an untidy 1h 65m 30s.
| Step | Hours | Minutes | Seconds |
|---|---|---|---|
| First duration | 1 | 45 | 50 |
| Second duration | 0 | 40 | 25 |
| Raw sum | 1 | 85 | 75 |
| Carry seconds (75 = 60+15) | 1 | 86 | 15 |
| Carry minutes (86 = 60+26) | 2 | 26 | 15 |
Precision: seconds, milliseconds, and beyond
How finely you measure depends on the job. A cooking timer needs whole minutes; a runner's stopwatch wants hundredths of a second; a program profiling its own speed may measure in microseconds or nanoseconds. Choosing the right precision matters — measuring a two-hour hike in milliseconds is false precision, while timing code in whole seconds is uselessly coarse.
There is also a difference between resolution (the smallest unit displayed) and accuracy (how close to the truth the measurement is). A stopwatch showing hundredths is not accurate to hundredths if the human thumb pressing it has a reaction time of a couple of tenths — a fact every hand-timed sport has to reckon with.
Stopwatch vs timestamp subtraction
There are two practical ways to measure elapsed time, and they suit different situations.
✓ The upside
- A stopwatch is perfect for live, in-the-moment timing — a workout, a presentation, a cooking step
- Timestamp subtraction is ideal after the fact — you have a start time and an end time and want the gap
- Timestamps let you measure durations you did not plan in advance to time
- Subtracting two unix timestamps gives an exact elapsed time in seconds
✕ The catch
- A stopwatch requires you to remember to start and stop it
- Timestamp subtraction inherits any wall-clock jumps if you use the wrong clock
- Hand-operated stopwatches carry human reaction-time error
- Both need a clear decision about precision up front
Telling the time answers "when?". Measuring elapsed time answers "how long?". They feel similar, but they need different clocks and different maths.
Where measuring elapsed time matters
- Sport and fitness — race times, splits, interval training, rest periods.
- Billing — professionals billing by the hour need accurate, addable durations.
- Software performance — response times and processing durations, always measured on a monotonic clock.
- Cooking and process work — timers for steps that must not run long or short.
- Project tracking — totalling time spent across many sessions, which feeds into project timelines.
Rounding: the quiet source of disputes
How you round a duration can matter as much as how you measure it. Bill in 15-minute increments and a 2-minute call becomes a quarter-hour charge; round to the nearest minute and a 90.4-second task becomes 90 seconds. Neither rule is wrong, but it must be agreed in advance, because different conventions applied to the same raw times produce noticeably different totals over a month of work.
The safe practice is to store the most precise measurement you have and round only at the final display or billing step — never round early and then add the rounded values together, since those small errors compound. It mirrors the golden rule for time zones: keep the precise value internally, and simplify only at the very last moment, when a human or an invoice actually needs the number.
The same discipline applies to unit conversion. If you convert seconds into hours for display and then add up those rounded hours, you throw away precision the original seconds held perfectly. Sum in the smallest unit you actually captured, and convert once, right at the end — never partway through.
- A moment is a point in time; a duration is a length. Elapsed time is a duration: end moment minus start moment.
- Never measure durations with the wall clock — it jumps for daylight saving and corrections. Use a monotonic clock.
- Durations are base 60: carry every 60 seconds into a minute and every 60 minutes into an hour.
- Match your precision to the task, and remember resolution is not the same as accuracy.
- Use a stopwatch for live timing and timestamp subtraction for measuring after the fact.