How to Calculate the Difference Between Two Dates
Enter a Start date and an End date, then select Calculate difference. The calculator orders the dates automatically and shows total days, full weeks, and a calendar years/months/days breakdown. By default, the count excludes the end date.
Use the Calculator
- Enter valid dates in Start date and End date.
- Check Include end date when the end date should count as an extra day.
- Select Calculate difference to show the result.
- Use Reset to clear both dates, uncheck Include end date, hide errors, and hide the result.
If a date is missing or invalid, the calculator shows Enter a valid start date. or Enter a valid end date. and does not calculate.
Understand the Result
The result contains stat cards for Total days, Full weeks, and Calendar breakdown. It also shows the formula and a results/assumptions table with the entered dates, date order, counting option, totals, remainder, calendar values, and approximate month and year values.
- Include end date adds one day to Total days. It also changes Full weeks and the remainder.
- Calendar breakdown is calculated between the two dates using actual calendar-month lengths. It is not incremented by Include end date.
- Full weeks are whole weeks, with any remaining days shown separately.
- Approximate months divide total days by
30.436875, and approximate years divide by365.2425. Both are rounded to two decimal places for display.
Copy or Download the Result
Select Copy result to copy the displayed plain-text result when clipboard access succeeds. If it fails, the interface displays Could not copy - select and copy manually. Select Download result (.txt) to download the plain-text result as date-difference-calculator-result.txt.
Limits and Data Handling
The date-difference script performs the calculation locally from the entered dates. It does not send those entered dates. The calculator does not apply holiday calendars, legal or institutional date rules, time-of-day values, or time-zone handling.
The page loads analytics scripts. Its subscription form sends an email address when you submit it.
Date Difference Calculator FAQ
Does the calculator count the end date?
By default, no - the difference is exclusive of the end date, matching a plain subtraction of the two calendar dates. Check "Include end date" if you want the end date counted as an extra day (inclusive counting), for example when counting the number of days someone stayed somewhere including both the arrival and departure day.
What does the calendar years/months/days breakdown mean?
It expresses the gap between the two dates the way a calendar would: whole years, then whole months, then remaining days - for example "1 year, 2 months, 5 days" instead of a single day count. It is calculated from the actual calendar, not a fixed 30-day month or 365-day year.
What if I enter the end date before the start date?
The calculator automatically treats the earlier date as the start for calculation purposes and states this explicitly in the result, so the difference is always shown as a positive number of days.
How are approximate months and years calculated?
Approximate months divide the total days by 30.436875 (the average length of a month over a 400-year Gregorian cycle) and approximate years divide by 365.2425 (the average length of a year over the same cycle). These are shown alongside the exact calendar breakdown, not in place of it.
Does this account for time zones or a time of day?
No. Dates are treated as plain calendar days with no time-of-day or time-zone component, so the result is the same regardless of where you are.