Free online tool

Date Difference Calculator

Compare two calendar dates in whole years, remaining months and days. Check the elapsed day total separately, especially across month ends.

Instant calculation

Calculate Date Difference

Enter a start date and an end date to find the exact difference.

Calculation inputs are processed in your browser. Copying or sharing a result is your choice. See our privacy policy for advertising and technical logs.

Tool and explanation maintained by Leslie. Report an incorrect result.

Input steps

How to use this calculator

  1. 01

    Enter the start date

    Type the year, month and day for the earlier date.

  2. 02

    Enter the end date

    Type the year, month and day for the later date.

  3. 03

    See the difference

    Calculate to see the exact gap in years, months, days, weeks and total days.

The formula

How this calculation works

Count the full years between the dates, then the remaining months, then the days. Total days, weeks and months are also calculated.

Date Difference Calculator

Difference = End Date − Start Date

Check the method

Worked examples

Each example follows the same formula used by the calculator.

Days between Jan 1 and Dec 31, 2026?

Dec 31 − Jan 1 = 364 days (non-leap year)364 days

How much time passed from July 1, 1990 to July 1, 2026?

Both dates are July 1, so the full-year count is 2026 − 1990.36 years, 0 months, 0 days.

Calendar components are not interchangeable

January 1 to February 1 is one calendar month but 31 elapsed days. February 1 to March 1 may be 28 or 29 days. Do not assume the months component means a fixed number of days.

Read a calendar interval across month ends

February 28 to March 1 in 2024 spans two days because February 29 exists. The same dates in 2025 span one day. January 1 to February 1 is one calendar month and 31 days, so months and days are alternative descriptions rather than interchangeable units. Use the day total when comparing durations on a common scale.

Check an anniversary or month end

From January 31 to February 28, 2025 the calendar result is one month and zero remaining days. February has no 31st, so the month ends at its last valid date. The elapsed total is 28 days. A February 29 anniversary advances to March 1 in a non-leap year under this tool’s convention. Reversing the dates returns the same positive gap.

Method notes updated by Leslie.

Common questions

Questions about this calculation

Does the result count both endpoints?

The elapsed-day gap between January 1 and January 2 is one day. A list containing both dates has two dates. For a rule that explicitly includes both endpoints, account for that separately.

Can I calculate backwards from an earlier date?

Yes. The calculator works in both directions. If the end date is before the start date, the difference is still displayed correctly.

Does the date difference include the end date?

The calculation counts full calendar days between the two dates. The first day is exclusive and the last day is inclusive for a forward calculation.

What date format should I use?

Enter the year, month and day in separate fields. Month uses 1 for January through 12 for December.

Can I use this to calculate ages?

Yes. The Age Calculator is built on the same algorithm. For a direct age calculation, use the Age Calculator instead.