Duration Calculator

Measure the span between two timestamps, then decide what actually counts. Drop breaks, keep only working hours, round to your billing unit, and copy the figure your timesheet wants.

Duration calculator

Start-
End-
--
Nothing counted yet

Full elapsed span counted, wall clock to wall clock.

00:00:00hours : minutes : seconds

Nothing counted yet

Payroll decimal hours: 0.00 h

The same span, smallest unit to largest

  • Seconds0
  • Minutes0
  • Hours0.00
  • Days0.00
  • Weeks0.00
  • Months0.00
  • Years0.00

Months and years use the mean Gregorian length, 30.44 and 365.24 days, because a duration with breaks removed is no longer tied to specific calendar dates.

What counts

Days that count
Plain EnglishNothing counted yet
HH:MM:SS00:00:00
Decimal hours0.00 hours
ISO 8601PT0S

Elapsed time and counted time are two different numbers

A shift that runs 09:00 Monday to 17:30 Tuesday covers 32.5 hours of elapsed time. Almost nobody gets paid for 32.5 hours. The gap between those two figures is where most timesheet arguments start.

This calculator reports both. The rail near the top draws the whole elapsed span, and the filled portion shows how much of it survived your rules. Turn on working hours and the fill shrinks to the slice that fell inside your day. Add break minutes and the total drops further. Pick a rounding unit and the figure snaps to the increment your invoice template expects.

The headline reads as HH:MM:SS and keeps counting past 24 hours rather than wrapping, so a 49-hour span shows 49:12:00 instead of the misleading 01:12:00 you get from tools that format with a date object.

Reading the rail

The striped track is the raw span between your two timestamps. The gradient fill is what the calculator counted. When both fill the whole track, no rules are active and you are looking at plain elapsed time.

How to work through a span

  1. Set the start timestamp. Use Set to now if you are timing something that just began.
  2. Set the end timestamp, or switch on Run live to pin the end to the current second and watch the total climb.
  3. Enter break minutes if part of the span was unpaid.
  4. Switch on Count working hours only for spans that cross evenings or weekends, then set the day window and which weekdays count.
  5. Choose a rounding unit that matches your billing agreement.
  6. Copy the format your destination wants: plain English for an email, decimal hours for payroll, ISO 8601 for an API field.

Every setting lives in the URL. Press Share this setup and the link carries your timestamps, breaks, rounding, shift window, and working days, so a reviewer opens the same calculation rather than a screenshot of it.

Which output format belongs where

FormatLooks likeUse it for
Plain English2 days, 3 hours, 20 minutesClient emails, status notes, anything a person reads once
HH:MM:SS51:20:00Shift logs, stopwatch records, support response times
Decimal hours51.33 hoursPayroll systems, spreadsheets, hourly rate multiplication
ISO 8601P2DT3H20MAPI payloads, calendar records, database duration columns

Decimal hours is the one people get wrong by hand. Three hours and twenty minutes is 3.33 hours, not 3.20. Multiply an hourly rate by 3.20 and you have underpaid by eight minutes on every line of the invoice.

Where this tool stops

A few limits are worth knowing before you rely on the output.

  • Public holidays are not modelled. Working-hours mode filters by weekday and time of day only. A span crossing a national holiday will count that day as ordinary working time. For deadlines that skip holidays, use the Business Days Calculator instead.
  • Months and years in the ledger are averages. Calendar months run from 28 to 31 days, so a duration cannot convert to them exactly once breaks are removed. Those two rows divide by the mean Gregorian month and year, which is right for reporting a rough scale and wrong for anniversary math. When you need the real calendar count between two dates, use the Date Difference Calculator.
  • One shift window per day. Split shifts, such as 09:00 to 13:00 then 17:00 to 21:00, need two separate calculations added together.
  • Everything runs in your device time zone. Both timestamps are read in the zone your browser reports. To compare moments in two different zones, convert them first with the Timezone Converter.
  • Seconds resolution. The inputs step in minutes and the readouts stop at whole seconds. Sub-second timing belongs in a Stopwatch, not a datetime field.
  • Live mode follows your system clock. Laptop clocks drift by a few hundred milliseconds between NTP syncs. Fine for a work session, not for anything you would defend in an audit.
Daylight saving: when a span crosses a clock change, elapsed time and wall clock time disagree by an hour. A shift logged 23:00 to 07:00 across a spring-forward night is seven real hours, not eight. This calculator reports real elapsed time and shows a note when it detects the crossing. Check your payroll policy, because some contracts pay the wall clock figure instead.

Three spans people actually measure

An overnight support shift

Start 22:00 Friday, end 06:30 Saturday, 45 minutes of break. Leave working hours off, because the whole shift is paid. The result is 7 hours 45 minutes, or 7.75 decimal hours. Copy the decimal value straight into the payroll column.

A ticket response time

Start when the ticket landed at 16:40 Friday, end when an engineer replied at 10:15 Monday. Raw elapsed time is 65.6 hours, which looks terrible in a report. Switch on working hours with a 09:00 to 17:00 window, Monday to Friday, and only two slices count: 20 minutes on Friday afternoon and 75 minutes on Monday morning. The total lands at 1 hour 35 minutes, and that is the number your service level agreement is measured against.

A freelance work block

Start when you opened the file, then switch on Run live and let the end track the clock. When you finish, untick it, enter your break minutes, and round to the nearest 6 minutes. The ISO 8601 value drops cleanly into a time tracking API, and the plain English line goes in the client email.

For adding a fixed offset to a date rather than measuring between two, reach for Add Time to Date. For counting whole calendar days, the Date Difference Calculator is the better fit.

Duration calculator questions

Rounding, working hours, daylight saving, and what the numbers include.

Why does my total differ from a plain subtraction of the two times?

Break minutes, working hours mode, and rounding all reduce the raw span. The rail under the inputs shows the gap: the striped track is the full elapsed time and the filled portion is what was counted. Clear the break field, switch off working hours, and set rounding to none, and the total matches a plain subtraction exactly.

How does working hours mode decide what to count?

It walks the span one calendar day at a time. On each day that you marked as a working day, it takes the overlap between your span and the day window you set, then adds those slices together. Evenings, nights, and unmarked weekdays contribute nothing.

What happens when the span crosses a daylight saving change?

The calculator reports real elapsed time, so a spring-forward night is one hour shorter than the wall clock suggests and an autumn night is one hour longer. A note appears above the rail whenever a crossing is detected, with the size of the shift, because some payroll agreements pay the wall clock figure instead.

Why is three hours and twenty minutes shown as 3.33 hours?

Decimal hours divide by 60, not by 100. Twenty minutes is a third of an hour, so it becomes 0.33. Typing 3.20 into a payroll sheet shortens the entry by eight minutes, which is the single most common manual timesheet error.

Which rounding increment should I pick?

Match your agreement rather than your preference. Legal and consulting work usually bills in 6 minute units, which map to clean tenths of an hour. Agencies and contractors often use 15 minutes. If nothing is specified, leave rounding off and report the exact figure.

Does Run live keep counting if I switch tabs?

The end value is read from your system clock on every tick, so the total stays correct even when a background tab is throttled. Nothing is stored, though. Reloading the page starts fresh, so copy or share the result before you close it.

Can I share a calculation with someone else?

Press Share this setup. The link carries both timestamps plus your break minutes, rounding unit, shift window, and working days. Anyone opening it lands on the identical calculation, which settles most invoice disputes faster than a screenshot.

Does the tool handle an end time earlier than the start?

Yes. The span is measured backward and reported as a positive length, with a note explaining that the order was reversed. Use the swap button between the two cards if you would rather fix the input order.