Compute the exact span between two dates in days, weeks, months, and years.
The earlier date (inclusive reference for midnight-aligned counting). Example: 2026-01-01.
The later date. If before the start, the result is negative — the signed span is preserved.
Days
165
Number of 24-hour days between the two midnights. Negative if end is before start.
Weeks
23.6
Days divided by 7 — one-decimal approximation.
Months
5.4
Days divided by 30.44 (average Gregorian month). Approximate.
Years
0.45
Days divided by 365.25 (accounts for leap years). Approximate.
What this means
Counts exact calendar days, then projects to weeks/months/years for human-friendly reporting. Only days is exact.
Count the exact span between any two dates in days, and see approximate weeks, months, and years.
Formula
days = end − start, then weeks = days ÷ 7, months = days ÷ 30.44, years = days ÷ 365.25
Worked examples
FAQ
Does it count the start and end days?
It measures 24-hour days between the two dates. For inclusive counting on a project, add one to your own tracking.
What if the end date is before the start?
The result is negative, correctly indicating the reversed direction.
Important assumptions
Limitations