Documentation/Calc Functions/COUPDAYS

Function name:
COUPDAYS

Category:
Financial Analysis

Summary:
Calculates the number of days in the coupon period that contains the settlement date.

Syntax:
COUPDAYS(Settlement; Maturity; Frequency[; Basis])

Returns:
Returns a positive number which is the count of days in the coupon period in which the settlement date falls.

Arguments:
Settlement is a date or a reference to a cell containing that date which is the settlement date.

Maturity is a date or a reference to a cell containing that date which is the maturity date.

Frequency is a positive integer or a reference to a cell containing that integer which is the number of interest payments per year (1, 2 or 4).


 * If either of Settlement or Maturity is not a valid date then the function returns a value (#VALUE!) error. However, dates are essentially just numbers (search for "date and time functions" in the Help for more information).
 * If the Settlement date is on or after the Maturity date then the function reports an invalid argument error (Err:502).
 * If either Frequency or Basis is a non-integer value, then the function uses its floor value, i.e. it is truncated to an integer value.
 * After truncation if Frequency is any number except 1, 2 or 4, then the function reports an invalid argument error (Err:502).
 * After truncation if Basis is any number except 0,1,2,3,4 or missing, then the function reports an invalid argument error (Err:502).

Additional details:
When Basis is not 1, all years are considered to comprise the same number of days (for example 360 days when Basis is 2), thus the function calculates the number of days in the coupon period containing the settlement date simply by dividing the number of days per year by the Frequency.

For Basis = 1, instead, the function calculates back from the maturity date to find the two coupon dates (one before or at the settlement date, one after the settlement date) and then finds the number of days between them.

Related LibreOffice functions:
[[Special:MyLanguage/Documentation/Calc_Functions/COUPDAYBS COUPDAYBS]

[[Special:MyLanguage/Documentation/Calc_Functions/COUPDAYSNC COUPDAYSNC]

[[Special:MyLanguage/Documentation/Calc_Functions/COUPNCD COUPNCD]

[[Special:MyLanguage/Documentation/Calc_Functions/COUPNUM COUPNUM]

[[Special:MyLanguage/Documentation/Calc_Functions/COUPPCD COUPPCD]

ODF standard:
Section 6.12.6, part 2

Equivalent Excel functions:
COUPDAYS