Skip to content

Date Difference Calculator

Enter a start and end date and get the exact difference in years, months and days — calculated the way a calendar actually works, correctly handling different month lengths and leap years, alongside the plain total number of days between them.

  • Exact years, months and days, calendar-aware
  • Total number of days between the two dates
  • Works with any two dates, in either order
  • Runs fully client-side

Calculator

Calculated locally, nothing uploaded

How to calculate the difference between two dates

  1. 01

    Enter the start date

    The earlier of the two dates.

  2. 02

    Enter the end date

    The later date — the result updates instantly.

  3. 03

    Read the result

    Years, months and days broken down separately, plus the plain total day count.

Why the years/months/days breakdown is not a rough estimate#

A quick mental calculation of the gap between two dates tends to divide total days by 30 or 365, which drifts noticeably from what a calendar actually shows because real months range from 28 to 31 days. This tool works the way counting by hand would — subtracting the end date's month and day from the start date's directly, and correctly borrowing a real month's worth of days (from whichever specific month is relevant) whenever that subtraction goes negative — so the result matches what flipping through a physical calendar would show.

Why the total day count is shown separately#

"3 years, 2 months, 15 days" and a plain day count answer two different, equally common questions — one is useful for describing a duration in a natural, readable way; the other is useful for anything that needs a single number, like calculating a daily rate or comparing two spans of time directly. Both are shown together since either can be the one that actually matters for a given use.

Works regardless of which date comes first#

The calculator treats the earlier of the two entered dates as the start automatically — swapping which field the earlier date is entered into does not change the result, since the actual chronological gap between the two dates is what gets calculated either way.

Frequently asked questions

Why not just estimate months as 30 days each?

Because real months range from 28 to 31 days, and that estimate drifts from what a calendar actually shows. This tool subtracts calendar dates directly, borrowing real month lengths when needed, matching what counting by hand on a calendar would produce.

Why does this show both a years/months/days breakdown and a total day count?

They answer different questions — the breakdown is a natural, readable duration; the total day count is useful for anything needing one plain number, like a daily rate calculation. Both are shown since either can be what you actually need.

Does it matter which date I enter first?

No — the earlier date is treated as the start automatically, so the result is the same either way.

Is my data sent anywhere?

No. The calculation runs entirely in your browser.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.