Example
Suppose you are considering the purchase of a hypothetical security. The purchase will settle on April 2, 2010 (settle), the security matures on December 31, 2015 (maturity), and pays interest quarterly (frequency) on an actual calendar days basis (days-basis).
=COUPNUM("4/2/2010", "12/31/2015", 4, 1) returns 23, because there are 23 quarterly coupon payment dates between April 2, 2010, and December 31, 2015, with the first being on June 30, 2010.