Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Difference Between Dates
365
days
Signed difference (end − start) 365 days
In weeks 52.14 weeks
In months (avg) 11.99 months
In years (avg) 1 years

What is the Date Difference Calculator?

This calculator tells you exactly how many days separate two calendar dates. Enter a start date and an end date and it returns the gap in days, plus convenient conversions into weeks, months and years. It is useful for counting down to events, measuring project durations, calculating age in days, tracking notice periods, or working out how long ago something happened.

How to use it

Pick a start date and an end date using the date pickers, then read the result. The headline figure is the absolute number of days between the two dates. A signed value (end minus start) is also shown — negative means the end date comes before the start date — along with approximate weeks, months and years.

The formula explained

The calculator converts each date to a timestamp and subtracts them, then divides by the number of seconds in a day (86,400) to get whole days. Weeks divide that by 7, months use the average month length of 30.4375 days, and years use 365.25 days to account for leap years on average.

$$\text{Days} = \left|\; \text{End date} - \text{Start date} \;\right|$$

$$\begin{gathered} \text{Days} = \left|\; \text{End date} - \text{Start date} \;\right| \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \text{Weeks} &= \frac{\text{Days}}{7} \\ \text{Months} &= \frac{\text{Days}}{30.4375} \\ \text{Years} &= \frac{\text{Days}}{365.25} \end{aligned} \right. \end{gathered}$$

Timeline showing the gap between two dates
The difference is the span between the start date and end date on a timeline.

Worked example

From 2024-01-01 to 2024-12-31: 2024 is a leap year (366 days), so the difference is 365 days. That is \(365 \div 7 \approx 52.14\) weeks, \(365 \div 30.4375 \approx 11.99\) months, and \(365 \div 365.25 \approx 1.0\) year.

Same duration shown as years, months, weeks and days
The same gap can be expressed in years, months, weeks or days.

FAQ

Does it count the end date? The result is the elapsed number of days from the start to the end, so the difference between consecutive days (e.g. Jan 1 to Jan 2) is 1.

Does it handle leap years? Yes. Because it works on real timestamps, February 29 and leap years are counted automatically.

What if the end date is before the start date? The headline days figure is always shown as a positive number; the signed row shows a negative value to indicate the reversed order.

Last updated: