No upload, 100% local, no account

Date difference calculator

Pick a start and end date to see the exact gap in days, weeks, months and a full years/months/days breakdown.

How Date difference works

Date Difference counts the exact number of days, complete weeks, full calendar months and whole years between any two dates you choose. Every calculation runs locally in your browser using standard JavaScript date arithmetic; nothing you enter is sent anywhere, and the tool works without an internet connection once the page has loaded.

The calculation follows the Gregorian calendar. Days are counted by finding the difference between the two date timestamps at midnight UTC to avoid daylight-saving ambiguity. Months and years are counted by walking the calendar forward (or backward) from the earlier date until reaching the later one, which accounts correctly for variable month lengths and leap years. The result shows all four units simultaneously so you can use whichever fits your need.

How to use Date difference, step by step

  1. Enter the start date in the first date field.
  2. Enter the end date in the second date field.
  3. The difference in days, weeks, months and years appears instantly.
  4. Swap the dates using the swap button if you entered them in the wrong order.
  5. Copy the result you need from the output panel.

Common use cases

  • You want to know how many days remain until a contract deadline or event date.
  • You need to bill a client for work performed between two dates and must count the exact number of days.
  • A patient or caregiver needs to track how many weeks have elapsed since a diagnosis or surgery.
  • A project manager needs to verify whether a sprint covers the exact number of calendar weeks agreed in the plan.

Frequently asked questions

Does the tool count both the start date and the end date in the total?

By default the result is the number of days between the two dates, not including either endpoint. If you need an inclusive count (where both the start and end day are counted), add 1 to the displayed day count.

How are full months calculated when months have different lengths?

The tool advances from the start date month by month until passing the end date, then counts the remaining days. This means 'one month' always refers to a calendar month, not a fixed 30-day period. For example, from 31 January to 28 February is one month and zero days.

Can I calculate the difference across years that include a leap year?

Yes. The calculation uses the actual calendar dates, so leap days (29 February) are counted when they fall within the range. A range spanning a leap year will include that extra day in the total.

Does the date I type get stored or sent to any server?

No. The two dates you pick are held only in the browser tab's memory for the duration of the calculation. They are never transmitted, logged, or retained after you close the tab.

What happens if I set the end date before the start date?

The tool returns the absolute difference regardless of order, or shows a negative sign to indicate the end date precedes the start date, depending on the display setting. Use the swap button to reverse the inputs if you prefer a positive result.

Is the result affected by time zones?

No. The tool compares calendar dates at midnight, so the difference is purely in days, months and years. Time-of-day and time zone offsets do not affect the result.