COUPDAYSNC Function (LibreOffice Calc)
The COUPDAYSNC function returns the number of days from the settlement date to the next coupon 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 COUPDAYSNC Function Does ▾
- Returns the days from settlement to next 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 ▾
COUPDAYSNC(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 ▾
Days from settlement to next coupon (semiannual)
=COUPDAYSNC("2024-03-15"; "2026-03-15"; 2)
Using Actual/Actual
=COUPDAYSNC(A1; A2; 2; 1)
Using text dates
=COUPDAYSNC(DATEVALUE(A1); DATEVALUE(A2); 2)
Advanced Examples ▾
Days to next coupon for quarterly bond
=COUPDAYSNC("2024-02-10"; "2025-02-10"; 4)
Days to next coupon from imported CSV timestamps
=COUPDAYSNC(DATEVALUE(LEFT(A1;10)); DATEVALUE(LEFT(A2;10)); Frequency)
Days to next coupon from Excel serial dates stored as text
=COUPDAYSNC(DATE(1899;12;30)+VALUE(A1); DATE(1899;12;30)+VALUE(A2); Frequency)
Fraction of coupon period remaining
=COUPDAYSNC(A1; A2; Freq) / COUPDAYS(A1; A2; Freq)
Combine with ACCRINT to compute accrued interest manually
=CouponRate * Par * (COUPDAYS(A1;A2;Freq) - COUPDAYSNC(A1;A2;Freq)) / COUPDAYS(A1;A2;Freq)
Combine with COUPNCD to verify next coupon date
=COUPNCD(A1; A2; Freq)
Edge Cases and Behavior Details ▾
COUPDAYSNC returns a numeric value (days)
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
- Time components ignored
- Coupon schedule is calculated backward from maturity
COUPDAYSNC 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 days-to-next-coupon value
Cause:
- Wrong frequency
- Wrong day-count basis
Fix:
- Verify coupon schedule
- Confirm basis selection
Best Practices ▾
- Use Actual/Actual (basis 1) for most government bonds
- Use 30/360 for corporate bonds
- Normalize text dates with DATEVALUE
- Validate coupon frequency carefully
- Use COUPDAYSNC with COUPDAYS, COUPNUM, COUPPCD, and COUPNCD for full coupon modeling
COUPDAYSNC is your “days until next coupon” engine — essential for accrued interest, price, yield, and any professional fixed‑income model.
Related Patterns and Alternatives ▾
- Use COUPDAYS for total days in coupon period
- Use COUPNUM for number of coupon periods
- Use COUPPCD for previous coupon date
- Use COUPNCD for next coupon date
- Use ACCRINT for accrued interest
- Use PRICE and YIELD for bond valuation
By mastering COUPDAYSNC and its companion functions, you can build powerful, accurate, and fully professional fixed‑income models in LibreOffice Calc.