COUPPCD Function (LibreOffice Calc)
The COUPPCD function returns the previous coupon date before the settlement date. It is essential for bond valuation, accrued interest calculations, and financial modeling involving coupon schedules.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the COUPPCD Function Does ▾
- Returns the previous coupon date
- Uses coupon frequency (annual, semiannual, quarterly)
- Supports multiple day‑count basis systems
- Works with real dates, serial numbers, and DATEVALUE
It is designed to be precise, finance‑grade, and Excel‑compatible.
Syntax ▾
COUPPCD(settlement; maturity; frequency; [basis])
Arguments
-
settlement:
The date the security is traded to the buyer. -
maturity:
The date the security matures. -
frequency:
Number of coupon payments per year:1= annual2= semiannual4= quarterly
-
basis (optional):
Day-count convention:
| basis | Day-count convention |
|---|---|
| 0 | US 30/360 |
| 1 | Actual/Actual |
| 2 | Actual/360 |
| 3 | Actual/365 |
| 4 | European 30/360 |
Basic Examples ▾
Previous coupon date (semiannual)
=COUPPCD("2024-03-15"; "2026-03-15"; 2)
Using Actual/Actual
=COUPPCD(A1; A2; 2; 1)
Using text dates
=COUPPCD(DATEVALUE(A1); DATEVALUE(A2); 2)
Advanced Examples ▾
Previous coupon date for quarterly bond
=COUPPCD("2024-02-10"; "2025-02-10"; 4)
From imported CSV timestamps
=COUPPCD(DATEVALUE(LEFT(A1;10)); DATEVALUE(LEFT(A2;10)); Frequency)
From Excel serial dates stored as text
=COUPPCD(DATE(1899;12;30)+VALUE(A1); DATE(1899;12;30)+VALUE(A2); Frequency)
Combine with COUPNCD to build a full coupon schedule
=COUPPCD(A1; A2; Freq)
Determine the start of the current coupon period
=COUPPCD(Settlement; Maturity; Freq)
Use in accrued interest calculations
=ACCRINT(Issue; FirstInt; Settlement; Rate; Par; Freq)
Edge Cases and Behavior Details ▾
COUPPCD returns a date
Accepts:
- Real dates
- Serial numbers
- DATEVALUE outputs
Invalid text → Err:502
Behavior details
- Settlement < Maturity must hold
- Frequency must be 1, 2, or 4
- Basis must be 0–4
- Coupon schedule is calculated backward from maturity
- Time components ignored
COUPPCD of an error → error propagates
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Dates not recognized
- Frequency not 1, 2, or 4
- Basis outside 0–4
Fix:
- Wrap dates with DATEVALUE
- Validate frequency and basis
Err:504 — Invalid date sequence
Cause:
- Settlement after maturity
Fix:
- Correct date order
Unexpected previous coupon date
Cause:
- Wrong frequency
- Incorrect maturity date
- Wrong day-count basis
Fix:
- Verify coupon schedule
- Confirm basis selection
Best Practices ▾
- Use Actual/Actual (basis 1) for government bonds
- Use 30/360 for corporate bonds
- Normalize text dates with DATEVALUE
- Validate coupon frequency carefully
- Use COUPPCD with COUPNCD, COUPDAYS, COUPDAYSNC, and COUPNUM for full coupon modeling
COUPPCD is your “previous coupon date” engine — essential for accrued interest, price, yield, and any professional fixed‑income model.
Related Patterns and Alternatives ▾
- Use COUPNCD for next coupon date
- Use COUPDAYS for total days in coupon period
- Use COUPDAYSNC for days to next coupon
- Use COUPNUM for number of coupon periods
- Use ACCRINT for accrued interest
- Use PRICE and YIELD for bond valuation
By mastering COUPPCD and its companion functions, you can build powerful, accurate, and fully professional fixed‑income models in LibreOffice Calc.