DAYS function
Returns the number of days between two dates (end date minus start date).
Available in Excel 2013 and later, Excel for the web
Excel 2013 and laterWorks in Google Sheets
Syntax
DAYS(end_date, start_date)| Argument | What it means | |
|---|---|---|
end_date | Required | The later date. Note it comes first. |
start_date | Required | The earlier date. |
Returns: A whole number of days; negative if end_date is before start_date.
How DAYS works
DAYS counts the calendar days between two dates. It is the same as subtracting one date from another (=B2-A2), but it has two small advantages: the result is always a plain number (subtraction sometimes inherits a date format and shows something like "19-Jan-1900"), and it accepts dates written as text, such as "2026-12-25", converting them for you.
Watch the argument order: the end date comes first, which is the reverse of DATEDIF and most other date functions. If you swap them you simply get a negative number. DAYS counts every calendar day; to skip weekends and holidays use NETWORKDAYS instead.
Examples
1How many days late was the payment?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Invoice | Due date | Paid on | Days late |
| 2 | INV-2041 | 2026-10-15 | 2026-11-03 | 19 |
Result: 19
The payment arrived 19 days after the due date. Use MAX(0, DAYS(C2,B2)) if early payments should show 0 rather than a negative number.
2Countdown using text dates
| A | |
|---|---|
| 1 | 23 |
Result: 23
DAYS converts both text dates automatically: there are 23 days from 2 December to Christmas Day.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | A text argument cannot be read as a date. | Use ISO text like "2026-12-25" or a real date cell. |
#NUM! | A numeric argument is outside Excel's valid date range. | Check for very large or negative numbers. |
Tips
- Remember: end date first.
=DAYS(start, end)returns a negative count. - For days remaining from today use
=DAYS(B2,TODAY()). - To count only working days use NETWORKDAYS; to count on a 30/360 basis for interest, use DAYS360.
Google Sheets
DAYS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
DAYS in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | DAGE |
| Dutch | DAGEN |
| Finnish | PÄIVÄT |
| French | JOURS |
| German | TAGE |
| Hungarian | NAPOK |
| Italian | GIORNI |
| Norwegian (Bokmål) | DAGER |
| Polish | DNI |
| Portuguese (Brazil) | DIAS |
| Portuguese (Portugal) | DIAS |
| Russian | ДНИ |
| Spanish | DIAS |
| Swedish | DAGAR |
| Turkish | GÜNSAY |