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.

Excel 2013 and later, including Microsoft 365 and Excel for the web. Also in Google Sheets.

Syntax =DAYS(end_date, start_date)

DAYS
=DAYS(DATE(2026,7,4),DATE(2026,1,1))

Arguments

NameRequiredWhat to pass
end_dateRequiredThe later date, written first.
start_dateRequiredThe 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

=DAYS(B2,B1)B3
Span
AB
1Start1/1/2026
2End7/4/2026
3Days184
A picture of the sheet, not a live calculator. The first date inside DAYS is the end date.

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.