Contact

COUPDAYS Function (Gnumeric)

Financial Intermediate Gnumeric First functioning release unverified; development recorded by 0.57, implementation recorded in 1.0.2

For the same semiannual coupon schedule, COUPDAYS can return 180, 181 or 182.5, depending on basis. It is a coupon-period denominator, not always a literal calendar-day count.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: For the same semiannual coupon schedule, COUPDAYS can return 180, 181 or 182.5, depending on basis. It is a coupon-period denominator, not always a literal calendar-day count.

Availability and evidence

  • Release history: NEWS records initial work in 0.57 and implementation in 1.0.2. Initial development is not proof of a complete working 0.57 implementation; the exact first functioning release is unverified.
  • Source support: Registered in the Gnumeric 1.12.62 financial plugin. No retirement is established. The last functioning native application version is unverified.
  • Evidence dates: Gnumeric source retained October 13–14, 2026 was reviewed October 15. The official GOffice 0.10.61 archive was retrieved October 15 and its coupon helpers reviewed that day. Gregorian calendar and exact-rational checks are independent reference calculations; no native Gnumeric, compiled GOffice, headless application or GUI execution occurred.

Syntax and convention inputs

=COUPDAYS(settlement,maturity,frequency[,basis[,eom]])

Settlement and maturity are dates; maturity must be strictly later. Use DATE formulas instead of ambiguous text dates. Frequency is 1 for annual, 2 for semiannual or 4 for quarterly payments. Basis defaults to 0, and the Gnumeric-specific end-of-month flag eom defaults to TRUE.

The documented bases are 0 US 30/360, 1 actual/actual, 2 actual/360, 3 actual/365 and 4 European 30/360. The inspected implementation also accepts 5 and maps it to the GOffice 30E+/360 rule; that source extension should not be mistaken for a universally portable option. Use explicit documented integer conventions in ordinary work.

The schedule is anchored backward from maturity in steps of 12/frequency months. If eom is TRUE and maturity is its month’s final day, intermediate coupon dates are moved to their month ends. Otherwise the maturity day is retained where possible and clipped for a shorter month. This is a scheduled-date calculation, without holiday or business-day adjustment.

Complete reproducible inputs

Create CouponControls and enter:

Cell Meaning Entry
B2 Settlement =DATE(2026,5,15)
B3 Maturity =DATE(2028,12,31)
B4 Frequency 2
B5 Basis 0
B6 End of month Boolean TRUE

In D2 enter =COUPDAYS($B$2,$B$3,$B$4,$B$5,$B$6). The independent expected result is 180, the basis-zero semiannual period denominator.

The surrounding period runs from December 31, 2025 through June 30, 2026. The previous boundary is at or before settlement; the next is strictly after it. Keep frequency, maturity and eom consistent when comparing members of the coupon-function family.

Why a period denominator can be fractional

For basis 0, 2, 4 or the source extension 5, the helper returns 360/frequency. For basis 3 it returns 365/frequency. Only basis 1 calculates the actual distance between the previous and next coupon dates.

For the original dates and frequency 2, these rules give 180 for bases 0/2/4/5, 182.5 for basis 3, and 181 for basis 1. The 182.5 is not an impossible half-day payment event; it is the fixed annual denominator divided into two periods.

Reference controls

Controlled inputs Independent reference result
=COUPDAYS($B$2,$B$3,$B$4,$B$5,$B$6) 180
Original setup, basis 0 180
Original setup, basis 1 181
Original setup, basis 2 180
Original setup, basis 3 182.5
Original setup, basis 4 180
Original setup, basis 5 180
Original setup, annual frequency 360
Original setup, quarterly frequency 90
Settlement June 15, 2026 180
Settlement June 30, 2026 180
2002-11-29 to 2004-02-29, frequency4, basis0, eom TRUE 90
Same historical dates, eom FALSE 90
Frequency 3 rejected #NUM!
Basis 6 rejected #NUM!
Settlement equals maturity #NUM!
Failed date conversion #VALUE!

These source-model controls make basis and frequency effects explicit. A result displayed as a date would be misleading: COUPDAYS is a numeric count or denominator, not a coupon-date result.

Advanced: annual and quarterly periods

For the original settlement and maturity, frequency 1 puts settlement between December 31, 2025 and December 31, 2026. Basis-zero COUPDAYS is 360 and basis-one COUPDAYS is 365.

Frequency 4 puts settlement between March 31 and June 30, 2026. Basis zero gives 90, basis one 91, and basis three 91.25. The frequency changes both the scheduled boundaries and, for fixed-denominator bases, the number of divisions of the nominal year.

These calculations do not change the coupon rate or amount because neither is an argument. A payment model must specify those separately rather than treating the day denominator as a monetary result.

Advanced: do not assume every day-count sum equals this function

In the original actual/actual case, elapsed days are 135 and remaining days are 46, summing to the full 181 days. That is an ordinary calendar partition.

Under basis 2, COUPDAYBS and COUPDAYSNC still use actual differences, so their sum is 181, while COUPDAYS is 180. Under basis 3 the same numerator sum is 181 while COUPDAYS is 182.5. These differences are specified by the helper’s separate branches, not necessarily an error in the workbook.

Under basis 0 the original fixture has 135+45=180, but endpoint adjustments can prevent treating such an identity as a universal rule. Compare functions only after checking both the schedule and each basis-specific computation.

Advanced: move settlement across a boundary

Moving settlement from May 15 to June 15 leaves it within the same coupon period. COUPDAYS stays 180 under basis 0 and 181 under basis 1, even though elapsed and remaining counts change.

At settlement June 30, the next period begins. Its boundaries are June 30 and December 31. Basis zero remains 180, while basis one becomes 184. A constant basis-zero result therefore does not prove that settlement remained in the same calendar interval.

Advanced: end-of-month matters differently by basis

For settlement November 29, 2002, maturity February 29, 2004 and frequency 4, eom TRUE gives the interval August 31–November 30, 2002; eom FALSE gives November 29, 2002–February 28, 2003. Both happen to contain 91 actual days, and both have the basis-zero denominator 90.

The equal outputs do not establish equal coupon boundaries. Use COUPPCD and COUPNCD to inspect the schedule instead of inferring it from a single period-length number.

Errors and verification limits

The shared wrapper returns #VALUE! when its date conversion fails, and #NUM! for an invalid frequency/basis or settlement greater than or equal to maturity. Explicit frequency 3 and basis 6 are rejected. Numeric frequency/basis processing includes truncation and bounds checks; use the documented integer settings rather than relying on fractional or locale-sensitive coercion.

The examples use modern DATE values, complete regular schedules and separately controlled changes. Date-system conversion, malformed text, extreme dates, native final-digit behavior and file transfers are not certified. Source review and independent calendar arithmetic do not establish actual GUI or native-library execution.

COUPDAYBS, COUPDAYSNC, COUPNCD.