Date Difference
Calculate the number of days, weeks and months between two dates.
Start date
End date
Days
865
Weeks
123.6
Months
28.4
Years
2.37
How date differences are calculated
Convert both dates to milliseconds, subtract, then divide. This handles leap years and month-length variations automatically.
- Days = |Date B β Date A| Γ· 86,400,000 ms
- Weeks β Days Γ· 7
- Months β Days Γ· 30.4375 (average)
- Years β Days Γ· 365.25 (includes leap)
What this tool does
Calculates the exact number of days between any two dates. Also converts to weeks, months and years. Useful for project timelines, deadlines, anniversaries and contracts.
Input fields explained
Start date
The earlier date in the range. The calculator uses the absolute difference, so order doesn't matter.
End date
The later date in the range. Defaults to today.
Formula / How it works
Days = |date2 β date1| in milliseconds Γ· 86,400,000