{{ summaryTitle }}
{{ summaryValue }}
{{ summarySubtitle }}
{{ badge.label }}
{{ startPreviewText }}
{{ endPreviewText }}
{{ basePreviewText }}
{{ deltaPreviewText }}
{{ warning }}
{{ breakPreviewText }}
{{ detailsLead }}
Metric Value Copy
{{ row.label }} {{ row.value }}
{{ warning }}
{{ guidanceLead }}
Priority Action Why
{{ row.priority }} {{ row.action }} {{ row.why }}
{{ note }}
Guidance is unavailable for the current inputs.
Charts appear after the calculator has enough valid input to build a span or clock result.
{{ chart.title }}
{{ chart.subtitle }}

        
:

Introduction:

Clock time and elapsed time are related, but they answer different questions. A clock reading tells you where you are in the day, while a duration tells you how much time passes between two points. This calculator is built for the everyday arithmetic between those two ideas.

That matters whenever a schedule, run sheet, or handover note gives you times in hours and minutes and you need a clean answer without rebuilding the math by hand. A shift that starts at 22:15 and ends at 06:45 looks backward on a same-day clock, yet the practical decision is whether to treat that as an overnight span or as an invalid sequence.

The tool handles three jobs that come up constantly in operations work. It can measure the difference between a start and an end, add a duration to a base time, or subtract a duration from a base time. The result is shown both as a clock-style value and as decimal hours and total minutes, so the same run can support a quick read, a spreadsheet entry, or an export for someone else.

A realistic example is a rota check near midnight. You may want to know whether two times represent an eight-hour overnight shift, whether a travel buffer pushes an arrival into the next day, or whether a copied note simply swapped the start and end by mistake. The summary badge stack and the `Day offset` row are there to make that distinction visible instead of leaving it buried in mental arithmetic.

What this result does not mean is "calendar-aware elapsed time." There is no date, time zone, daylight-saving rule, or leap-second handling in the calculation path. The output is best read as pure clock arithmetic on the entered strings, which is often exactly what you want, but it is not a substitute for date-aware scheduling software.

Everyday Use & Decision Guide:

Pick the mode before you think about the numbers. If you are measuring a span, stay with the start and end comparison path. If you already know the base time and want to move it forward or backward by a known amount, switch to the add or subtract path instead. That one decision prevents most of the confusing results people blame on the arithmetic.

For routine scheduling work, the first trustworthy pass is simple: enter only the time pair that belongs to the chosen mode, then look at the summary and the `Day offset` before opening exports. If the question is really "how long was that," focus on `Decimal hours` and `Total minutes`. If the question is "what clock time do we land on," focus on `Result (HH:MM:SS)` and read the day offset beside it.

  • If an end time appears earlier than a start time because the work crossed midnight, turn on `Allow overnight difference` and make sure `Day offset` changes to `1`.
  • If a comparison stays negative, do not assume the tool is wrong. It is often showing that the overnight toggle is off or that the time order needs to be checked.
  • In add or subtract work, `01:30:00` with `Day offset` `+1` means the arithmetic wrapped into the next day. The clock face is only part of the answer.
  • If you plan to move the result into payroll, staffing, or reporting math, copy `Decimal hours` or `Total minutes` instead of retyping the clock string.
  • If the chart looks too simple, read it as a comparison view of numeric result rows, not as a timeline or calendar plot.

A quick trust check is to compare `Decimal hours` against `Total minutes`. They should describe the same span. When those fields agree and the sign or day offset matches the real-world situation, the run is usually ready to export.

Technical Details:

Every entered value is parsed as a colon-delimited string with hours, minutes, and optional seconds. Minutes and seconds must be whole numbers from 0 to 59. Hours only need to be a non-negative integer. That makes the parser more permissive than common wall-clock timestamp profiles such as RFC 3339, which reserve the hour field `00` to `23` for time-of-day values. In practice, this means the calculator can accept inputs like `27:15:00`, but you still need to decide whether that entry should be read as a clock reading or as a duration-like quantity.

Difference mode is direct subtraction: end minus start. If that subtraction is negative and overnight handling is enabled, the tool adds exactly one 24-hour block, or 86,400 seconds, to represent a next-day finish. If overnight handling is off, the negative result is preserved. That behavior is useful when you want the tool to expose an input-order problem instead of silently correcting it.

Add and subtract mode follow a different rule. The base time and delta are combined first, and the resulting second count is wrapped back into a 24-hour display while `Day offset` tracks how many day boundaries were crossed. Because no calendar date is attached, the wrap is purely arithmetic. The package also cannot detect ghost times caused by daylight-saving jumps or repeated wall times during fall-back transitions, because those questions require date and zone context the form never collects.

In seconds, the core rules are:

D = tend - tstart difference mode D = D + 86400 only when D < 0 and overnight handling is enabled R = tbase ± tdelta add or subtract mode clock = R mod 86400 formatted as `Result (HH:MM:SS)` offset = R86400 reported as `Day offset`
Primary result fields for the time duration calculator
Output Field Format/Unit Meaning Typical Use
Result (HH:MM:SS) Clock-style text The formatted arithmetic result, including a leading minus sign when needed. Readable display, handover notes, quick checks
Decimal hours hours The same result expressed as seconds divided by 3,600. Timesheets, staffing math, spreadsheet work
Total minutes minutes The same result expressed as seconds divided by 60. Break calculations, service windows, reporting
Day offset days The count of 24-hour rollovers applied by the arithmetic path. Midnight crossings, previous-day or next-day context

