Numbers & Dates

Date Difference Calculator

Calculate the exact number of days, weeks, months and years between any two dates — useful for deadlines, age calculation and project planning.

Open Date Calculator →
Looks like you're using an ad blocker. Devbin is free — ads help keep it running.

Common Use Cases

Age calculation
Enter birth date → today to get exact age in years, months and days.
Project deadlines
How many days until the release date? Count from today to the deadline.
Contract duration
How long was an engagement? From start date to end date.
SLA tracking
How many days has an issue been open? From creation to today.
Licence expiry
How many days remain on a subscription or certificate?
Scheduling
How many weeks between two events to plan recurring tasks?

How to Use It

1

Open the tool

Go to Numbers & Dates and scroll to the Date Difference Calculator.

2

Enter the start date

Select or type the start date. You can also use today's date with the "Today" shortcut button.

3

Enter the end date

Select or type the end date. The result updates instantly.

4

Read the result

The difference is shown in total days, weeks, months and years.

Pro Tips

💡In JavaScript: Math.abs(new Date(end) - new Date(start)) / 86400000 gives the difference in days.
💡For business days, subtract Math.floor(daysDiff / 7) * 2 from the total days as a rough weekend exclusion.
💡For precise month/year differences, libraries like date-fns (differenceInCalendarMonths) handle edge cases like month-end dates more reliably than manual arithmetic.

Frequently Asked Questions

How is the difference calculated?
By subtracting the earlier date from the later to get milliseconds, then converting to days (÷ 86,400,000), weeks, months and years.
Does it account for leap years?
Yes — leap years (with 366 days) are accounted for when calculating month and year differences.
How do I calculate someone's age?
Enter the birth date as start date and today as end date. The years component is the age.
Can I exclude weekends?
The basic calculator counts all calendar days. For business days, subtract 2 days per complete week in the range as an approximation.

Calculate date difference now

Open the Date Difference Calculator and get the exact duration between any two dates — free, no login.

Open Date Calculator →