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