“Days between” can mean elapsed calendar-day boundaries or an inclusive count of dates. Decide the rule before calculating, especially when a result of zero looks surprising.
Suppose you start preparing a workshop on Monday and need the handout ready on Wednesday. Monday → Tuesday is one calendar boundary; Tuesday → Wednesday is another. That is a two-day difference. If you are listing every date with work scheduled—Monday, Tuesday, Wednesday—you are counting three dates instead. Choose the number that answers your actual question.
State the rule
This site’s Date Difference tool calculates end date minus start date. The same date gives zero. Turning on Include the end date adds one to a valid non-reversed interval, so the same date gives one.
For 17 November through 19 November, the base difference is two days: two calendar boundaries are crossed. With the inclusive option, three dates are counted: the 17th, 18th, and 19th. That explains the number without relying on an ambiguous phrase such as “three days away.”
Compare the supplied examples
Download the date example table and reproduce these results:
| Start → end | Base difference | Include end date |
|---|---|---|
| 2026-11-17 → 2026-11-17 | 0 | 1 |
| 2024-02-28 → 2024-03-01 | 2 | 3 |
| 2025-02-28 → 2025-03-01 | 1 | 2 |
| 2026-03-07 → 2026-03-09 | 2 | 3 |
| 2026-12-31 → 2027-01-01 | 1 | 2 |
The leap-year pair differs because 29 February exists in 2024. The March example remains two calendar days even around a daylight-saving transition in a region that changes clocks.
Keep time zones out of a date-only task
Subtracting two local midnight timestamps and dividing by 24 hours can be misleading when a daylight-saving change makes a local day shorter or longer. A date-only calculation should compare calendar days using a consistent representation.
The tool constructs UTC calendar values and validates the components by reading them back. That extra check matters because JavaScript date construction can normalize an impossible date into the next month. 2026-02-30 must be rejected, not silently treated as March.
Check validity and direction
The accepted range is 1900 through 2100. Enter real dates and keep the end on or after the start. The tool reports an error for reversed dates instead of secretly swapping them. If you need a signed interval, that is a different contract from this tool’s rule.
Do not use these natural-day results as a legal deadline, working-day count, holiday calendar, or time-zone-aware meeting scheduler. Those tasks require additional rules. Write the chosen inclusion rule beside a date result so another person can reproduce it.
References & scope
These official references support the software instructions. Practice documents are original, fictional teaching examples; labels can vary by release.
- Date.UTC()
UTC date construction avoids local DST offsets; invalid calendar components normalize and need explicit validation.