SimplyCalculated.org

Date Difference Calculator

Pick two dates and get the gap in calendar years, months, and days — plus the exact total in days, hours, minutes, seconds, and weeks. Leap-year aware, updates live, and the comparison is shareable via the URL.

100% private: everything is processed in your browser's memory — nothing you enter is uploaded to a server, logged, or stored.

Date Difference Calculator

The difference counts calendar years, months, and days between the two dates (end date not included), plus the exact total in days, hours, minutes, and seconds.

Duration

0 years, 0 months, 0 days

Total Days

0

Total Hours

0

Total Minutes

0

Total Seconds

0

Total Weeks

0

What Does This Calculator Do?

Given a start date and an end date, this calculator reports the difference between them in two complementary ways. The calendar breakdown expresses the gap the way a calendar does: so many complete years, plus the remaining whole months, plus the leftover days — for example, "4 years, 2 months, 14 days". The totals express the same gap the way a computer does: the exact number of days, hours, minutes, seconds, and weeks between the two dates. Both views are computed from the same underlying day count, so they never disagree: the breakdown parts, measured calendar-style, always add up to the total day count. That pairing makes the tool useful both for talking about durations ("about four years") and for measuring them precisely ("1,535 days"). A short span works the same way: February 28, 2024 to March 1, 2024 is exactly 2 days, crossing 2024's leap day, so the breakdown reports "2 days" with no months or years.

How Is the Calendar Breakdown Computed?

The breakdown counts whole calendar months. Starting from the start date, the calculation advances one month at a time — January 31 becomes February 28 (or 29), never February 31 — and counts how many such steps fit before the end date. The leftover span is then reported in days. This month-advance rule is the same one calendars and contracts use: a month is a calendar month, not a fixed 30 or 31 days, so "one month from January 31" lands on February's real end. The year and month figures come from grouping those whole months (12 months per year), and the day totals are the exact arithmetic difference between the two calendar dates in days. Because every date is treated as a pure calendar date in UTC, daylight saving never disturbs the count.

Timeline showing the span between two dates A horizontal timeline with Date A marked on the left and Date B marked on the right. A bracket beneath the timeline spans the distance between the two points and is labeled "N days" — the same span the calendar breakdown expresses as years, months, and days. Date A Date B N days
Date A and Date B plotted on a shared timeline, with the bracketed span between them showing the day count the calculator reports as the total — the same span the calendar breakdown expresses as years, months, and days.

Month Lengths and Leap Years

Month arithmetic is really day arithmetic in disguise, so the number of days in each month determines the answer:

Month Days (common year) Days (leap year)
January, March, May, July, August, October, December3131
April, June, September, November3030
February2829

A year is a leap year when it is divisible by 4, except centuries that are not divisible by 400 — so 2024 and 2000 are leap years, 1900 is not. These rules are built into the calculator, which is why spans crossing a February 29 report one more day than the identical dates would in a non-leap year.

"1 Month" vs "30 Days" Is a Real Distinction

Many services quote durations in months ("3 months free", "12-month warranty") and others in days ("90-day return policy"), and the two are not interchangeable. A month is a calendar month — 28 to 31 days depending on the month and the year — while a day count is exact. This calculator shows both views so you can convert between them: a 3-month span from January 15 is 91 days in a leap year and 90 in a common year, while a 90-day span from January 15 lands on April 14 in a leap year and April 15 in a common year — an exact day count always means exactly that many days, but which calendar date it lands on still shifts with February's length. Whenever a contract, guarantee, or deadline is involved, check which unit the document actually uses.

Step-by-Step: A Real Example

Compare January 1, 2020 with March 15, 2024. The day total is 1,535: 2020 is a leap year (366 days), 2021, 2022, and 2023 add 365 each (1,461), then January and February 2024 add 31 and 29, and March adds 14 more. For the breakdown, advance from 2020-01-01 by whole months: after 50 months you reach 2024-03-01, which still fits before March 15, and the next step overshoots. So the gap is 50 months and 14 days — 4 years (48 months), 2 months, 14 days. Totals roll out from the day count: 1,535 days is 36,840 hours, 2,210,400 minutes, and 132,624,000 seconds, and about 219.29 weeks. That weeks figure isn't rounded before it's computed: it's the day count divided by 7 (1,535 ÷ 7 ≈ 219.2857), rounded to two decimals only for display — the same pattern every total on this page follows, so they can never drift apart.

Reference Table

Paste any pair below into the calculator to confirm the results:

