Date Calculator

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

Days Between Two Dates
Enter two dates to calculate the difference

How to calculate days between two dates

Enter any two dates — past, present or future — and the calculator instantly shows the exact difference broken down into years, months and days, plus the total in days, weeks and hours.

What is the date difference formula?

The simplest approach is to count the total number of milliseconds between two timestamps and convert to days: days = (dateB − dateA) / 86,400,000. For an exact breakdown in years, months and days, the calculator accounts for varying month lengths and leap years.

Common use cases

The date calculator is useful for: calculating how many days until a deadline or event, finding the exact duration of a project or contract, determining how long ago something happened, or planning schedules and anniversaries.

Frequently Asked Questions

How many days are in a year?

A common year has 365 days. A leap year (divisible by 4, with exceptions for century years) has 366 days. On average, a year has 365.2425 days.

How many weeks are between two dates?

The calculator shows total complete weeks plus the remaining days. For example, 30 days = 4 weeks + 2 days.

Does the calculator include the end date?

The calculator counts the gap between dates. If you want to include the end date, add 1 day to the result.

Step-by-step guide Days Between Dates — How Date Arithmetic Works →