Date Difference Calculator

Find the time between any two dates — in years, months, and days, and as a total number of days and weeks.

Enter both dates to see the difference.

FreeNo sign-upPrivate — runs in your browser, nothing is uploaded

Quick answer

A date difference calculator counts the time between a start date and an end date. It reports full years, then leftover months and days, using the calendar so different month lengths and leap years are handled correctly, and also gives the total number of days.

Formula & method

The difference is computed with real calendar dates. Full years are counted from the start date, then whole months (a day like the 31st is clamped to the end of shorter months), then leftover days. The total day count is the exact number of calendar days between the two dates, also shown as whole weeks plus days.

Examples

Example 1: 2020-01-01 to 2026-06-05

Input
start 2020-01-01, end 2026-06-05
Result
6 years, 5 months, 4 days
Why
6 full years to 2026-01-01, then 5 months and 4 days more.

Example 2: Total days for the same range

Input
start 2020-01-01, end 2026-06-05
Result
2,347 days
Why
The exact calendar day count, including the 2020 and 2024 leap days.

Example 3: A two-week trip

Input
start 2026-07-01, end 2026-07-15
Result
14 days (2 weeks)
Why
15 July minus 1 July is 14 days.

When to use this tool

  • Counting the days or weeks between two events.
  • Working out a project duration or notice period.
  • Finding how long ago something happened.

Common mistakes

  • Expecting the day count to include both endpoints. The difference counts the gap, not the start day itself.
  • Estimating months as 30 days each — real months vary from 28 to 31.
  • Reading a reversed entry as a negative span; if the end date is earlier, the tool still shows a positive span and notes the reversal.

Assumptions

What the result takes for granted:

  • Both dates are read in your local calendar, and full calendar days are counted (not partial times).
  • Leap years and varying month lengths are handled automatically.
  • The order doesn't matter — the difference is reported as a positive span.

Limitations

Where this tool stops — and what to use instead:

  • Counts calendar days, not business days — use the business-days calculator to skip weekends (it does not remove public holidays).
  • Ignores time zones and clock time; it works at day resolution, not hours or minutes.
  • It measures elapsed days, which may differ from legal or contractual 'day count' conventions.

Frequently asked questions

How do I calculate the difference between two dates?

Enter a start and end date. The tool counts full years, then months, then leftover days, and also shows the total number of days and weeks between them.

Does it include leap years?

Yes. Because it uses actual calendar dates, leap days are counted automatically.

Does the total include both the start and end day?

It counts the gap between the dates. For example, 1 July to 15 July is 14 days, not 15.

Can I count business days only?

No. This tool counts all calendar days, so weekends and holidays are included. To count Monday–Friday only, use the business-days calculator (it skips weekends but not public holidays).

Are my dates uploaded?

No. The calculation runs entirely in your browser.

Do I have to enter the start date before the end date?

No. The tool automatically identifies which date is earlier and which is later, so the order doesn't matter. You'll get the same result either way.

What if both dates are the same?

The result is 0 days, 0 weeks, and 0 years. The tool will display this as 0 total days.

  • Free
  • No sign-up
  • Runs entirely in your browser — nothing is uploaded.
  • Formula and method shown above

Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards below.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the tool to appear: