Guides
How to Count the Days Between Two Dates
The arithmetic is simple, but the ambiguity is not. How to count calendar days, when to include the end date, and where leap years actually change the answer.
Updated: 2026-10-19 · 6 min read
Subtracting one date from another looks like the simplest calculation on a calculator. It is also the source of a surprising share of billing disputes, missed deadlines and off-by-one errors. The subtraction is easy; deciding what to subtract is not.
Two questions hiding inside one
When someone asks how many days there are from Monday to Friday, they could mean four or five depending on whether both ends count. That single ambiguity explains most of the disagreement around date maths, and it is worth settling before any number is quoted.
The convention this site uses is the interval convention: the number of whole days between the two dates, so the same date on both sides returns zero. Monday to Friday is four days. The alternative — inclusive counting, where both endpoints count — is common in hotel nights, rental periods and legal notice periods, and gives five.
- Interval counting: how much time passes between the two moments. Same date = 0.
- Inclusive counting: how many calendar dates the range covers. Same date = 1.
- A hotel stay from the 1st to the 3rd is two nights but three dates.
Counting by hand, month by month
The reliable manual method is to break the span at month boundaries rather than trying to remember how many days each month has. Take the days left in the first month, add every full month in between, then add the days used in the last month.
From 12 March to 9 June: March has 19 days left after the 12th (31 − 12), April contributes 30, May contributes 31, and June contributes 9. The total is 89 days. Doing it this way means you only ever need to know the length of the months you actually touch.
The same method works backwards. To find the date 90 days before a deadline, subtract whole months until you get close, then count the remainder day by day. Subtracting 30-day blocks is tempting and wrong, because only four months of the year are 30 days long.
Where leap years actually matter
A leap year inserts 29 February, so any span that crosses that date in a leap year is one day longer than the same span in a common year. February 2028 has 29 days; February 2027 has 28. That is the whole effect, and it only applies to spans that include the 29th.
The Gregorian rule is slightly more involved than “every four years”. A year is a leap year if it is divisible by 4, except years divisible by 100, which are not leap years unless they are also divisible by 400. So 2000 was a leap year, 1900 was not, and 2100 will not be.
This matters more than it sounds for long spans. A 30-year mortgage term or a 20-year anniversary contains either five or six leap days depending on where it starts, and payroll systems that divide an annual salary by 365 quietly drift against systems that use 365.25.
Common off-by-one traps
Almost every wrong answer comes from one of a small set of mistakes. Checking for them takes less time than re-doing the calculation.
- Counting both endpoints when the question wanted the interval, or the reverse.
- Treating a date as a timestamp: 23:00 on the 1st to 01:00 on the 2nd is two hours, but it is also one calendar day.
- Letting a spreadsheet parse 03/04/2026 as 3 April when the source meant 4 March.
- Assuming every month is 30 days when converting days to months.
- Forgetting that a daylight saving change makes one calendar day 23 or 25 hours long.
Turning days into weeks and months
Weeks are exact: divide by seven. Months are not, because calendar months vary from 28 to 31 days. Dividing by 30.437 — the average Gregorian month — gives a figure that is fine for a rough sense of scale but wrong for anything contractual.
If a document says “one month”, it almost never means 30 days. It usually means the same day number in the following month, with rules for months that are too short. That is a calendar operation, not a division, and it is worth handling separately.