What it does
=DAYS(C2,B2) subtracts the date in B2 from the date in C2 and gives the same result as =C2-B2. Mind the order: the end date comes first, then the start; the other way round, the result is negative.
Its advantage over plain subtraction is that it tries to convert text that looks like a date and always returns a number; with subtraction, the result sometimes shows in a date format. Weekends and holidays are counted; for working days only, use NETWORKDAYS.
For completed months or years use DATEDIF; for days up to today, pass TODAY as the end date. For accounting calculations that count every month as 30 days, there is DAYS360.
Syntax
=DAYS(end_date, start_date)=GÜNSAY(bitiş_tarihi; başlangıç_tarihi)Arguments in square brackets are optional. English Excel separates arguments with commas (,) and uses a dot for decimals; Turkish Excel uses semicolons (;) and a decimal comma. Excel shows function names in its own language when it opens the file.
Arguments
| Argument | Required | Description |
|---|---|---|
end_date | Required | The date the span ends, the later of the two. |
start_date | Required | The date the span starts. |
Examples
1Days between order and delivery
The formula in D2 is filled down: the delivery date (end) comes first, then the order date (start).
=DAYS(C2,B2)| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Order Date | Delivery Date | Delivery Time (Days) |
| 2 | SO-801 | 1-Oct-2026 | 6-Oct-2026 | 5 |
| 3 | SO-802 | 3-Oct-2026 | 17-Oct-2026 | 14 |
| 4 | SO-803 | 28-Oct-2026 | 4-Nov-2026 | 7 |
| 5 | SO-804 | 30-Oct-2026 | 31-Oct-2026 | 1 |
- D2 (filled down to D5)
=DAYS(C2,B2)
SO-802 took 14 days to deliver. The count stays correct across months: SO-803 gives 7. SO-804, delivered the next day, shows 1.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
2Days overdue as of a report date
The report date is in F2. DAYS subtracts the due date from the report date; MAX turns the negative result for invoices not yet due into 0.
=MAX(0,DAYS($F$2,B2))| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice | Due Date | Amount | Days Overdue | Report Date | |
| 2 | F-2041 | 20-Oct-2026 | 12,400.00 | 16 | 5-Nov-2026 | |
| 3 | F-2043 | 12-Nov-2026 | 7,200.00 | 0 | ||
| 4 | F-2045 | 31-Oct-2026 | 2,600.00 | 5 | ||
| 5 | F-2047 | 5-Nov-2026 | 5,300.00 | 0 |
- D2 (filled down to D5)
=MAX(0,DAYS($F$2,B2))
F-2041 is 16 days past due. For F-2043, which is not yet due, DAYS returns a negative number and MAX turns it into 0. Change the date in F2 to see the delays as of another day.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
Common errors and fixes
- Negative result
Cause: The arguments were written the wrong way round: start first, then end.
Fix: Put the end date first:
=DAYS(C2,B2); or take the absolute value of the result (ABS).- #VALUE!
Cause: One of the dates is text that cannot be converted to a date.
Fix: Enter the dates as real dates or build them with DATE.
Good to know
- To count both the first and the last day, add 1:
=DAYS(C2,B2)+1; 1 to 5 November is 5 days. - To show 0 for invoices that are not yet due:
=MAX(0,DAYS($F$2,B2))(MAX).
In Nexell
Get Nexell to do it from a sentence
Add a Delivery Time column to the order list showing the number of days between the order date and the delivery date
Convert to tableBring your order list into the tool and type this. Nexell adds the Delivery Time column with real Excel formulas and shows it in the preview; in the downloaded file, the time changes when a date does.
Nexell uses AI to understand the request and builds the result with real Excel formulas; the formula may differ from the example on this page. You see a preview first and nothing changes until you press Apply; formulas stay live in the downloaded .xlsx file.
Free account · no card needed · 30 credits a month
Frequently asked questions
How do I count the days between two dates in Excel?
Subtract the earlier date from the later one: =C2-B2 or =DAYS(C2,B2). To leave out weekends, use =NETWORKDAYS(B2,C2); that function counts the start and end days too.