Date Difference Calculator
Pick two dates and instantly see the difference in days, weeks, months, years, and milliseconds. Useful for project planning, age calculations, and deadline tracking. All calculation runs in your browser.
Compare two calendar dates and quickly see their absolute difference in days, whole weeks, calendar-month distance, calendar-year distance, and milliseconds. The calculator runs entirely in your browser.
How to calculate the difference between two dates
- Choose the starting date and ending date.
- Select Calculate, or let the result update after both dates are filled.
- Review the difference shown in days, whole weeks, months, years, and milliseconds.
- Copy any individual result value if you need it elsewhere.
How the date differences are calculated
Days are calculated from the absolute millisecond difference divided by 24 hours, then rounded down. Whole weeks are the day total divided by seven and rounded down. The displayed result is always non-negative, so reversing the two dates does not produce a negative duration.
Months and years are simple calendar-field distances: months compare year and month fields, while years compare the year fields only. They are not fractional elapsed-month or elapsed-year measurements, so these values can differ from a duration calculated using exact month lengths or anniversaries.
Privacy and limitations
Date calculations are performed locally in your browser. The day calculation uses a fixed 24-hour day based on the parsed date values, while month and year figures are calendar-field differences; use a specialized date library when legal, financial, or scheduling rules require more specific conventions.
Frequently asked questions
Can the result be negative?
No. The calculator uses the absolute difference between the two selected dates.
How are weeks calculated?
Weeks are whole seven-day groups, so any remaining days are not shown as a fraction of a week.
How are months calculated?
The tool compares the year and month fields and returns their absolute calendar-month distance.
Does the Today button fill both dates?
It fills the first empty date field; if the first date is already set, it fills the second.
Are my selected dates sent to a server?
No. The calculation happens locally in the browser.