DAYS Function in Excel, Google Sheets, Airtable & Notion
DAYS returns the number of days from a start date to an end date. Note the order: the end date comes first.
Syntax in each app
| App | Support | Syntax & notes |
|---|---|---|
| Excel | ✔ Built in | DAYS(end_date, start_date)Excel 2013 Same as end_date - start_date. |
| Google Sheets | ✔ Built in | DAYS(end_date, start_date) |
| Airtable | ✔ Built in | DATETIME_DIFF(end_date, start_date, 'days') |
| Notion | ✔ Built in | dateBetween(end_date, start_date, "days") |
| Excel | =DAYS(DATE(2024, 12, 25), DATE(2024, 3, 15)) | open excel.new ↗ |
|---|---|---|
| Google Sheets | =DAYS(DATE(2024, 12, 25), DATE(2024, 3, 15)) | open sheets.new ↗ |
| Airtable | DATETIME_DIFF(DATETIME_PARSE("2024-12-25", "YYYY-MM-DD"), DATETIME_PARSE("2024-03-15", "YYYY-MM-DD"), 'days') | |
| Notion | dateBetween(parseDate("2024-12-25"), parseDate("2024-03-15"), "days") |
Excel & Sheets use cell ranges. Paste this sample data into cell A1 of a blank sheet, then paste the formula into any empty cell.
Arguments
| Argument | What it means |
|---|---|
end_date | The later date. If it is earlier than start_date the result is negative. |
start_date | The earlier date. |
Examples
| Formula | Result | Why | Copy |
|---|---|---|---|
=DAYS(DATE(2024, 12, 25), DATE(2024, 3, 15)) | 285 | ||
=DAYS(DATE(2024, 3, 1), DATE(2024, 2, 1)) | 29 | February 2024 has 29 days. | |
=DAYS(DATE(2024, 3, 15), DATE(2024, 12, 25)) | -285 | Swapped dates give a negative number. | |
=DAYS(A2, TODAY()) | Days until A2 | Negative once A2 is in the past. |
Examples use Excel / Google Sheets syntax unless noted.
How DAYS works
Because dates are serial numbers (days since 30 December 1899), =B2 - A2 already gives the days between two dates, and DAYS does the same with clearer intent. The difference shows with text: DAYS converts text dates such as "2024-12-25", while subtraction of two text cells may fail. If the result appears as a date in 1900, the cell inherited a date format — switch it to Number.
DAYS counts the gap, not the days on the calendar: from Monday to Tuesday is 1. To count both ends add 1, and to count only working days use NETWORKDAYS. For whole months or years between two dates use DATEDIF.
Airtable and Notion cannot subtract dates with -, so use DATETIME_DIFF or dateBetween. Both take the end date first, like DAYS. If the dates include times, they count only complete 24-hour days, so a date-only field is the safest input.
Frequently Asked Questions
- Why does DAYS put the end date first?
- It mirrors the subtraction
end - start, so the result is positive when the end is later. DATEDIF uses the opposite order.