Everyday
Date Difference Calculator
Count the time between any two dates. Get the total number of days plus a breakdown in years, months, weeks, and hours — useful for deadlines, anniversaries, and project timelines.
Total days between
564
Years / months / days
1y 6m 18d
Weeks
80 wk 4 d
Hours
13,536
Both dates are counted at midnight, so the result is the number of full days between them. Order doesn't matter.
How it works
Both dates are anchored to midnight, and the total-days figure is the number of complete days between them. January 1 to January 8 is 7 days — the dates span 8 calendar days, but 7 full days pass between them.
The years/months/days breakdown works like column subtraction on a calendar: subtract years, then months, then days, borrowing from the previous calendar month when the day count goes negative. That's what makes the result correct across leap years and different month lengths.
Order doesn't matter — if the end date is before the start date, the calculator swaps them and reports the same positive difference.
total_days = (end − start) / 86,400,000 ms
weeks = floor(total_days / 7), remainder in days
Y/M/D = calendar subtraction with borrowingFrequently asked questions
How do I count days between two dates?
Anchor both dates to midnight and divide the time difference by the number of milliseconds in a day (86,400,000). This gives the count of full days between the dates, handling leap years automatically.
Is the end date included in the count?
No — this calculator counts the days between the two dates, so Monday to Friday is 4 days. If you need an inclusive count (common for hotel nights vs. rental days), add 1 to the result.
How are months counted when they have different lengths?
The breakdown uses real calendar months: January 31 to February 28 in a non-leap year counts as 28 days, not a fixed 30. When borrowing is needed, the calculator uses the actual length of the month before the end date.
Does the calculator handle leap years?
Yes. The math works on real calendar dates, so February 29 is counted in leap years and the total-days figure is always exact.
Can I use this for business days or working days?
This tool counts all calendar days including weekends and holidays. For business days, a rough estimate is total days × 5/7, then subtract public holidays in your region.