=COUPDAYS(settlement, maturity, frequency, [basis])
=COUPDAYS(DATE(2019,2,15),DATE(2024,1,1),2,0)
The function can be used to calculate the number of days between two dates. For example, this will calculate the number of days between February 15th, 2019 and January 1st, 2024.
=COUPDAYS(2019,2,15,2024,1,1,2,0)
This function can also be used with hardcoded values for the arguments. This example will calculate the same number of days between February 15th, 2019 and January 1st, 2024 as the example above.
=COUPDAYS(C6,C7,C10,C11)
The function can be used with cell references for the arguments as well. For example, if cell C6 contains the date February 15th, 2019, cell C7 contains the date January 1st, 2024, cell C10 contains the number 2, and cell C11 contains the number 0, then the formula will calculate the number of days between February 15th, 2019 and January 1st, 2024.
The COUPDAYS function is used to calculate the number of days in the coupon period for a security based on their settlement date. It requires four arguments - settlement, maturity, frequency and basis - for accurate results.