The guidance table is not a separate model. It is built from the same result plus a small set of heuristics. High-priority guidance appears when required time strings are missing, when a difference stays negative because overnight handling is off, or when the resulting span looks unusually long for a single shift. Add and subtract runs also warn when the arithmetic crosses large boundaries, because that often points to a mistyped base or delta.

Exports remain local to the browser session. CSV, DOCX, chart image, chart CSV, and JSON files are generated from the current result set without a server-side handoff. The chart is simply a compact bar view of numeric rows extracted from the result table, so it helps compare fields, but it should not be read as a calendar timeline.

Step-by-Step Guide:

Use this sequence when you want a clean result on the first pass.

  1. Choose `Operation` first. Use `Difference (end - start)` for elapsed spans, `Add delta to base` for forward time shifts, and `Subtract delta from base` for backward shifts.
  2. Enter only the fields that belong to that mode. Difference mode needs `Start time` and `End time`. Add or subtract mode needs `Base time` and `Delta time`. The accepted pattern is `HH:MM` or `HH:MM:SS`.
  3. If a comparison crosses midnight, open `Advanced` and enable `Allow overnight difference`. Add a `Scenario label` when you want that wording to travel with exports.
  4. Read the summary box before opening anything else. A valid run shows either `Time Difference` or `Calculated Time`, a clock value, a decimal-hour subtitle, and badge values for minutes, day offset, and mode.
  5. Open `Time Duration Details` and confirm `Result (HH:MM:SS)`, `Decimal hours`, `Total minutes`, and `Day offset`. If the summary still shows `-`, correct the time format before continuing.
  6. Open `Time Duration Guidance` when you want a sanity pass. High-priority rows usually mean invalid format, an unhandled overnight span, or a duration that deserves a second look.
  7. Use the chart tab only after the detail rows look right, then export with `Copy CSV`, `Download CSV`, `Export DOCX`, chart downloads, or `Copy JSON` and `Download JSON` as needed.

When the result, minutes, and day offset all tell the same story, the calculation is ready to leave the tool.

Interpreting Results:

For most readers, `Result (HH:MM:SS)` answers the display question and `Decimal hours` answers the arithmetic question. If those two fields do not match your expectation, trust the arithmetic fields over intuition and re-check the input order or the overnight setting.

  • A negative `Result (HH:MM:SS)` in difference mode means the end came before the start and no overnight rollover was applied.
  • A nonzero `Day offset` in add or subtract mode means the clock wrapped across midnight. It qualifies the clock result; it does not replace it.
  • A clean summary does not prove the span is valid against real-world calendars. When a shift or service window might land on a daylight-saving transition, verify the date and time zone outside this calculator.

Before copying the answer into operations paperwork, make sure `Allow overnight difference` and `Day offset` express the same story you would tell another person without looking at the screen.

Worked Examples:

A same-day shift

Enter `Start time` `08:30` and `End time` `17:00` in difference mode. The summary returns `Time Difference` `08:30:00`, `Decimal hours` `8.500000`, `Total minutes` `510.000000`, and `Day offset` `0`. This is the straightforward case where the clock display, the spreadsheet-friendly fields, and the rollover status all agree.

An overnight handover

Enter `Start time` `22:15` and `End time` `06:45`, then enable `Allow overnight difference`. The same rows settle at `08:30:00`, `8.500000`, `510.000000`, and `1`. The important interpretation is not only the eight-and-a-half-hour span; it is the fact that the tool had to treat the finish as next-day to reach it.

Rolling into the next day with add mode

Use `Add delta to base` with `Base time` `23:20:00` and `Delta time` `01:15:00`. The summary becomes `Calculated Time` `00:35:00`, `Decimal hours` `0.583333`, `Total minutes` `35.000000`, and `Day offset` `1`. That tells you the landing clock time is just after midnight, but the arithmetic belongs to the next day relative to the base.

A format problem, not a math problem

Switch to subtract mode, type `8.30` into `Base time`, and leave `Delta time` at `01:00:00`. The tool does not generate detail rows and the summary prompts you to enter valid base and delta times in `HH:MM` or `HH:MM:SS` format. Changing the base to `08:30` immediately restores `Calculated Time` and gives `07:30:00`, which tells you the arithmetic path was fine all along.

FAQ:

Can I enter times without seconds?

Yes. The parser accepts both `HH:MM` and `HH:MM:SS`. Seconds default to zero when you omit them.

Why did I get a negative time difference?

In difference mode, a negative result means `End time` was earlier than `Start time` and `Allow overnight difference` was not used to roll the finish into the next day.

What does Day offset actually mean?

It counts how many 24-hour boundaries the arithmetic crossed. `+1` means next day relative to the base calculation path, `-1` means previous day, and `0` means no rollover was applied.

Why does the form sometimes reject a value that looks like a time?

The parser expects colon-separated parts. A value like `8.30` or `0830` is not valid here, even though a human may read it as a time.

Does this tool understand dates, time zones, or daylight saving time?

No. It only performs arithmetic on the entered time strings and optional overnight rollover. Date-aware elapsed time has to be checked elsewhere.

Are my inputs sent to a server?

No server-side step is present in this package. Calculation, charting, copying, and downloads all happen in the browser.

Glossary:

Wall time
A clock reading within a day, without calendar or time-zone context.
Duration
Elapsed time expressed as a span rather than a clock position.
Cross-midnight
A span whose finish is treated as belonging to the next day.
Day offset
The rollover count applied when arithmetic passes a 24-hour boundary.

References: