Date & Time Difference Calculator
Calculate elapsed time across dates and UTC offsets while separating workdays, business-window hours and holiday-adjusted checkpoints.| Measure | Value | Meaning | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.note }} |
| Checkpoint | Timestamp | Elapsed hours | Business hours | Copy |
|---|---|---|---|---|
| {{ row.label }} | {{ row.timestamp }} | {{ row.elapsedHours }} | {{ row.businessHours }} |
Treat elapsed time as the timeline answer
{{ elapsedInterpretation }}
Keep schedule math tied to its civil calendar
{{ scheduleInterpretation }}
Use the checkpoint plan as a review cadence
{{ checkpointInterpretation }}
Two clock readings do not define an elapsed duration until their timezones are known. Nine o'clock in Kuala Lumpur and nine o'clock in London look identical on a schedule, yet they identify different instants. Conversely, two different local clock readings can identify the same instant after their UTC offsets are applied.
Elapsed time and calendar time answer different questions. Elapsed time measures the absolute interval between instants, so 48 hours is always 48 hours. Calendar planning asks which civil dates are working days, whether the end date counts, which holidays are excluded, and how much of the clock span overlaps a daily business window. A project can therefore span five counted workdays while containing only 40 business-window hours.
- Instant
- A unique point on the UTC timeline after a local reading and its offset are resolved.
- Wall-clock span
- The difference between the written date and time fields before timezone offsets are applied.
- Working-day count
- Qualifying civil dates after the working week, endpoint rule, and holiday exclusions are applied.
- Business overlap
- The portion of the civil interval that falls inside the chosen daily window on working dates.
Timezone offsets deserve special care around travel, handoffs, daylight-saving changes, and distributed systems. A fixed offset such as UTC+08:00 is not a named timezone and never changes by season. A device-local timezone can change its offset according to the date and the timezone rules installed on that device.
Calendar counts are planning conventions rather than universal facts. Some teams include both endpoint dates, others count the start but exclude the end. Holidays also vary by country, organization, and year. Record these assumptions beside any duration used for staffing, billing, service windows, or deadline commitments.
How to Use This Tool:
Resolve the two timestamps first, then define the civil-calendar rules used for planning.
- Enter the Start timestamp and End timestamp with their date and 24-hour time. Use Swap when they were entered in reverse and chronological presentation is easier to read.
- Choose a timezone for each endpoint. Use UTC for UTC readings, Custom UTC offset for a known fixed offset, or Device local only when the device timezone represents that civil date correctly.
- Set the Working week and Calendar endpoint rule. Add holiday dates that should be excluded, and define the number of capacity hours represented by one working day.
- Enter the Business window as a same-day start and end time. The end must be later than the start; overnight windows are not accepted.
- Review Elapsed time between instants alongside Wall clock, Working days, and Business overlap. Use checkpoints only after those underlying assumptions match the schedule.
Interpreting Results:
The main elapsed result is the absolute distance between the resolved instants. The chronology note still reports whether the entered end falls after, before, or at the same instant as the start. Swapping the endpoints changes presentation but not the absolute duration.
- Compare Elapsed time with Wall clock when the endpoint offsets differ. The offset-impact value shows how much timezone interpretation changes the written clock span.
- Read Working days as a count of qualifying dates, not as elapsed 24-hour blocks.
- Read Business overlap as actual overlap with the daily window. Capacity hours instead multiplies the working-day count by the chosen hours per day.
- Check the endpoint rule and holiday list before using the result for payroll, billing, contracts, or statutory deadlines.
Technical Details:
The calculation has two coordinated models. The instant model converts each civil timestamp to a UTC coordinate and measures the absolute difference. The calendar model keeps the written civil dates in order, classifies each date, and intersects the written time span with recurring business windows.
Transformation and Formula Core:
A numeric UTC offset is local time minus UTC. Subtracting that offset from a civil reading produces its instant coordinate. The elapsed duration is the absolute difference between the two coordinates.
C is the civil date and clock reading expressed as a minute coordinate, O is its UTC offset, I is the resolved instant, and E is elapsed time. Output units are exact conversions of the same elapsed milliseconds into seconds, minutes, hours, days, and weeks.
The decomposed duration uses whole 24-hour blocks, then whole remaining hours and minutes. Display precision changes formatting only; it does not change the underlying values.
Calendar and business-window rules:
| Measure | Rule |
|---|---|
| Counted calendar days | Iterate from the earlier civil date through the later one; include the later date only when Include end date is selected. |
| Holiday classification | A listed holiday takes precedence over working-day, weekend, or excluded-weekday classification. |
| Working days | Count dates whose weekday belongs to the selected working week and that are not listed holidays. |
| Business overlap | Sum the intersection between the ordered civil interval and the same-day business window on each working date. |
| Business-day equivalents | Business-overlap hours divided by capacity hours per day. |
| Outside business hours | The non-negative civil span minus business-overlap time. |
The business-window model uses civil time rather than UTC instants. It is intended for schedule planning: a 09:00 to 17:00 window stays attached to the written dates even when the endpoint offsets differ. It does not create separate timezone-aware windows for each checkpoint.
Checkpoint mechanism:
Quarter checkpoints use 0%, 25%, 50%, 75%, and 100% of elapsed time; thirds use 0%, one third, two thirds, and 100%; handoff reviews use 0%, 10%, 25%, 50%, 75%, 90%, and 100%. Instant checkpoints interpolate on the UTC timeline, while checkpoint business hours accumulate through the corresponding fraction of the ordered civil span.
Dates must use the Gregorian calendar in YYYY-MM-DD form, times use HH:MM, and UTC offsets range from UTC-12:00 through UTC+14:00. Civil spans greater than 36,600 days are rejected to keep calendar iteration bounded.
Accuracy and Privacy Notes:
All inputs are processed in the browser. Accuracy depends on choosing the correct timezone interpretation and calendar rules.
- Device local uses the device timezone rules available for the entered date. A misconfigured device timezone produces a wrong instant.
- A custom UTC offset is fixed. It does not apply daylight-saving or historical timezone changes automatically.
- The interval ignores leap-second notation because inputs are minute-precision civil times.
- Legal and contractual day-count rules may define weekends, holidays, endpoints, or cutoff times differently.
Worked Examples:
Five-date workweek with 40 business hours
From Monday 18 May 2026 at 09:00 UTC to Friday 22 May at 17:00 UTC, elapsed time is 104 hours, or 4 days 8 hours. With Monday to Friday selected, both endpoint dates included, no holidays, and a 09:00 to 17:00 business window, the schedule contains five working days and 40 business-overlap hours.
Matching clocks with different offsets
A start reading of 09:00 at UTC+08:00 and an end reading of 09:00 UTC on the same date have a zero-hour wall-clock span but an eight-hour elapsed interval. The result is correct because subtracting the offsets places the start instant eight hours earlier.
FAQ:
Why can elapsed hours differ from wall-clock hours?
Wall-clock hours compare the written dates and times. Elapsed hours compare the resolved instants, so different UTC offsets can add to or subtract from the written span.
Does including the end date add 24 elapsed hours?
No. The endpoint rule changes only the civil-date counts and capacity totals. It does not alter the timestamps or the elapsed duration between their instants.
References:
- RFC 3339: Date and Time on the Internet: Timestamps, RFC Editor, July 2002.
- Theory and pragmatics of the tz code and data, Internet Assigned Numbers Authority.