The DAYS function

Returns the number of days between two dates. The end date comes first, and the result is the same as subtracting the start date from the end date.

Syntax

DAYS(end_date, start_date)
end_date
The later date.
start_date
The earlier date.

Examples

B1=DAYS(DATE(2024,12,25),DATE(2024,3,15))
AB
1285

In plain words: Count the days from Mar 15, 2024 to Dec 25, 2024.

B1=DAYS(DATE(2024,3,1),DATE(2024,2,1))
AB
129
B1=DAYS("2024-03-15","2024-01-01")
AB
174

Questions

Why does DAYS give a negative number?

The dates are the wrong way around. DAYS wants the end date first, so =DAYS(end,start) is positive when the end date is later.

Is DAYS different from subtracting the dates?

=B2-A2 gives the same number when both cells hold dates. DAYS also reads dates written as text, such as "2024-03-15".

Related functions