Days between dates calculator
The exact gap between two dates in days, plus weeks, calendar months, weekdays and weekend days. Choose whether the end date counts.
Loading the calculator…
Inclusive or exclusive: which count do you need?
Most disagreements about "how many days" come from whether the first day counts. A spreadsheet subtraction, an age and a countdown all use the difference. Leave allowances, event durations and "days on site" usually count inclusively. When a contract or policy matters, check its wording for phrases such as "from and including".
The fencepost problem, counted three ways
A fence 10 metres long with a post every metre needs 11 posts. Dates have the same trap. Tap a day to move the nearer end, then switch the rule.
Difference (end − start): 6 days. The start day is day zero, the same as subtracting dates in a spreadsheet (=B1−A1). Use this for "how long until" and ages.
How leap years are counted
Every 29 February between your dates adds one day, which is why the tape lists the number of leap days inside the range. The Gregorian rule behind that looks simple but has two exceptions.
Why 2100 won't have a 29 February
The Earth takes about 365.2422 days to go round the Sun (the tropical year). Switch each Gregorian rule on and off to see how close the average calendar year gets.
Average year: 365.2425 days · ahead by one day every 3,226 years against the seasons.
That is the real Gregorian rule (introduced 1582): 97 leap years every 400, so 1900 and 2100 are common years while 2000 was a leap year.
Months and years between dates
Months are measured from the start date's day number: from 10 April, a month is complete on 10 May. When the start day doesn't exist in a later month (the 31st, or 29 February), the count waits until that day number is reached, matching ISO 8601 libraries like Temporal and java.time. That's why 31 January to 28 February is shown as 28 days rather than one month.