Skip to content

Date Difference Calculator

Exact days, weeks, and years between two dates.
By Tally Editorial TeamUpdated 2026-07-314 min read
Advertisement

Introduction

Whether you're counting down to a deadline, figuring out how long a project took, or checking how many days are left until an event, the question is the same: exactly how much time is between two dates? This calculator answers it precisely, in days, weeks, and years/months/days.

It handles the calendar arithmetic correctly — accounting for varying month lengths and leap years — so the result is exact, not an approximation.

How It Works

The calculator finds the total number of days between the start and end dates directly, which is the most precise single figure — useful for countdowns, deadlines, or duration tracking.

It also breaks that same difference down into years, months, and days, which is often more intuitive for longer spans (like '2 years, 3 months, 10 days' instead of just '840 days').

If the end date is before the start date, the calculator still works — it shows the difference as a negative or 'before' relationship rather than an error.

The Formula

Total days from direct date subtraction, plus a calendar-aware years/months/days breakdown:

totalDays = (endDate − startDate) / 1 day; years, months, days = calendarDiff(endDate, startDate)
startDate, endDate
the two dates being compared
calendarDiff()
the same calendar-aware subtraction used by the Age calculator

Real Examples

Days until a deadline 90 days out

Counting the days between today and a date 90 days from now — a common deadline or planning scenario.

Total days = 90, along with the years/months/days breakdown (in this case, about 3 months) and total weeks.

Duration between two past dates

Finding the exact length of time between two historical or past dates — for example, calculating a project's actual duration.

The exact total days and the years/months/days breakdown between the two dates, useful for reporting or record-keeping.

Advertisement

Advantages

  • Exact, calendar-aware results — not an approximation based on '30-day months.'
  • Both a single total-days figure and a broken-down years/months/days view, useful for different purposes.
  • Works for dates in either order, showing clearly whether the end date is before or after the start date.
  • Handles leap years automatically, which manual day-counting often gets wrong.
  • Useful for a wide range of practical questions: deadlines, ages, project durations, contract terms, and more.
  • Fast and free, with no sign-up required for a calculation people need to check often.

Common Mistakes

  • Counting days by hand using an approximate '30 days per month' rule, which drifts from the actual number over multi-month spans.
  • Forgetting to account for leap years when manually counting days across a February that includes one.
  • Confusing inclusive and exclusive date counting — this calculator counts the difference between the two dates directly (exclusive of one endpoint), which is the standard convention for duration calculations.
  • Not double-checking which date is the start and which is the end, especially when working with dates close together.
  • Assuming date input format matches a specific convention (day/month vs month/day) without checking — use the date picker to avoid ambiguity.

Financial Tips

  • For deadline countdowns, set the end date to the deadline and the start date to today for an exact days-remaining figure.
  • Use the years/months/days breakdown for reporting durations in a more human-readable way than a raw day count.
  • This calculator works equally well for entirely past date ranges, useful for calculating exact historical durations.
  • If you need age specifically (from a birth date to today or another date), the Age calculator is framed more directly for that use case.
  • Double-check both dates before reading the result, especially for dates that are close together, where a data-entry mistake is more noticeable in the final count.

Frequently asked questions

How many days are between two dates?

Enter both dates and the calculator shows the exact total number of days between them, calculated directly from calendar dates — not an approximation.

Does this account for leap years?

Yes — the calculation uses real calendar dates, so leap years (and their extra day) are automatically handled correctly.

What if my end date is before my start date?

The calculator still works and will indicate that the end date comes before the start date, with the day count shown as the absolute difference.

What's the difference between total days and the years/months/days breakdown?

Total days is a single precise count (like '840 days'); the years/months/days breakdown expresses the same span in calendar terms (like '2 years, 3 months, 10 days') — both describe the same duration, just in different units.

Can I use this to count down to a future event?

Yes — set the start date to today and the end date to your target date to see exactly how many days remain.

Does this include or exclude the start and end dates?

The total-days figure is the direct difference between the two calendar dates, which is the standard convention used for durations like loan terms, contract lengths, or countdowns. If you need an inclusive count (counting both the start and end day), add one to the result.

Can I calculate the number of business days between two dates?

This calculator counts total calendar days, including weekends. Business-day counting (excluding weekends and holidays) requires a separate calculation, since holidays vary by country and organization.

Is this useful for calculating contract or lease terms?

Yes — entering the start and end dates of a contract, lease, or subscription period shows the exact duration, which is often needed for legal, billing, or renewal purposes.

Can I calculate my pregnancy due date or similar milestone with this?

You can use it to count forward a specific number of days from a known date, though dedicated pregnancy calculators account for additional medical conventions beyond a simple day count.

Glossary

Total days
The exact number of days between two dates, counted directly.
Calendar-aware calculation
A date calculation that correctly accounts for actual month lengths and leap years, rather than using a fixed approximation.
Duration
The length of time between two points, expressed in days, weeks, or years/months/days.
Inclusive count
A duration count that includes both the start and end date, one day more than the direct difference between them.
Your numbers
Start date
Defaults to today
End date
Defaults to 90 days from today
Difference
NaN days
end date is before start date
Years, months, days
NaNy NaNm NaNd
Total weeks
NaN