Date & Time

Date Difference Calculator

Find the difference between two dates in days, months, and years.

The date-difference calculator counts whole days from a start date to an end date. It divides the millisecond gap by 86,400,000 and rounds down. If the end date is earlier, the result is 0 rather than a negative number. It does not return months or years.

Reviewed 2026-11-08. The result is an educational estimate, not professional advice.

Enter your values

This calculation stays in your browser. Nothing is sent when you press Calculate.

Result

Enter values to calculate.

Formula

Difference = End date - Start date

Example

From 01 Jan 2025 to 01 Jan 2026 is 365 days.

Two glass calendars linked by a dotted path of light.
Illustration only. Use the formula and the result box for the number.

How many days are between two dates?

Subtract the start from the end and keep only whole days. From 1 January 2025 to 1 January 2026 the span is 365 days, which is the example on this page. 2024 would differ because it is a leap year.

The count uses the JavaScript date values of the two dates and ignores the time of day you might imagine. Both fields are dates.

A same-day start and end is 0 days. The page does not add one to include both endpoints. If you need an inclusive count, add 1 to the result yourself and say that you did.

Why not use the age calculator for a day count?

The age calculator returns years, months and days, with borrow rules. This page returns only whole days and floors the result at zero. Pick the page that matches the unit you need.

Neither page knows business days, holidays, or time zones. They are calendar arithmetic.

How to use this calculator

  1. Enter the start date. This is the first day of the span.
  2. Enter the end date. This is the last day. An empty or invalid date stops the calculation.
  3. Read the day count. The result is a non-negative whole number of days.

Questions about Date Difference Calculator

Does the count include both the start and the end date?

No. It is the difference, so the start day is not added back. Add 1 only if you have decided you need an inclusive count.

What happens if the end date is before the start?

The page shows 0 days. It does not show a negative span.

Does a leap day count?

Yes, if that calendar day falls inside the span, because the count uses actual dates rather than a fixed 365.

Can I get months and years here?

No. Use the age calculator when you want a year, month and day breakdown.

Read the guide

Use the age calculator when you want completed years, leftover months and leftover days. Use the date-difference calculator when you want the span as a whole number of days. They are not two views of the same output. One borrows months and days. The other divides the date gap by 86,400,000 and floors the result at zero.

Open “Age in years and months, or a plain day count”

What this helps you do

  • Estimate Date Difference from the inputs you already have.
  • Check the result against the formula and the worked example.
  • Change one value at a time and compare the new estimate.

Limits to keep in mind

  • The figure is only as complete as the inputs on this form.
  • Rounding, fees, and local rules can change the real-world number.
  • Use it to learn and compare. Confirm important finance or health decisions with a qualified professional.