[=] CalcStack

Home / Date & Time / Date Difference

Date Difference Calculator

Find how many days, weeks and months lie between two dates.

How to use this calculator

Pick a start date and an end date, then press Calculate difference. The tool returns the total number of days between them, the same span expressed in weeks, and a calendar breakdown in years, months and days. The order does not matter — if you put the later date first, it simply reports the gap. It is useful for counting down to an event, working out how long ago something happened, tracking notice periods, or measuring the length of a project.

How the calculation works

Dates are compared by the actual time between them:

days = (end − start) ÷ one day · weeks = days ÷ 7

Because the calculation uses real calendar dates rather than assuming every month has 30 days, leap years and the different lengths of months are handled automatically. The total-days figure is exact. The years-months-days breakdown is built by counting whole years first, then whole months, then the leftover days, borrowing from the previous month's length where needed — the same way ages are worked out.

A worked example

From 1 January 2026 to 12 June 2026 is 162 days. That is 23 weeks and 1 day, or a calendar breakdown of 0 years, 5 months and 11 days. Swapping the dates gives the same 162-day gap — the tool always reports a positive difference.

Frequently asked questions

How do you calculate days between two dates?

Subtract the earlier date from the later one and convert the result to whole days.

Does it count leap years?

Yes — it uses real calendar dates, so leap years and month lengths are handled.

How many weeks is that?

Divide the number of days by seven for whole weeks and any remaining days.

Related calculators