DIF

Date Difference Calculator

Compare elapsed time, civil dates and Monday–Friday counts

Units, Time & Number
🔒 100% client-side — your data never leaves this page
Maintained by Evan•Updated: September 30, 2026
Options
Input

Set the start and end time first to see the date difference; inclusive-day logic and scenarios are available in Advanced mode.

Both inputs use the browser timezone: UTC. Invalid dates and missing or repeated local times at clock changes are rejected.

Output
Date difference results appear here
🔒 Processed locally in your browser
Page reading mode

The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.

About this tool

Compare two valid Gregorian date-times in the displayed browser timezone. Exact duration is the absolute difference between instants; total days are fixed 24-hour units and direction reports which input is later. Civil calendar difference compares clock fields independently of DST: it adds whole years, then whole months, clamping the day to the target month end, then counts remaining civil days and clock time. Thus two midnights around a spring transition can be one calendar day but 23 elapsed hours. Date span uses calendar dates rather than dividing midnight timestamps by 24 hours. The inclusive option includes the chronologically later date, even for reversed inputs. Weekdays exclude Saturday and Sunday only; national holidays, work shifts and billing rules are not included. Invalid dates and missing/repeated local times at timezone transitions are rejected. Years 0001–9999 are supported. Inputs and settings are saved as a browser-local draft; Clear removes them.

Failure Clinic (Common Pitfalls)

Pasting UTC clock text into a local picker changes meaning

Cause: The picker has no offset field and always uses the browser timezone.

Fix: Convert the instant into the displayed browser zone first, or compare explicit instants with a timestamp tool.

Weekday count is not a work-calendar service

Cause: Saturday/Sunday exclusion lacks holiday and organization-specific data.

Fix: Use an authoritative work calendar for payroll, legal deadlines or SLAs.

Scenario Recipes

01

Separate elapsed and civil days

Goal: Read a DST boundary without losing a calendar date.

  1. With browser timezone America/New_York, enter 2026-03-08T00:00 and 2026-03-09T00:00.
  2. Calculate with the inclusive option enabled.

Result: Elapsed 23 hours; civil difference 1 day; date span 2; weekday count 1 (Monday). If your browser uses another zone, the elapsed duration may differ.

02

Check the clamped month convention

Goal: Know how a month-end boundary is decomposed.

  1. Enter 2024-01-31T12:00 and 2024-02-29T12:00.
  2. Calculate and compare civil calendar difference with the numeric elapsed totals.

Result: The civil calendar result is one month. It is a calculation convention, not a billing policy.

Production Snippets

Worked example

text

NY 2026-03-08 00:00 → 2026-03-09 00:00
elapsed 23h · civil 1d · inclusive 2 dates · weekdays 1

Frequently Asked Questions

Why can one calendar day be 23 elapsed hours?

DST can move the clock forward. In America/New_York, 2026-03-08 00:00 to March 9 00:00 is one civil day but 23 elapsed hours. The inclusive date span is two dates.

How are month ends handled?

Whole years are added first, then whole months, clamping to the last day of the target month. January 31 to February 29 in 2024 is one month; February 29 2024 to February 28 2025 is one year. This is an explicit calculation convention.

Does the weekday count exclude holidays?

No. It counts Monday through Friday only. National holidays, regional work calendars, shift schedules and legal or billing rules require another data source.

What does inclusive mean with reversed inputs?

The tool orders the endpoints chronologically for date and weekday counts. Inclusive includes the later calendar date; exclusive leaves it out. Elapsed duration stays absolute and direction remains visible.

Which inputs are rejected or stored?

Invalid Gregorian dates, years outside 0001–9999, and missing/repeated local clock times are rejected. Both inputs use the displayed browser timezone. Inputs and settings are stored locally until Clear removes the draft.

Keep browsing