Signed date distance
Keep a negative direction when end precedes start.
Calculate duration between two dates with signed day counts, weeks and a calendar years/months/days breakdown. Choose elapsed difference or include both endpoints without confusing counted dates with endpoint duration.
Results update as you edit. Choose two calendar dates and review the signed direction and endpoint counting convention.
Read the result together with the breakdown and calculation assumptions below.
Date-only Gregorian arithmetic, independent of timezone and DST. Calendar components are measured from the earlier endpoint using completed anniversaries and original-day month-end clamping; February 29 uses February 28 in non-leap anniversary years. Inclusive counts and endpoint duration are different measures.
Calendar-day counts and offsets use exact Gregorian date ordinals. Calendar components use real anniversaries/month lengths; decimal summaries are for display only.
To calculate duration between two dates, first decide whether the question is elapsed separation or a count including both endpoint dates. This day counter between dates keeps that choice explicit and preserves negative direction. When you calculate between dates in calendar components, the tool uses actual yearly anniversaries and month lengths rather than fixed 365-day or 30-day substitutions.
Use the result as a transparent mathematical estimate. The calculation method, input conventions and limitations are explained below so you can compare scenarios with the same assumptions.
Follow four steps to enter consistent inputs, read the estimate and understand the result.
Choose the start and end calendar dates.
Choose elapsed difference or inclusive endpoint counting.
Read the signed count and absolute counted weeks plus remaining days.
Review the separate chronological calendar breakdown and its month-end convention.
Explore the inputs, breakdowns and supported options available in this calculator.
Keep a negative direction when end precedes start.
Choose endpoint separation or a count of both endpoint dates.
Decompose the absolute counted-day total into seven-day groups.
Use anniversaries and original-day month-end clamping.
Distinguish zero elapsed duration from one inclusive date.
Calculate with validated Gregorian date ordinals.
A signed day difference describes direction and separation. An inclusive count describes how many dates are covered. Neither should be substituted for a month count or a real-time duration across timezone changes.
Specify exactly what is counted before interpreting the number.
Recognize reversed endpoints without silently swapping their signed result.
Use real calendar components alongside exact day counts.
Review the substituted ordinal/counting steps.
Check these definitions and conventions when entering values or comparing estimates.
| Input or Result | Meaning | Main Consideration |
|---|---|---|
| Elapsed days | End ordinal minus start ordinal. | A signed distance; equal dates give zero. |
| Inclusive dates | Absolute distance plus one with direction. | A count of dates, not an extra day added to endpoint duration. |
| Calendar months | Additional months after completed anniversaries. | Retain the original start day and clamp to shorter months. |
| Date-only scope | Gregorian dates without times or offsets. | Actual timezone-aware hours require another model. |
Keep endpoint counting separate from the chronological calendar breakdown. Month-end clamping is explicit; no fixed 30-day month or 365-day year conversion is used.
Use a concrete example and focused comparisons to connect the inputs with the outputs.
From 2024-02-28 to 2024-03-01 there are 2 elapsed days, with a calendar breakdown of 0 years, 0 months and 2 days. Including both endpoints counts 3 dates. Reversing the endpoints gives −2 elapsed days or −3 inclusive counted dates; the chronological breakdown still describes the same two-day interval.
2024-02-28 to 2024-03-01 gives two elapsed days or three inclusive dates.
Switching those endpoints gives −2 elapsed days or −3 inclusive counted dates.
2023-01-31 to 2023-02-28 is one clamped calendar month but 28 elapsed days.
Read the calculation method alongside its units, precision and calendar conventions.
Elapsed signed days = end date ordinal − start date ordinal. Inclusive signed count = direction × (absolute elapsed days + 1), with equal dates counted once. Absolute counted weeks = floor(abs(count)/7); remaining days = abs(count) mod 7. Calendar components are calculated from the actual earlier and later endpoints.
This day counter between dates uses Gregorian date ordinals rather than local-midnight timestamps. To calculate between dates in calendar components, it finds completed yearly anniversaries, then month candidates retaining the original start day clamped to month end, then remaining days. February 29 uses February 28 in non-leap anniversary years. Inclusive counting changes the counted-date total, not the underlying endpoint breakdown.
Elapsed mode returns zero for the same date; inclusive mode counts that date once. Reversed endpoints have a negative counted-day direction.
Calendar years/months/days always run from earlier to later and remain independent of the inclusive-count adjustment.
Complete weeks use the absolute counted-day total; the date-order field retains the sign.
Supported Gregorian dates: 0001-01-01 through 9999-12-31. Impossible dates, date/time strings in date-only fields, NaN/Infinity and out-of-range results are rejected. Calendar values use exact date ordinals; no historical calendar transitions or leap-second corrections are inferred.
Calculations run locally in your browser. The calculator does not send your entered dates to a calculation server or store them between visits.
This is Gregorian date-only arithmetic. It does not model time of day, timezone offsets, daylight-saving elapsed hours, legal deadlines or historical calendar adoption.
Practical answers about the inputs, calculation method and limitations of this estimate.
Subtract the start date ordinal from the end date ordinal for elapsed days. This tool also shows absolute weeks/remainder days and a chronological calendar breakdown using real month lengths.
Yes. Inclusive mode counts absolute elapsed days plus one and applies the date-order direction. Equal dates count once; elapsed mode instead returns zero.
The signed elapsed and inclusive counts become negative. The calendar components are clearly labeled chronological, measured from the earlier endpoint to the later one.
No. Completed anniversaries and actual target month lengths are used. The original start day is clamped when a target month is shorter; February 29 uses February 28 in non-leap anniversary years.
No. Inclusive counted dates and the endpoint duration are separate measures. The years/months/days breakdown continues to describe the actual two endpoints.