Skip to content

Menu

Date Difference Calculator

Calculate the exact difference between two dates.

Runs entirely in your browserMath & FinanceFree, no sign-up
Loading tool

01What is Date Difference Calculator?

Date Difference Calculator tells you how long the gap is between two calendar dates, expressed four ways at once. Pick a Start Date and an End Date and the Results card shows Total Days, Weeks + Days, Total Months, and a Years + Months + Days breakdown. It's the tool to reach for when someone asks how long a contract ran, or how old an unpaid invoice is. By default the count is exclusive. It counts from the start date up to the end date without counting the end itself, so Monday to Friday of one week is 4 days. Tick "Include the end date" and the tool adds one day before it does anything else. Monday to Friday becomes 5 days, and every other result shifts to match. Leave policies, hotel stays and many contracts count inclusively, so check which rule applies to you. The date order doesn't matter. If the End Date is earlier, the tool quietly swaps them and reports a positive gap. Months are counted on the calendar, not as 30-day chunks. When a start day doesn't exist in the target month, it's clamped to that month's last day. So January 31 to February 28 is exactly one month, and January 31 to March 1 is one month and one day. The same rule makes February 29, 2024 to February 28, 2025 a clean one year. Each date is parsed as a calendar day fixed at midnight UTC, then the gap is computed in whole days. No clock times are involved, so the answer is identical in every time zone and a daylight-saving change can't nudge it by an hour. Dates follow the Gregorian calendar used by ISO 8601. Worked example: 2026-01-01 to 2026-12-31 gives 364 days, shown as 0y 11m 30d or 52w 0d. Tick the include box and it reads 365 days, 1y 0m 0d, 52w 1d. The copy icon puts that one-line summary on your clipboard, ready for a ticket or spreadsheet. What it doesn't do: there are no time-of-day fields, so you can't measure hours between two timestamps. It doesn't skip weekends or holidays, which is a job for a business-days tool. The years-months-days split also reflects one month-end convention, and some finance systems use another, such as 30/360. The calculation runs in the page script on your machine, and the two dates you enter aren't uploaded anywhere.

HR and finance staff measuring tenure and invoice age, project managers timing phases, and developers checking their own date-diff code. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Date Difference Calculator

  1. Pick the Start Date
  2. Pick the End Date (either order works)
  3. Tick "Include the end date" if both ends of the range should count
  4. Read Total Days, Weeks + Days, Total Months and Years + Months + Days in the Results card
  5. Click the copy icon next to Results to copy the one-line summary, or Reset to clear both dates

03Worked examples

Input: 2026-01-01 to 2026-12-31
Result: 364 days (0y 11m 30d, or 52w 0d)
Exclusive by default, so the end date is not counted.
Input: 2026-01-01 to 2026-12-31, Include the end date ticked
Result: 365 days (1y 0m 0d, or 52w 1d)
One extra day turns this span into exactly one year.
Input: 2026-11-23 to 2026-11-27 (Monday to Friday)
Result: 4 days (0y 0m 4d, or 0w 4d), 5 days with the end date included
Two runs combined into one line.
Input: 2024-02-29 to 2025-02-28
Result: 365 days (1y 0m 0d, or 52w 1d)
From a leap day, one year later is clamped to February 28.
Input: 2026-01-31 to 2026-03-01
Result: 29 days (0y 1m 1d, or 4w 1d)
January 31 plus one month is clamped to February 28, leaving one extra day.
Input: 2026-12-25 to 2026-11-22
Result: 33 days (0y 1m 3d, or 4w 5d)
The end date is earlier, so the dates are swapped and the gap stays positive.

04Common use cases

  • Working out an employee's tenure in years, months and days for a reference letter or HR record
  • Ageing open invoices or support tickets by the number of days since they were raised
  • Measuring how long an incident or project phase lasted for a retrospective write-up
  • Counting the nights of a rental or the days of a trip where both the first and last day count
  • Checking a date-diff function in your own code against an independent result
  • Confirming a notice period, such as whether 90 days have actually passed since a letter was sent

05Tips

  • Inclusive and exclusive counts always differ by exactly one day. Confirm which one a contract or policy uses before quoting a number
  • Total Days is unambiguous. The months-and-days split depends on the month-end rule, and this tool clamps January 31 plus one month to February 28
  • In JavaScript, new Date("2026-03-01") is midnight UTC, which is still February 28 in the Americas. That's a classic source of off-by-one bugs when you compare results
  • For gaps between two clock times, use timestamps. Two dates alone can't tell you elapsed hours across a daylight-saving change
  • Ticking the include box can turn 11 months 30 days into an even 1 year, which is often the figure people expect for a full calendar year

06Related concepts

Duration calculation, Inclusive counting, Date arithmetic, ISO 8601.

Frequently Asked Questions

What is Date Difference Calculator?

Date Difference Calculator is a free, browser-based developer tool on AIDToolStack. Calculate the exact difference between two dates. It requires no installation or sign-up and works entirely in your browser.

Is Date Difference Calculator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Date Difference Calculator store my data?

No. It runs in your browser; nothing is uploaded.

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe