Date Difference Calculator
Find the exact span between any two dates — in years, months, days, weeks, hours, and minutes.
What is a date difference?
The date difference is the amount of time that passes between two calendar dates. There are two common ways to express it: as a single total (for example, 1,234 days) or as a calendar breakdown of years, months, and days. Both answers are correct — they just describe the same span in different units. This calculator gives you both at once, so you can use whichever fits your scenario.
How to use this calculator
Pick a start date and an end date. The result updates instantly as you type. If the end date is earlier than the start date, the calculator swaps them so the duration is always positive. Toggle Include the end day when you need the end date itself to count as a full day — this matches how stays, leases, and rental periods are typically billed.
How the math works
For the years/months/days breakdown, we use calendar arithmetic — the same method you'd use on paper. We subtract years, then months, then days, borrowing from the previous month when the day-of-month subtraction goes negative. The borrowed amount is the actual length of that previous month, which is why a date in late February behaves differently from one in late March. For total days, we divide the elapsed milliseconds by the length of one day, which automatically accounts for leap years. Weekdays and weekend days are counted by walking each day in the range and checking its day of the week.
Which unit should you use?
| Scenario | Best unit |
|---|---|
| Age, anniversaries, project length | Years, months, days |
| Work or school deadlines | Weekdays |
| Pay periods, recurring schedules | Weeks |
| Short trips, hotel stays | Total days (with inclusive end) |
| Countdowns, time logs | Hours or minutes |
Frequently asked questions
Does this calculator account for leap years?
Yes. Total days are computed from real timestamps, so February 29 in leap years is included automatically. Calendar breakdowns also use real month lengths, so a span that crosses a leap day will reflect that extra day correctly.
Why does the years/months/days result not equal the total days divided by 365?
Because months and years are not fixed-length. A month can be 28, 29, 30, or 31 days; a year can be 365 or 366. The calendar breakdown uses the actual months that the span covers, which is more accurate for human time but cannot be derived from a single division.
What does "include the end day" do?
By default, the duration is exclusive — Monday to Tuesday is 1 day. With the option enabled, the end day is also counted, making Monday to Tuesday equal 2 days. Use it for stays, leases, and any case where both endpoints are part of the period.
What happens with daylight saving time?
This calculator works in calendar days, not clock hours, so DST does not change the result. The hours and minutes shown are derived from full 24-hour days for clarity. If you need to track actual elapsed clock time across a DST transition, use a timestamp-based tool instead.
How are weekdays counted?
Weekdays are Monday through Friday; weekend days are Saturday and Sunday. The calculator walks every day in the inclusive range and checks its day of the week, so the count is exact even when the span starts or ends on a weekend.
Can I use it for past dates and future dates?
Yes. The calculator works in both directions and on any date your browser's date picker supports. If you accidentally enter the dates in the wrong order, they are swapped automatically so the duration is always positive.
EN
PT
ES