Date Difference Calculator

Exact days, weeks and hours between two dates.

What is a date difference calculator?

A date difference calculator tells you exactly how many days, weeks, months and years lie between two calendar dates. It is useful for calculating age intervals, project durations, rental periods, warranty coverage, contract terms and the gap between any two events. The calculation runs entirely in your browser.

How the date difference is calculated

The calculator finds the difference by converting both dates to a common unit (milliseconds since the Unix epoch), subtracting, and then converting back to days. The basic formula is:

Days = (End date − Start date) ÷ 86,400,000

where 86,400,000 is the number of milliseconds in one day (24 hours × 60 minutes × 60 seconds × 1,000). Leap years are handled automatically because each date is converted to its absolute position on the timeline.

Step-by-step: find the difference between two dates

  1. Select the start date. The earlier of the two dates you want to compare.
  2. Select the end date. The later date. If you enter a date before the start, the result will be negative.
  3. Click Calculate. You get the difference in days, weeks, months and years.

Common use cases

Inclusive vs exclusive counting

There are two common conventions for counting days:

If you need inclusive counting, simply add 1 day to the result shown.

Tips

FAQ

Is the end date included?

No — we compute end − start, the standard convention. If you need both endpoints included, add 1 day to the result.

How are leap years handled?

Automatically. Each date is converted to an absolute timeline position, so Feb 29 is counted correctly.

Can I get weeks or months?

Yes. The result shows days, weeks, months and years. Weeks = days ÷ 7; months use a 30.44-day average.

What if the end date is before the start?

The result is negative. For the absolute gap, use the countdown calculator.

What calendar does it use?

The Gregorian calendar (international standard). Pre-Gregorian historical dates may need adjustment.