ID EN
#Date and time

DAYS

Excel Functions

Count days between dates

Syntax

EXCEL
=DAYS(end_date, start_date)

Arguments

Parameter Description
end_date The end date.
start_date The start date.

Return Value

A number representing days.

Details

The DAYS function returns the number of days between two dates. Both dates must be valid Excel dates or text values that can be coerced to dates. The DAYS function only works with whole numbers, fractional time values that might be part of a date are ignored. If start and end dates are reversed, DAYS returns a negative number. The DAYS function returns all days between two dates, to calculate working days between dates, see the NETWORKDAYS function. With a start date in A1 and end date in A2: Will return the same result as: Unlike the simple formula above, the DAYS function can also handle dates in text format, as long as the date is recognized by Excel. For example: The DAYS function returns the number of days between two dates. For example:

Examples

Examples

With a start date in A1 and end date in A2:

EXCEL
=DAYS(A2,A1)
Examples

Will return the same result as:

EXCEL
=A2-A1
Examples

Unlike the simple formula above, the DAYS function can also handle dates in text format, as long as the date is recognized by Excel. For example:

EXCEL
=DAYS("7/15/2016","7/1/2016") // returns 14
Examples

The DAYS function returns the number of days between two dates. For example:

EXCEL
=DAYS("1-Mar-21","2-Mar-21") // returns 1
Examples

To include the end date in the count, add 1 to the result:

EXCEL
=DAYS("1-Mar-21","2-Mar-21")+1 // returns 2

See Also

YEARFRAC DAYS360 NETWORKDAYS NETWORKDAYS.INTL