COUPNUM Function (OpenOffice Calc)
Count remaining coupons with OpenOffice COUPNUM. Check maturity inclusion, settlement on a coupon date and annual, semiannual and quarterly examples.
Verification status: Eight ordinary reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, through generated native ODF and GUI hard recalculation. Saved identities, inputs and results were checked. How formula examples are checked
Quick answer: =COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;0) returned 4 in the tested Apache OpenOffice 4.1.16 build.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
- Scope: Desktop Calc, English function names and semicolon-separated formulas.
- Checked: October 14, 2026. Eight ordinary reference formulas were recalculated from generated ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent arithmetic were checked.
What COUPNUM returns
COUPNUM returns the number of remaining regular coupon payments after settlement through maturity. It counts payment dates, not calendar years or individual days. The schedule is anchored to the maturity date and coupon frequency. Release implementation.
Syntax and arguments
COUPNUM(Settlement;Maturity;Frequency[;Basis])
- Settlement: date at which the regular coupon schedule is evaluated.
- Maturity: later final coupon date; the schedule is anchored to this date.
- Frequency: 1, 2 or 4 payments per year.
- Basis: optional, defaults to 0: US 30/360. Other values are 1 actual/actual, 2 actual/360, 3 actual/365 and 4 European 30/360. The functions implement the release-specific rules discussed below.
Eight reproducible examples
The native column contains saved 4.1.16 results; independent references use high-precision arithmetic and the stated source rules. Values are shown to twelve decimal places where needed. Enter DATE expressions directly rather than locale-dependent date text.
| Formula | Native 4.1.16 result | Independent reference |
|---|---|---|
=COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;0) |
4 |
4 |
=COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;1) |
4 |
4 |
=COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;2) |
4 |
4 |
=COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;3) |
4 |
4 |
=COUPNUM(DATE(2024;3;15);DATE(2025;12;31);2;4) |
4 |
4 |
=COUPNUM(DATE(2024;6;30);DATE(2025;12;31);2;1) |
3 |
3 |
=COUPNUM(DATE(2024;3;15);DATE(2025;2;28);1;0) |
1 |
1 |
=COUPNUM(DATE(2024;1;15);DATE(2025;12;31);4;1) |
8 |
8 |
Practical worksheet
For March 15, 2024 settlement, December 31, 2025 maturity and frequency 2, the remaining coupon dates are June 30 and December 31, 2024, followed by June 30 and December 31, 2025. The result is 4.
At settlement June 30, 2024, the coupon on that date is excluded from the remaining count, leaving 3. This agrees with COUPPCD returning settlement itself and COUPNCD moving to December 31, 2024.
Advanced interpretation and checks
Quarterly payments from January 15, 2024 through December 31, 2025 produce 8 remaining dates. The annual February-end example produces 1. These counts reflect the regular payment schedule rather than an approximate division of calendar days by 365/Frequency.
Internally, the function finds the preceding coupon and measures the whole-month span from that date to maturity, then multiplies by Frequency/12. For the first case, the 24-month span from December 31, 2023 to December 31, 2025 gives 24×2/12=4. The previous date is used as an anchor; it is not counted as a future payment.
Boundaries and troubleshooting
Maturity is included as the final regular coupon date, while a coupon exactly on settlement is excluded. The native examples check that distinction and frequencies 1, 2 and 4. Varying all five bases preserves the first example’s count, but this does not establish identical date adjustment behavior for every schedule.
The release requires settlement before maturity and a supported frequency/basis. Invalid values, nonregular first or final coupons and fractional date conversion were not executed. A count does not compute coupon amounts, present value or accrued interest; those require further parameters and the correct financial convention.
Related functions
Official evidence and checking scope
- Function-specific release implementation
- GetCoupnum schedule/date helper
- lcl_GetCouppcd schedule/date helper
- ScaDate::setDay schedule/date helper
- ScaDate::getDate schedule/date helper
- ScaDate::getDiff schedule/date helper
- Maturity month-end preservation
- Optional basis conversion and validation
The generated ODF produced the informational load warning “Not all attributes could be read.” The sheet was hard-recalculated and saved separately. All eight ordinary function identities, inputs and results were reconciled; a stale SUM cache changed from 999999 to 3 and an uncached SUM returned 7. This establishes the stated examples, not every workbook style or invalid input. Other explanatory identities are independent calculations. The authoring-tool XLSX was not executed in OpenOffice, and its preview values are not the native results reported here.