CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Date and time
How-to

How do I calculate the number of days between two dates?

Short answer

Enter a start date and an end date into a browser-based date difference calculator and it gives you the exact gap in years, months and days, plus the total number of days, weeks, hours and minutes. It runs on your device and removes the guesswork of counting across months and leap years.

Why counting by hand goes wrong

Working out the days between two dates by hand means remembering that months have different lengths and that February changes in a leap year, which is exactly where mistakes creep in. A calculator does the calendar arithmetic for you, so you get an accurate answer whether the dates are a week apart or span several years. It typically shows both a human breakdown, in years, months and days, and the raw total in days.

Where this is useful

Counting days between dates comes up constantly: how long until a deadline, how many days a project ran, the notice period on a contract, the gap between two events, or how many days old something is. Having the total in days, weeks, hours and minutes as well as the calendar breakdown means you can pick whichever unit the situation needs. The calculation runs in your browser, so the dates you enter are never sent anywhere.

Step by step

  1. Enter the start date. Pick or type the earlier date.
  2. Enter the end date. Pick or type the later date.
  3. Read the difference. The tool shows the gap in years, months and days plus the total days, computed locally.

Frequently asked questions

Does it account for leap years?

Yes. The calculator uses real calendar rules, so leap years and varying month lengths are handled correctly.

Can I get the total in weeks or hours?

Yes. It shows the total number of days, weeks, hours and minutes alongside the years-months-days breakdown.

Are the dates sent to a server?

No. The calculation runs entirely in your browser.

Related answers