How to Calculate Days Between Two Dates

How to Calculate Days Between Two Dates

To calculate the days between two dates, subtract the earlier date from the later one. From Tuesday, 3 March 2026 to Saturday, 21 March 2026, that is 21 − 3 = 18 days. That subtraction is the whole method; the arguments start when people count differently, and this guide settles which count to use when.

The subtraction works because calendar dates are just numbered days. The answer it gives is the standard count, called exclusive counting. Everything else below is a variation on it.

Exclusive vs inclusive: the one-day disagreement

There are two honest ways to count a span, and they differ by exactly one day.

Exclusive counting measures the gap between the dates: End − Start. From 3 March to 21 March, that is 18 days. Use it for countdowns, deadlines, and “how many days until”.

Inclusive counting counts both end dates themselves: End − Start + 1. From 3 March to 21 March, that is 19 days. Use it for bookings and holidays where the first and last day both count — a trip from Monday to Friday covers 5 days, inclusive.

Most disagreements about a day count come from this, not from bad arithmetic. If your count is one off from someone else’s, check which method each of you used before assuming either is wrong.

A calendar trick for checking the exclusive count: the weekday should shift by the remainder when you divide by 7. 18 days = 2 weeks and 4 days, so the weekday moves forward 4 days: Tuesday + 4 = Saturday. 3 March 2026 is a Tuesday and 21 March 2026 is a Saturday, so the count checks out.

Counting by hand across months and years

Within one month, subtract the day numbers, as above. Across months, count the remaining days in the first month, add the full months in between, then add the days in the last month.

Example: from 24 October 2026 to 11 February 2027.

October has 31 days, so 31 − 24 = 7 days remain after 24 October. Then full months: November (30) + December (31) + January (31) = 92 days. Then 11 days of February. Total: 7 + 92 + 11 = 110 days.

Leap years matter when the span crosses 29 February. A span from 20 February 2028 to 10 March 2028 includes the leap day: February 2028 has 29 days, so 29 − 20 = 9 days remain in February, plus 10 days of March = 19 days. The same span in a non-leap year would be 18 days. If your span crosses February in a year divisible by 4 (with the century exception: years divisible by 100 are not leap years unless also divisible by 400), check whether 29 February falls inside it.

For long spans, convert to weeks as a sanity check. 110 days ÷ 7 = 15 weeks and 5 days (15 × 7 = 105, remainder 5). If your week figure and your day figure disagree, one of them is off.

Business days vs calendar days

Calendar days include weekends. Business days exclude them, and usually exclude public holidays too.

Count business days by hand in two steps: count the calendar days, then subtract the weekend days. For a span of whole weeks it is easy. From Monday, 2 March 2026 to Friday, 13 March 2026, inclusive counting gives 12 calendar days. Those 12 days hold two full Monday-to-Friday weeks, so there are 10 business days. The only weekend days inside the span are Saturday 7 and Sunday 8 March: 12 − 2 = 10.

For spans that are not whole weeks, walk the calendar: count the weekdays in the first partial week, add 5 per full week in the middle, then add the weekdays in the last partial week. Subtract any public holidays that fall on weekdays in the span. Holiday lists differ by country and employer, so there is no universal business-day count — always say which holidays you excluded.

Days between dates in Excel

Three formulas cover nearly every spreadsheet need. Put the start date in A1 and the end date in B1.

Plain subtraction: =B1-A1 gives the exclusive count. For 3 March 2026 in A1 and 21 March 2026 in B1, the result is 18. Format the result cell as General or Number, not as a date, or Excel will show a date instead of a count.

DATEDIF: =DATEDIF(A1, B1, “d”) gives the same exclusive day count, and can also return complete months (“m”) or complete years (“y”). It is an undocumented function, so Excel will not autocomplete it, but it works.

NETWORKDAYS: =NETWORKDAYS(A1, B1) counts business days, including both end dates. With a holiday list in C1:C5, =NETWORKDAYS(A1, B1, C1:C5) excludes those holidays too. For a custom weekend (for example Friday–Saturday), use =NETWORKDAYS.INTL(A1, B1, 7), where the third argument picks the weekend pattern.

Common Excel pitfalls: dates stored as text will not subtract — check the cell format. A result that looks like a date means the result cell is date-formatted. And a negative result means the dates are in the wrong order; swap them or wrap in ABS().

Three to try yourself

Work these out before reading the answers below.

  1. Exclusive count: 5 June 2026 to 20 June 2026. How many days?
  2. Inclusive count for the same span. How many days?
  3. A span is 45 days long. How many weeks and days is that?

Answers: 1. 15 days (20 − 5). 2. 16 days (15 + 1). 3. 6 weeks and 3 days (6 × 7 = 42, remainder 3).

Questions people ask

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

Subtract the earlier date from the later one for the standard (exclusive) count. Add 1 if you need the inclusive count, where both end days count. From 3 March to 21 March 2026, that is 18 days exclusive, 19 inclusive.

How do I count business days between two dates?

Count the calendar days, subtract Saturdays and Sundays, then subtract weekday public holidays. In Excel, =NETWORKDAYS(start, end, holidays) does it in one step, with an optional holiday list.

How many weeks are between two dates?

Divide the day count by 7. 18 days is 2 weeks and 4 days. The remainder tells you how far the weekday shifts: Tuesday plus 4 days lands on Saturday, which matches the calendar.

Do leap years change the count?

Yes, if the span includes 29 February. A span crossing that date in a leap year is one day longer than the same span in a non-leap year. Years divisible by 4 are leap years, except century years, which must also be divisible by 400.


If you would rather skip the arithmetic, try it in the Days Between Dates Calculator.

By Sofia Andersen
CalcKits calculators show the formula with every result.