Date difference calculator
Pick a start date and an end date. The calculator shows the total number of days between them, plus the gap in weeks and in years, months, and days.
Enter two dates to see how far apart they are — as a total day count and as a calendar breakdown.
Total days
359 days
- Total weeks
- 51
- Weeks + days
- 51 weeks and 2 days
- Years / months / days
- 11 months, 24 days
The total days is the exact number of calendar days between the dates. The breakdowns express that same span in weeks plus days, and in years, months, and days.
How does it work?
Each date is converted to a UTC millisecond timestamp; the gap is divided by the milliseconds in a day (86,400,000) and rounded to whole days. Using UTC avoids timezone and daylight-saving drift.
Date difference
- start
- The earlier date (YYYY-MM-DD).
- end
- The later date (YYYY-MM-DD).
From 2024-01-01 to 2024-01-08 is 7 days, or 1 week.
Method & sources
The result counts whole calendar days between the two dates. Dates are compared in UTC, so time zones and daylight saving never shift the count. The order of the dates does not matter — the difference is always reported as a positive span.
Sources
Where this method comes from — use these references to understand the formula, assumptions, and limits.
- Calendar systems and date arithmetic — National Institute of Standards and Technology, verified 2026-06-10
How we calculate
- The result counts whole calendar days between the two dates.
- Dates are compared in UTC, so time zones and daylight saving never shift the count.
- The order of the dates does not matter — the difference is always reported as a positive span.
What this calculator does
It measures the distance between two calendar dates. You get the total number of days, the same span as whole weeks plus leftover days, and a calendar breakdown into years, months, and days.
How to use it
- Choose the start date.
- Choose the end date.
- Read the total days and the two breakdowns below.
A worked example
From 1 January 2024 to 8 January 2024 is 7 days, which is exactly 1 week. From 1 January 2024 to 1 January 2025 is 366 days, because 2024 is a leap year.
Common questions
- The count is inclusive of neither endpoint twice: it is the gap between the dates, so the same date for both gives 0 days.
- Swapping the start and end date gives the same result — the span is always positive.
- Leap years are handled automatically, so February 29 is counted when it falls inside the range.
When it's useful
Counting down to a deadline, working out how long ago something happened, tracking notice periods, or measuring the length of a trip or project.
FAQ
- How do I calculate the number of days between two dates?
- Enter both dates. The calculator subtracts one from the other in UTC and reports the whole number of calendar days between them.
- Does the order of the dates matter?
- No. The difference is always shown as a positive span, so it does not matter which date you put first.
- Are leap years taken into account?
- Yes. February 29 is included whenever it falls within the range, so spans crossing a leap day are counted correctly.
- Why use UTC?
- Comparing in UTC means time zones and daylight saving changes never add or drop a day, so the count is stable everywhere.
- What does the years, months, and days breakdown mean?
- It expresses the same gap the way people usually say it — for example 1 year, 2 months, and 5 days — counting forward from the earlier date.
- Can I share a calculation?
- Yes. Use Share to copy a link that reopens the calculator with the same two dates.
Related calculators
Embed this calculator
Add this calculator to your own site. The snippet includes the calculator iframe and a small attribution link:
<iframe src="https://wisecalcs.com/embed/en/date-difference-calculator" width="100%" height="520" style="border:0" loading="lazy"></iframe>
<p>Calculator from <a href="https://wisecalcs.com/en/time-date/date-difference-calculator">WiseCalcs</a></p>