Office Dễ Hiểu

How to calculate days between two dates in Excel

Subtract real Excel dates and choose whether to include both endpoints.

Subtract the start date from the end date with =B2-A2. Add 1 if your task requires counting both dates.

Visual walkthrough

ExcelC2end date minus start date

Before

14 Nov 2026 to 19 Nov 2026.

After

The difference is 5 days, or 6 when including both dates.

Check the result

Format C2 as Number and check that it displays 5.

Step-by-step instructions

  1. Enter 14 Nov 2026 in A2 and 19 Nov 2026 in B2 as real Excel dates.
  2. Enter the formula below in C2.
    =B2-A2
  3. Format C2 as General or Number. The result should be 5.
  4. Use =B2-A2+1 if you need to count both the start date and the end date; the result becomes 6.

Frequently asked questions

How do I exclude weekends?

Use NETWORKDAYS for standard Saturday–Sunday weekends, or NETWORKDAYS.INTL for a custom weekend pattern. Both can also exclude a holiday list.

Reference: Microsoft Support