Start End Breakdown Total
2020-01-01 2024-03-15 4 years, 2 months, 14 days 1,535 days
2024-02-28 2024-03-01 2 days 48 hours
2023-01-31 2023-02-28 1 month 28 days
2024-01-31 2024-03-01 1 month, 1 day 30 days
2024-03-15 2024-03-15 0 years, 0 months, 0 days 0 days

The third row is the classic month-end case: one calendar month after January 31 is February 28, so the breakdown reports a single month even though the span is exactly 28 days.

Practical Example: Working Out an Age

Age is the classic date-difference question, and the two views matter here too. Someone born on February 28, 2020, is on March 1, 2024: 1,463 days old exactly — 308 days remain in 2020 after the birthday, 2021 through 2023 add 1,095 (three common years), and January and February 2024 add 60. The calendar breakdown says 4 years and 2 days: four full calendar years pass at each February 28 anniversary, reaching February 28, 2024, and the final two days carry you across February 29, 2024 — a leap day — to March 1. That leap day is exactly why the breakdown isn't "4 years and 1 day," which is what the same February 28 → March 1 gap would be in any non-leap year. Getting all of this right by hand is exactly the kind of off-by-one trap this calculator exists to remove.

Common Uses

  • Age and anniversaries: how many years, months, and days since a birthday or a milestone.
  • Project timelines: measuring a sprint, a content calendar, or a release window in days and weeks.
  • Lease and contract terms: the exact day count of a rental period, warranty, or subscription — where "how many days" has legal meaning.
  • Counting down: days remaining until an event, a deadline, or a trip.
  • Data analysis: converting timestamp gaps into human durations for reports and dashboards.

Gotchas & Practical Notes

Month-End Clamping

Dates near the end of a month behave differently from mid-month dates: one month after January 31 is February 28/29, so the same pair of calendar days can produce different day counts in leap and non-leap years. The totals always reflect the true number of days, so check those when precision matters.

Whole Days Only

With date-only inputs, every result is a whole number of days. If you need partial-day precision (for example "1 day, 6 hours"), start from timestamps or ISO datetimes instead — this calculator is deliberately date-only to keep the breakdown clean.

Shareable State

The two dates are mirrored into the URL as you pick them, so you can bookmark a comparison or send a link that opens with both dates already set — handy for discussing the same timeline with a colleague.

Frequently Asked Questions

What is the difference between the calendar breakdown and the totals?
The breakdown answers "how does the gap look on a calendar?" — 4 years, 2 months, and 14 days. The totals answer "how long is the gap, exactly?" — 1,535 days, 36,840 hours, and so on. Both describe the same span from different angles: the breakdown is how people talk about durations, the totals are how computers and contracts measure them. They are always consistent with each other — the breakdown parts, counted calendar-style, add up to the total day count.
Why does January 31 to February 28 count as one month and zero days?
Because one calendar month after January 31 does not exist — February has no 31st — so the calculation clamps the anniversary to the month's real end: February 28 (or 29 in a leap year). That makes Jan 31 to Feb 28 exactly "1 month, 0 days", which is the same answer a calendar would give. The total day count of 28 is still reported separately, so you never lose the precise number.
Does the calculation account for leap years?
Yes, automatically. The day totals count real days, so February 29 is included when the span crosses a leap day — 2024-02-28 to 2024-03-01 is 2 days, not 3. The month arithmetic also knows each month's true length, so a span from January 31 advances to February 29 in a leap year and February 28 otherwise.
Are the dates interpreted in a specific time zone?
No — and that is deliberate. The calculator treats each date as a pure calendar date (midnight UTC), so the results are identical for every visitor in every time zone, and daylight saving can never shift the day count by one. If you need time-of-day precision, remember that a date-only difference always reports whole days.
What happens if I enter the dates in the wrong order?
The calculator requires the end date to be on or after the start date and shows a clear message if it is not — it will not silently return a negative duration. Swap the two dates if you want the gap the other way round.
Is the end date counted in the total?
No. The difference is the number of whole days between the dates — from the start of the start date to the start of the end date. 2024-03-01 to 2024-03-02 is 1 day, not 2. If your convention counts the end day itself (for example, some service-credit calculations do), add one to the totals yourself.
Is my input sent anywhere?
No. The calculation runs entirely in your browser. The dates you enter are reflected in the page's URL so you can bookmark or share the exact comparison, but they are never transmitted to any server.

Formula last verified August 22, 2026 against our published methodology .