AskANumber.com

Date Difference Calculator

The difference between two dates is the exact number of days from one to the other, and this calculator counts them from the real calendar, so leap years are handled automatically. It also expresses the same span as weeks (days divided by 7), average months (days divided by 30.44), and average years (days divided by 365.25).

Days
2,312
Weeks
330.3
Months
76.0
Years
6.33
Hours
55,488
From
15
Jan 2020
2,312
days after
To
15
May 2026
Inputs
From
To
Counts days elapsed, not both ends
From → To is the gap between the dates, so Jan 15 to Jan 16 is 1 day. If you're billing or renting and need both endpoints counted, add one — that's 2,313 days here.
Weeks are exact; months and years are averages
The day and week counts are exact, but months and years divide by average lengths (30.44 and 365.25 days), so they won't line up with calendar anniversaries. For exact years, months, and days, use the Age calculator.
Ask a follow-up
Uses your inputs above
2,312 days. Want to try a variation?
Type a question below to compare scenarios.

The math

Reviewed 2026
Formula
days = (to − from) / 86400 s

Related calculators

Example: how date difference is calculated

Step-by-step with default inputs

Suppose you put the default values into Date Difference Calculator:

From
2020-01-15
To
2026-05-15

Plug those into the formula days = (to − from) / 86400 s and the result is:

Days
2,312

How does the date difference calculator work?

The day count is exact: both dates are converted to timestamps and the difference is divided by 86,400 seconds per day, so leap years and varying month lengths are handled by the calendar itself. The result is an absolute span — swapping From and To changes nothing. The secondary figures are conversions of that day count: weeks divide by 7 and are exact; months divide by 30.44, the average month length (365.25 divided by 12); and years divide by 365.25, which averages the four-year leap cycle. Months and years are therefore close approximations rather than anniversary counts. If you need the exact years, months, and days between two dates, the age calculator performs the calendar-aware version of this subtraction.

Last reviewed July 2, 2026 · Editorial policy

Frequently asked questions

Does the count include both the start and end dates?

No — it counts the days elapsed between them, so January 15 to January 16 is 1 day. If you need an inclusive count where both endpoints count, as in billing or rentals, add 1 to the result.

Why isn't the months figure a whole number?

Because calendar months run 28 to 31 days, the calculator divides the day count by 30.44, the average month length (365.25 divided by 12). That keeps the figure comparable across any range, at the cost of not matching anniversary counting exactly.

Are leap years handled?

Yes — the day count comes from actual calendar dates, so every February 29 inside the range is included. The years figure divides by 365.25 precisely to average out the leap cycle.

Does it matter which date goes in From and To?

No — the calculator reports the absolute span, so swapping the two dates gives the same result. That means you never need to work out which date is earlier before entering them.

How accurate is this date difference calculator?

The math is deterministic — the same inputs always produce the same output, and the formula is shown above. Accuracy of the answer for your situation depends on how well your inputs match reality and how well the formula models the question.

How do I share my result?

Hit Share at the top of the page. Every input you change is encoded in the URL, so a permalink reproduces exactly what you see. No account needed.