The DAYS function
DAYS returns the number of days from one date to another. It gives the same answer as subtracting the dates, but it reads clearly and accepts date text.
Watch the order: the end date comes first. If you swap them you get a negative number.
=DAYS(end_date, start_date)
Arguments
- end_date
- The later date. It comes first.
- start_date
- The earlier date.
Try it
=DAYS(C2,B2) in D2. From 3 March to 14 March is 11 days.
D2
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Van hire | Out | Back | Days | |
| 2 | VN-14 | 3 Mar 2025 | 14 Mar 2025 | 11 | |
| 3 | VN-22 | 24 Feb 2025 | 3 Mar 2025 | ||
| 4 | |||||
| 5 | |||||
| 6 |
Edit the formula in D2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =C2-B2 | 11 | Subtracting the dates gives the same answer. |
| =DAYS(B2,C2) | -11 | With the dates swapped the result is negative. |
| =DAYS(C3,B3) | 7 | February 2025 has 28 days, so 24 Feb to 3 Mar is a week. |
| =DAYS(C2,B2)+1 | 12 | Add 1 if both the first and last day count, as for a hire charged by the day. |
Tips
- DAYS counts the gap, not both ends. Add 1 if the first and last days both count.
- For weekdays only, use NETWORKDAYS.
- For whole months or years, use DATEDIF.
Common mistakes
- The answer is negative.DAYS takes the end date first:
=DAYS(end, start). The opposite of DATEDIF's order. - The answer is a date like 11 Jan 1900.The result cell has a date format. Change it to a number format.
- DAYS returns #VALUE!.One of the cells holds text that isn't a recognisable date. Re-enter it, or build it with DATE.
Practise DAYS with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.