Practice free

DAYS function

DAYS returns the number of days between two dates. The end date comes first and the start date second, and it counts calendar days, not working days.

Example

Read it as a sentence: count the days from the date in F3 to the date in F1. F1 is empty, which counts as 0, so the answer is -45351.

Practice this in the app

Syntax

DAYS(end_date, start_date)

end_date (required)
The later date.
start_date (required)
The earlier date.

Returns: The number of days from start_date to end_date.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=DAYS("3/1/2026","1/1/2026") 59 End, start as text
=DAYS(DATE(2026,1,1),DATE(2026,3,1)) -59 Start after end
=DAYS(10.9,1.1) 9 Fractional serials
=DAYS(Data!F1,Data!F3) -45351 Blank end
=DAYS("abc",1) #VALUE! Text not a date
=DAYS(-1,1) #NUM! Negative serial

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Argument order is end then start; reversing gives a negative number.
  • Counts calendar days, not working days; use NETWORKDAYS for those.

Where it works

Excel
DAYS arrived in Excel 2013. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Date and time functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .