Function · Date and time
Excel DAYS function
The Excel DAYS function returns the number of days from one date to another. From January 1, 2026 to July 4, 2026 is 184 days. The end date is the first argument.
Syntax =DAYS(end_date, start_date)
=DAYS(DATE(2026,7,4),DATE(2026,1,1))Arguments
| Name | Required | What to pass |
|---|---|---|
| end_date | Required | The later date, written first. |
| start_date | Required | The earlier date, written second. Subtracting these serials by hand is the same number. |
Examples
Days from New Year's Day 2026 to Independence Day
=DAYS(DATE(2026,7,4),DATE(2026,1,1))Result 184
| A | B | |
|---|---|---|
| 1 | Start | 1/1/2026 |
| 2 | End | 7/4/2026 |
| 3 | Days | 184 |
DAYS subtracts two date serials. July 4, 2026 minus January 1, 2026 is 184. The end date is the first argument, which is the reverse of the way people say “from January 1 to July 4.” Swap them and the result is -184, not an error.
The 184 does not count both endpoints as a stay of nights sometimes does. The dates from January 1 through July 4, counting both, are 185. NETWORKDAYS is a different count again: it keeps weekdays and can skip a holiday list. Excel 2010 does not have DAYS. The subtraction still works there.