Counting days between two dates looks like something you could just do on your fingers, until the span crosses a month with 31 days, a leap year, or a stretch you need to include both endpoints of. A contract that runs "from March 3 to April 17" doesn't announce how many days that actually is, and manually counting on a calendar is slow and easy to get wrong by exactly one day.
Excel can do this with a single subtraction, plus a couple of variations depending on whether you need every calendar day or only weekdays. This guide covers each method, the mistakes that throw off the count, and a free calculator for when you just need the number.
To count the days between two dates in Excel, subtract the earlier date from the later
one, for example =B2-A2, and format the result cell as Number so it shows a
plain day count instead of another date. Add 1 to the result if both the start and end
date need to be counted as part of the total, and use NETWORKDAYS instead if weekends
should be excluded.
What counts as "days between two dates"?
There isn't one universal answer to "how many days between these two dates" — it depends on whether the endpoints themselves should be counted.
- Exclusive count (the default). Subtracting one date from another gives the number of days that pass between them, not counting either date itself — this is what a plain
=B2-A2or the DAYS function returns. - Inclusive count. Booking a hotel from the 3rd to the 6th and wanting that to read as "4 nights" or "4 days" instead of 3 means adding 1 to the exclusive result.
- Weekday-only count. Project timelines and SLAs often care about business days only, which is what NETWORKDAYS is built for — it skips Saturdays and Sundays automatically, and can skip a holiday list too.
Excel stores every date as a serial number under the hood, which is exactly why subtracting two date cells works at all — it's really just subtracting two numbers.
Why the right count matters
A day miscounted here or there feels harmless until it shows up somewhere that depends on it:
- Billing and rentals. Prorated rent, hotel stays, and equipment rentals are usually priced per day, so an off-by-one error directly changes an invoice amount.
- Project deadlines. A timeline built on calendar days instead of business days can understate how long a task will actually take once weekends are factored in.
- Legal and compliance windows. Notice periods, warranty windows, and filing deadlines are often defined in exact days, and being one day off can mean missing a cut-off entirely.
- Interest and late fees. Per-diem interest calculations depend on an exact day count between a due date and a payment date, so small formula errors compound across many records.
Step-by-step: counting days in Excel
Method 1: Basic day count with subtraction
- Enter both dates in separate cells. Make sure each is formatted as an actual date, not text — for example, A2 as the start date and B2 as the end date.
- Click an empty cell for the result. This is where the day count will appear.
-
Type the subtraction formula.
=B2-A2
- Format the result as Number. Excel sometimes displays the answer as a date; select the cell, open Format Cells, and choose Number or General to see a plain day count instead.
Method 2: Using the DAYS function
-
Use DAYS instead of manual subtraction for a formula that reads clearly and always returns a number, never a date format.
=DAYS(B2,A2)
- Press Enter. DAYS takes the end date first and the start date second, and returns the same result as subtraction without the formatting quirk.
Method 3: Counting only weekdays
-
Use NETWORKDAYS to count business days only, automatically skipping Saturdays and Sundays.
=NETWORKDAYS(A2,B2)
-
Add a holiday list if needed. Pass a range of holiday dates as a third argument to exclude them from the count as well.
=NETWORKDAYS(A2,B2,D2:D10)
Common mistakes when counting days
1. Forgetting to add 1 for an inclusive range
Plain subtraction counts the gap between two dates, not the dates themselves, so a range meant to include both the start and end day — like a rental period or notice window — will come up one day short unless 1 is added to the result.
2. Storing a date as text
A date typed or pasted in a format Excel doesn't recognize gets stored as text, and subtracting a text "date" from a real one returns a #VALUE! error instead of a day count.
3. Reversing the start and end dates
Subtracting the later date from the earlier one, instead of the other way around, produces a negative number rather than an error — an easy mistake to miss when scanning a column of results.
4. Using calendar days when business days were meant
A plain subtraction includes weekends in the total, which quietly inflates any deadline or turnaround estimate that was actually meant to count only working days.
Real-world formula examples
A few common scenarios and the formula each one needs.
Subtraction vs DAYS vs NETWORKDAYS
A side-by-side look at how the three approaches compare in Excel.
| Factor | Subtraction (=B2-A2) | DAYS function | NETWORKDAYS |
|---|---|---|---|
| Counts | All calendar days | All calendar days | Weekdays only |
| Formatting quirks | May display as a date | Always a number | Always a number |
| Best for | Quick, casual day counts | Formulas shared across a team | Deadlines, SLAs, work schedules |
| Can exclude holidays | No | No | Yes, with a holiday range |
Skip the spreadsheet: free date difference calculator
If you just need one exact day count and don't want to open Excel, the Rebrixe Date Difference Calculator works entirely in your browser: enter a start and end date, get the exact number of days instantly. No formulas, no account, no data sent anywhere.