Loading...
Loading...
Calculate the exact difference between two dates in years, months, weeks, days, hours, and minutes.
Day of the start date (1-31)
Month of the start date (1-12)
Year of the start date (1900-2100)
Day of the end date (1-31)
Month of the end date (1-12)
Year of the end date (1900-2100)
The date difference is calculated by converting both dates to epoch days (days since Jan 1, 1970) and subtracting the start from the end date. The inclusive option adds one day to include the end date in the count.
Convert both dates to absolute day numbers
Days(Start) = floor(StartTimestamp / 86400000)
= Day number of the start date
Subtract to get the difference in days
Diff = Days(End) − Days(Start)
= Difference in days
Convert to years, months, weeks, hours, and minutes
Years = Diff ÷ 365.25, Months = Diff ÷ 30.437, Hours = Diff × 24
= Multi-unit breakdown
Enter the start date (day, month, year) in the first three fields.
Enter the end date (day, month, year) in the next three fields.
Toggle 'Include End Date' for inclusive or exclusive counting.
Results update instantly as you change any value.
Use the examples to see common date range patterns.
January 1, 2024 to January 1, 2025 inclusive
Monday to Sunday of the same week
From February 28 to March 1 crossing a leap day