What is this calculator?
Measures the span between two dates in two complementary ways: as a total number of days and whole weeks, and as a calendar breakdown of years, months, and days. It also lets you choose whether both endpoints are counted.
Use it when:
- You need the number of days between two dates for a deadline or a duration.
- You want a calendar breakdown as well as a raw day count.
- The counting convention matters — for instance a hire period that includes both the first and last day.
Intended for: Project planners, contract administrators, and anyone measuring an interval between dates.
How is this calculated?
- Each date is converted to a day number on a continuous scale, and the difference between them gives the total days. This avoids month-length problems entirely.
- Whole weeks and the remaining days are derived from that total by dividing by seven.
- The calendar breakdown is computed separately by walking the calendar — complete years, then complete months, then leftover days — because "1 month" has no fixed length in days.
- With INCLUSIVE endpoints, both the start and the end date are counted, adding one day to the total. This is the convention for things like a hotel stay counted in nights versus days, or a leave period.
- If the end date precedes the start date, the result is reported as a negative span rather than silently reordered, so the direction of the interval is never lost.
Formulas
Exclusive day count
Total days = day number of End − day number of Start
Counts the intervals between the dates, not the dates themselves.
Inclusive day count
Total days = (End − Start) + 1
Counts both endpoints — the convention when each date is itself a unit of work or stay.
Example
From 2026-01-01 to 2026-01-31, with endpoints exclusive.
- The difference in day numbers is 30.
- 30 ÷ 7 gives 4 whole weeks and 2 days.
Result: 30 days — 4 weeks and 2 days. With inclusive endpoints it would be 31 days, because 1 January is then counted too.
Frequently asked questions
Should I use inclusive or exclusive endpoints?
Use exclusive when measuring elapsed time (how long until a deadline). Use inclusive when each date is itself a countable unit — days of leave, days of hire, days of an event.
Why does the calendar breakdown not match total days ÷ 30?
Because months are not 30 days. The breakdown counts real calendar months of 28 to 31 days, so it will not agree with any fixed-length approximation.
What if the end date is before the start date?
The span is reported as negative, preserving the direction. The magnitude is the same as reversing the two dates.
Assumptions
What this calculator takes as given:
- Dates are treated as civil calendar dates (year, month, day) with no time-of-day component.
- No time zone is applied, so a date means the same thing wherever you are — the result never shifts by a day depending on your location.
- The proleptic Gregorian calendar is used throughout, including for dates before its historical adoption.
- By default endpoints are exclusive; enabling the inclusive option adds one day.
Limitations
What this calculator cannot know or does not model:
- Time of day is not considered — a span is measured in whole days only.
- Daylight-saving transitions do not affect the result, since no clock time is involved.
- Business days are not counted here; use the working days calculator for that.