Spreadsheet formulas explained, side by side

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

AppSupportSyntax & notes
Excel✔ Built inDAYS(end_date, start_date)
Excel 2013
Same as end_date - start_date.
Google Sheets✔ Built inDAYS(end_date, start_date)
Airtable✔ Built inDATETIME_DIFF(end_date, start_date, 'days')
Notion✔ Built indateBetween(end_date, start_date, "days")
Try DAYS with your own values
Result (as Excel & Google Sheets return it)
285
Your formula, ready to paste
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 ↗
AirtableDATETIME_DIFF(DATETIME_PARSE("2024-12-25", "YYYY-MM-DD"), DATETIME_PARSE("2024-03-15", "YYYY-MM-DD"), 'days')
NotiondateBetween(parseDate("2024-12-25"), parseDate("2024-03-15"), "days")

Arguments

ArgumentWhat it means
end_dateThe later date. If it is earlier than start_date the result is negative.
start_dateThe earlier date.

Examples

FormulaResultWhyCopy
=DAYS(DATE(2024, 12, 25), DATE(2024, 3, 15))285
=DAYS(DATE(2024, 3, 1), DATE(2024, 2, 1))29February 2024 has 29 days.
=DAYS(DATE(2024, 3, 15), DATE(2024, 12, 25))-285Swapped dates give a negative number.
=DAYS(A2, TODAY())Days until A2Negative 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.

Part of the Date & Time functions. Results in the tester follow Excel and Google Sheets behaviour; always double-check important work in your own file.