COUPDAYS Function (Calligra Sheets)
Calculate a coupon-period denominator with Calligra COUPDAYS, distinguishing actual interval length from fixed 360/frequency or 365/frequency conventions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =COUPDAYS(DATE(2025;3;15);DATE(2026;12;31);2;1) is expected to return 181. With basis 0 it is 180; with basis 3 it is 182.5.
COUPDAYS returns the coupon-period length or convention denominator for the period containing settlement. The result is not always the calendar day difference between coupon dates, and it is not always an integer.
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 COUPDAYS description. Its availability and argument count are established by the runtime registration, not by an invented handbook section.
Syntax and argument roles
=COUPDAYS(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 period-length 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
=COUPDAYS(B1;B2;B3;B4). - With basis 1, expect 181, the actual interval from December 31, 2024 to June 30, 2025.
- Set B4 to 0 and expect 180, from 360/2.
- Set B4 to 3 and expect 182.5, from 365/2. Display at least one decimal place so the half-day convention value is visible.
| Basis | Source calculation | Expected main-case result |
|---|---|---|
| 0 | 360/frequency | 180 |
| 1 | Actual previous-to-next coupon interval | 181 |
| 2 | 360/frequency | 180 |
| 3 | 365/frequency | 182.5 |
| 4 | 360/frequency | 180 |
| 5 | 360/frequency | 180 |
A value of 182.5 is a valid convention denominator here. It is not a claim that the coupon date occurs halfway through a day. Do not round the denominator to 183 before using it in a fraction.
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: test the tempting day-part identity
For the main dates, actual days before settlement are 74 and actual days after settlement are 107. Their sum is 181. Under basis 1 this equals COUPDAYS, as expected for a calendar interval partition.
Under basis 2, the two actual-day parts remain 74 and 107, but COUPDAYS is 180. Under basis 3 those parts remain unchanged while COUPDAYS is 182.5. Therefore the identity “days before + days after = coupon days” is not universal across bases in this implementation. A reconciliation sheet should compare like conventions rather than flag every unequal result as a calculation error.
For a 30-unit regular coupon, 74/181 Ă— 30 is approximately 12.2651933702, while 74/180 Ă— 30 is approximately 12.3333333333, and 74/182.5 Ă— 30 is approximately 12.1643835616. These are independent arithmetic examples of denominator sensitivity, not asserted contractual accrual amounts.
Change settlement across a coupon boundary
With settlement June 30, 2025, maturity unchanged and basis 1, the selected interval begins on June 30 and ends on December 31, 2025. Its actual length is 184, so COUPDAYS is expected to change from 181 to 184. Basis 0 stays 180 and basis 3 stays 182.5 for semiannual frequency.
This distinction makes basis 1 particularly sensitive to the actual coupon schedule. A full-year period can span 365 or 366 actual days. For quarterly frequency the fixed denominators are 90 for basis 0/2/4/5 and 91.25 for basis 3, while actual periods vary with their months. Always retain enough decimal places for the chosen convention.
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.GETCOUPDAYS invokes COUPDAYS. 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 |
|---|---|
=COUPDAYS(DATE(2025;3;15);DATE(2026;12;31);2;0) |
180.0 |
=COUPDAYS(DATE(2025;3;15);DATE(2026;12;31);2;1) |
181.0 |
=COUPDAYS(DATE(2025;3;15);DATE(2026;12;31);2;3) |
182.5 |
=COUPDAYS(DATE(2025;6;30);DATE(2026;12;31);2;1) |
184.0 |

Screenshot: Native Calligra Sheets 25.04.2. Selected cell B2 evaluates =COUPDAYS(DATE(2025;3;15);DATE(2026;12;31);2;0) and shows 180.0000000000. Column B contains application results; column C shows the corresponding formula text. The basis-3 row visibly retains the fractional denominator 182.5.
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.