Date difference
Count days, weeks, and calendar years/months between two dates.
Your inputs
Choose your dates and the calculation convention. Results update as you edit.
Calculations run in your browser. Inputs are not saved or sent to analytics.
How it works
- Total days = −
- Include end date (+1): +1
- Whole weeks = floor(Total days ÷ 7)
- Worked example: From 2026-01-01 to 2026-01-08, excluding the end date, the interval is one week. Including the end date adds one day; it does not change the dates themselves.
- Total days = 7; Include end date (+1): 7 + 1 = 8.
Input and formula key
Your result
Complete the inputs to see your result.
Assumptions and limitations
The end date must not precede the start. Whole calendar years and months are counted separately from total days, with month ends clamped. Including the end adds one to total days and weeks only; the calendar interval stays unchanged. Times and time zones are not used.
Sources
- US Naval Observatory — Calendars and conversion algorithms Sources reviewed: 2026-10-05



