COUPDAYBS Function (Calligra Sheets)
Count accrued coupon-period days with Calligra COUPDAYBS using a maturity-anchored schedule, explicit bases and independently checked boundaries.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =COUPDAYBS(DATE(2025;3;15);DATE(2026;12;31);2;1) is expected to return 74: actual days from the previous coupon date, December 31, 2024, to settlement, March 15, 2025.
COUPDAYBS measures the elapsed portion of the coupon period. It does not return accrued money, a fraction of a year or the number of remaining coupons.
Availability and evidence
- Introduced: Original introduction release not established. Presence in the checked release is not an introduction date.
- Available in source: Calligra Sheets 26.08.2, checked against first-party pinned source retrieved on October 18, 2026.
- Retired versus deprecated: Neither retirement nor deprecation is established; the function remains registered in this release.
- Verification: Selected formulas were executed in the Calligra Sheets 25.04.2 GUI on October 18, 2026. The native-results section lists those observations separately from independent calendar calculations and source analysis. 26.08.2 was source-checked only.
- Entry style: English names and semicolon separators. DATE constructors avoid locale-ambiguous date strings. Brackets in displayed syntax mark optional arguments and are not typed.
The inspected financial.xml has no dedicated COUPDAYBS description. Its availability and argument count are established by the runtime registration, not by an invented handbook section.
Syntax and argument roles
=COUPDAYBS(settlement; maturity; frequency[; basis])
| Argument | Requirement |
|---|---|
| settlement | Required valid date before maturity |
| maturity | Required later date that anchors the regular coupon schedule |
| frequency | Required positive payment frequency; use 1 (annual), 2 (semiannual) or 4 (quarterly) for these examples |
| basis | Optional integer day-count selector, default 0 |
The source accepts nonzero integer divisors of 12, more than the ordinary 1/2/4 conventions. This guide does not promote extra frequencies as financially validated. Supply whole positive inputs deliberately; the source does not safely establish every negative or fractional case.
Build the elapsed-days example
Use a fresh worksheet. Enter A1 “Settlement”, A2 “Maturity”, A3 “Frequency” and A4 “Basis”. Put =DATE(2025;3;15) in B1, =DATE(2026;12;31) in B2, 2 in B3 and 1 in B4. Keep formula outputs below the input block.
The regular semiannual schedule anchored to this end-of-month maturity has December 31 and June 30 coupon dates. Around settlement, the relevant dates are December 31, 2024 and June 30, 2025. Calendar subtraction gives 74 elapsed days and 107 remaining days, a total of 181 actual days in that period.
- In B6 enter
=COUPDAYBS(B1;B2;B3;B4). - Expect the numeric count 74 for basis 1. Keep the output formatted as a number, not a date.
- As an independent calendar control, count January’s 31 days, February’s 28 days and 15 days in March: 31 + 28 + 15 = 74. The start date is excluded from elapsed-day subtraction.
- Change B4 to 0 and expect 75, the source’s 30/360 count for the same dates. Restore basis 1 before continuing.
| Variation | Expected elapsed days | Explanation |
|---|---|---|
| Main dates, basis 1 | 74 | Actual elapsed days |
| Main dates, basis 2 or 3 | 74 | The numerator still counts actual days |
| Main dates, basis 0 | 75 | Previous December 31 normalized to day 30; three 30-day months less 15 days |
| Settlement June 30, 2025; basis 1 | 0 | Settlement lies exactly on a coupon date |
The implementation selects the coupon date on or before settlement, then counts from it. On a coupon date it starts a new period rather than counting a full preceding period.
Basis values in this Calligra implementation
The coupon-family code accepts 0 through 5: 0 is its MSRB 30/360 method, 1 actual/actual, 2 actual/360, 3 actual/365, 4 European 30/360 and 5 European 30E+/360. Basis 5 is source-supported but is not listed in the older COUPNUM handbook text; cross-program portability is unverified. Prefer a documented contract’s basis and test it explicitly.
For day differences, selectors 1, 2 and 3 all count actual elapsed days; a denominator matters only when another calculation divides that count. The 30/360 variants use different end-of-month adjustments. These coupon helpers are not the simpler ACCRINT/ACCRINTM helpers elsewhere in the same file. See basis definitions and day-count code.
Advanced case: create an accrual fraction with a matched denominator
For the main basis-1 example, the actual period is 181 days, so the elapsed fraction is 74/181 = 0.4088397790. If a separately specified regular coupon payment is 30, multiplying by that fraction gives an illustrative 12.2651933702. This arithmetic is useful for understanding a regular-period accrual; it is not a complete settlement-pricing model.
Use a denominator that belongs to the same model. With basis 0, elapsed days are 75 and the semiannual convention period is 180, giving 75/180 = 0.4166666667. The difference is substantive. Do not combine the 74 actual-day numerator with 180 merely because 180 looks like “half a year” unless the intended convention requires it.
A practical worksheet can retain the basis in a visible input cell and show elapsed days, denominator and fraction in separate columns. Check that the denominator is nonzero and that the instrument really follows the maturity-anchored regular schedule. For a first or last irregular coupon, this function has no parameter describing the stub.
What a zero result means
A zero day count at June 30, 2025 is a schedule-boundary result, not missing data and not proof that no coupon payment occurs that day. Payment entitlement, settlement conventions and accrued-interest treatment are separate questions. A different maturity anchor could move the inferred coupon boundaries even when settlement is unchanged.
Errors, boundaries and compatibility
- The source explicitly returns
#VALUE!when settlement is on or after maturity, basis is outside 0–5, frequency is zero or frequency does not divide 12. These are source-predicted errors; their native cell display is not claimed here. - Use positive frequencies. Some negative divisors pass the explicit validation, and the coupon-date iteration is not safe to assume terminating for those inputs. Do not use negative-frequency trial formulas in a production workbook.
- Validate date inputs before calling the function. Invalid text dates, blanks, imported errors and fractional-selector coercion are outside the verified examples.
- The schedule is inferred backward from maturity at fixed month intervals. There is no issue date, first-coupon date, holiday calendar, business-day adjustment or irregular-stub argument. A computed date or count is not proof of the actual instrument’s payment schedule.
- End-of-month handling matters: when maturity is the last day of its month and end-of-month mode is enabled, generated coupon dates are moved to the last day of their respective months. Leap years and unequal month lengths therefore deserve explicit tests.
- Formula-name compatibility is not import/export verification. No workbook round trip or comparison with another spreadsheet engine has been performed.
Related guides and evidence
- DATE constructs unambiguous date inputs.
- YEARFRAC is a separate year-fraction calculation, not a substitute for the coupon schedule.
- DAYS can support a date-difference cross-check when its argument order is observed.
The registered alternate name COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETCOUPDAYBS invokes COUPDAYBS. It is the same function under another name; it does not select a different day-count method.
Selected native results and screenshot
These formulas were recalculated in Calligra Sheets 25.04.2 using a prepared ODS workbook, then saved by the application. The table records the native-saved results. Date-returning cells use ISO date formatting. Other examples in this guide remain independently calculated expectations or source analysis unless listed here.
| Entered formula | Native result |
|---|---|
=COUPDAYBS(DATE(2025;3;15);DATE(2026;12;31);2;0) |
75.0 |
=COUPDAYBS(DATE(2025;3;15);DATE(2026;12;31);2;1) |
74.0 |
=COUPDAYBS(DATE(2025;3;15);DATE(2026;12;31);2;3) |
74.0 |
=COUPDAYBS(DATE(2025;6;30);DATE(2026;12;31);2;1) |
0.0 |

Screenshot: Native Calligra Sheets 25.04.2. Selected cell B2 evaluates =COUPDAYBS(DATE(2025;3;15);DATE(2026;12;31);2;0) and shows 75.0000000000. Column B contains application results; column C shows the corresponding formula text.
These selected observations establish 25.04.2 behavior for the listed formulas. They do not establish execution in 26.08.2, another locale or another spreadsheet product, nor do they validate an actual instrument’s contractual schedule.