Dates and time · Calculator

How many days are there between two dates?

Choose two dates and the calculator counts the exact number of calendar days between them, the full weeks and the remainder, and shows the day of the week of each date.

Exact calculation Formula shown Your data stays in your browser

Your data

1. Dates

The order of the dates does not matter: the calculator shows which one is earlier.

2. Counting method

Normally there are two days between 1 and 3 January. If both dates should count as days (for example, days of a stay), switch on counting both dates.

On: 1 → 3 January = 3 days. Off: 2 days.

How we calculate

  1. each date → serial day number in the Gregorian calendar
  2. difference = |second date number − first date number|; when counting both dates: plus one
  3. full weeks = difference ÷ 7 (integer part); remaining days = difference − weeks × 7

Assumptions

  • Dates are calendar dates without the time of day; the difference in days does not depend on the time zone.

Limitations

  • Working days, public holidays, hours between two moments in time and the difference in months or years are separate calculators.
  • The Gregorian calendar is also applied to dates before 1582 (proleptically).

Sources

A universal formula with no external constants. Default values are labelled as approximate examples, not verified facts.

Questions and answers

Why are there two days between 1 and 3 January, not three?

Because the distance between the dates is counted: from the 1st to the 2nd is one day, from the 2nd to the 3rd is the second. If you are counting days of a stay or a rental, where 1 and 3 January are both days, switch on counting both dates.

Related tools

The result is mathematically exact for the data you entered and the calculation rules described; real conditions (tariffs, a supplier’s rounding, your contract) may differ from what you entered.

Formula version date-difference@1.1.0 · checked 25 September 2026

Checked by the Calc editorial team: three independent implementations of the formula, test cases and the live page on a phone. Last check: 27 September 2026