ODDLPRICE Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Calculate clean price per 100 for an odd final coupon using ONLYOFFICE’s year-fraction discount and accrued-interest formula.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
For a last coupon on January 15, 2026, settlement April 15 and maturity May 15, a 6% coupon and 8% yield give an expected clean price of 99.8245033113 per 100, using basis 0. The final coupon covers four months rather than a normal six-month interval.
ODDLPRICE concerns an odd last period. Its last_interest argument is the last coupon date before settlement, not the issue date or the next payment date. The inspected implementation uses direct year-fraction algebra rather than a multi-payment power-discounting schedule.
Syntax and dates
=ODDLPRICE(settlement, maturity, last_interest, rate, yld, redemption, frequency, [basis])
Seven arguments are required; basis is optional and defaults to 0. Dates must satisfy last_interest < settlement < maturity. Coupon rate and annual yld are decimals, so 6% is 0.06. Redemption is per 100 face value. Frequency must be 1, 2 or 4. Basis codes are 0 US30/360, 1 actual/actual, 2 actual/360, 3 actual/365 and 4 European 30/360.
Enter dates with DATE, not ambiguous date text. A result near 100 is a price quote per 100, not a percentage fraction. Use the same redemption convention throughout the model.
Step-by-step: a short final coupon
| Cell | Input |
|---|---|
| B2 | =DATE(2026,4,15) |
| B3 | =DATE(2026,5,15) |
| B4 | =DATE(2026,1,15) |
| B5 | 0.06 |
| B6 | 0.08 |
| B7 | 100 |
| B8 | 2 |
| B9 | 0 |
Enter =ODDLPRICE(B2,B3,B4,B5,B6,B7,B8,B9) in B11. Expected result: 99.8245033113 approximately.
Under basis 0, the selected dates give three simple year fractions:
- Last coupon to maturity: 120/360 = 1/3.
- Settlement to maturity: 30/360 = 1/12.
- Last coupon to settlement: 90/360 = 1/4.
The final coupon is 100×0.06×1/3 = 2. Accrued interest is 100×0.06×1/4 = 1.5. The inspected expression becomes:
clean price = (100 + 2)/(1 + 0.08/12) - 1.5
= 99.8245033113 approximately
The dirty price before fees is clean price plus 1.5, or 101.3245033113. For face value 10,000, multiply these per-100 amounts by 100: clean amount approximately 9,982.45033 and dirty amount approximately 10,132.45033.
Advanced use: frequency and basis controls
The source computes three year fractions, multiplies each by frequency, and later divides by frequency. Thus frequency algebraically cancels in this implementation after the 1/2/4 validity check. For the exact same dates and other arguments, changing frequency from 2 to 1 or 4 is expected to leave the result unchanged. This is a source-specific fact, not proof that frequency is irrelevant to every odd-coupon pricing convention or other spreadsheet product.
Changing basis can still change the year fractions. Actual/actual follows the application’s YEARFRAC helper; it is not simply a promise to divide every interval by 365. The clean 15th-of-month example avoids month-end ambiguity. Reconstruct all three fractions before using a different basis or leap-year schedule.
At zero yield, the wrapper permits the input and the expected result is 100.5: the undiscounted 102 payment less 1.5 accrued interest. This provides a useful arithmetic control without asserting market realism.
Errors and compatibility
The wrapper returns #NUM! for invalid date order, negative coupon or yield, nonpositive redemption, frequency outside 1/2/4 or basis outside 0–4. Dates, frequency and basis are floored before validation; other numeric conversions can propagate errors. Zero coupon is permitted by the nonnegative-rate check.
The implementation does not expand a long final period into the same quasi-coupon machinery used by every other spreadsheet. Do not infer cross-product agreement solely from an identical function name. Compare the stated year-fraction formula, clean/dirty convention and actual payment schedule. This guide’s short-final example does not certify every long-final or month-end case.
Availability and verification scope
Checked October 18, 2026 against the official ODDLPRICE help and official SDKJS source tagged v10.0.0.169. Desktop Editors 10.0 was released October 13, 2026. The original introduction version for this individual function is not established; current help does not mark it retired or deprecated.
All results in this guide are expected values from documentation, source inspection and independent arithmetic, not application observations. Neither the application nor its calculation engine was used to test these examples. The tag matches the installed version/build designation but does not establish identical behavior in every older release, mobile client, server deployment or imported workbook. Examples use English names and comma argument separators; adapt separators to editor settings. These fictional calculations explain a function, not an investment or borrowing recommendation.