Date Difference Calculator
Count the exact time between two dates in years, months, days, weeks and hours.
Content updated July 31, 2026
Need to know exactly how long it is between two dates — for a deadline, an anniversary, a project, or a countdown? This calculator counts the precise gap between any start and end date in years, months and days, plus handy totals in weeks, days and hours.
It handles leap years and different month lengths correctly, so the answer is exact rather than a rough estimate.
The Date Difference formula
Difference = later date − earlier date, expressed as full years, then months, then daysThe two dates are your start and end. Full years are counted first, then whole months, then leftover days. Totals in weeks, days and hours come from the exact day count, with leap years included.
Worked example
From 1 January 2020 to 29 July 2026 is 6 years, 6 months and 28 days — about 2,401 days, or roughly 343 weeks.
Assumptions, rounding, and limitations
Assumptions
- Inputs are local calendar dates and the result is always non-negative.
- The start date is excluded from elapsed-day totals.
- Calendar duration counts full years, then full months, then remaining days.
Rounding: Total days are exact calendar-day counts; whole weeks are truncated and hours equal total days × 24.
Limitations
- Does not include both endpoints, business-day rules, holidays, time zones, or times of day.
- Calendar month durations vary, so the years-months-days breakdown is not interchangeable with a decimal month total.
How the difference is counted
The calculator counts full years first, then remaining months, then leftover days between the two dates — the natural way to express a duration. The totals (weeks, days, hours) come from the exact number of days between the dates, so leap years are accounted for automatically.
Pick either order for the dates; the calculator always reports a positive duration.
Frequently asked questions
▶How do I count the days between two dates?
Enter a start and end date above and the calculator shows the exact number of days between them, along with the gap in years, months, weeks and hours.
▶Does the count include both the start and end date?
It measures the elapsed time from the start date to the end date, so the start day itself isn't counted as a full day. If you need both endpoints included, add one to the day total.
▶How do I calculate the number of weeks between two dates?
Divide the total number of days by 7. The calculator does this for you and also reports whole weeks with any leftover days.
▶Does it count business days or all days?
It counts all calendar days, including weekends and holidays. For working days only, you'd need to subtract weekends and public holidays separately.
▶Can I enter the dates in any order?
Yes. The calculator always reports a positive duration, so it doesn't matter which date you put first.
Related calculators
Find your exact age in years, months and days — plus total weeks, days and hours.
Open calculator →Work out a percentage of a number, what percent one number is of another, and percentage increase or decrease.
Open calculator →Count calendar days to or since a target, with weeks, inclusive endpoints, and a calendar duration.
Open calculator →Disclaimer: Date Difference Calculator results are estimates for general information and education only, and are not financial, tax, legal or medical advice. Verify important decisions with a qualified professional.