YIELD Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Infer an annual coupon-security yield from its clean price, with a pricing-equation check and explicit numerical-solver limits.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
=YIELD(DATE(2026,12,15),DATE(2028,12,15),0.10,100,100,1,0) has an independently checked expected yield of approximately 0.10, or 10%. The price 100 equals the present value of payments 10 and 110 discounted one and two years at 10%.
YIELD solves the regular coupon pricing relationship. It is not simply coupon divided by price and is not an effective annual return compounded from a supplied periodic rate.
Syntax, prices and rates
=YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])
rate is the annual coupon rate, pr is the positive clean purchase price per 100 face value and redemption is the positive maturity amount per 100. frequency is 1, 2 or 4 payments per year. The output is an annual decimal yield under that periodic compounding convention.
Basis defaults to 0 when omitted. The documented codes are 0 US (NASD) 30/360, 1 actual/actual, 2 actual/360, 3 actual/365 and 4 European 30/360. Use DATE for unambiguous numeric dates, settlement strictly before maturity, and consistent monetary units. Brackets mark optional syntax and are not typed.
The wrapper and numerical helper repeatedly evaluate the same pricing model used by PRICE. That model subtracts accrued coupon interest, so an input full settlement amount that includes accrual is not interchangeable with a clean price.
Step-by-step: an independently solvable example
- Put settlement
=DATE(2026,12,15)in A2 and maturity=DATE(2028,12,15)in B2. - Enter annual coupon
0.10, clean price100, redemption100, frequency1and basis0in C2:G2. - Put
=YIELD(A2,B2,C2,D2,E2,F2,G2)in H2. - Format H2 as a percentage; retain sufficient digits for a price back-check.
At y=0.10, 10/(1+y)+110/(1+y)^2=100. This verifies the expected root independently. The output is approximate because YIELD uses a numerical search; the guide does not claim an observed native rounding pattern.
| Formula | Independent expected yield |
|---|---|
=YIELD(A2,B2,0.10,100,100,1,0) |
approximately 0.10 |
=YIELD(A2,B2,0.10,120,100,1,0) |
0 |
=YIELD(A2,B2,0.10,500/9,100,1,0) |
approximately 0.50 |
=YIELD(A2,B2,0.10,100,100,1) |
approximately 0.10, default basis 0 |
The zero-yield price is 10+110=120. At 50% yield,10/1.5+110/1.5²=500/9. The 50% case is a mathematical solver control, not an investment scenario or suggested return assumption.
Advanced use: check the pricing residual
After obtaining a yield, put it back into PRICE with the same dates, coupon, redemption, frequency and basis, then compare the reconstructed clean price with the input quote. For the main example the independent target is 100. A sensible acceptance tolerance should reflect the precision needed for the use case; a result displayed as 10% alone does not establish that the reconstructed price is sufficiently close.
A semiannual annual yield uses the source factor 1+yld/2 per half-year. Do not divide YIELD’s result by 2 and then supply it as the annual yld argument to PRICE, because PRICE would divide again. Keep coupon frequency and rate units together when exporting a model.
Solver limits and errors
The inspected helper starts with yields 0 and 1, can expand the upper search value, and runs at most 100 iterations. It uses interpolation and exact-price comparisons; after the loop, its explicit residual failure test compares the last price error with 1% of the supplied price. The returned interpolated yield can also differ from the iterate associated with that last checked price. This is not a promised high-precision tolerance, nor a guarantee that every valid-looking input converges. The helper can report a numeric-error object at that check; this guide does not generalize an unobserved final UI error display from that helper branch.
The input wrapper explicitly rejects negative coupon rate, nonpositive price/redemption, invalid frequency or basis, unsupported date serials and settlement at/after maturity. Dates, frequency and basis are floored. There is no user-supplied initial guess or tolerance parameter. Negative-yield cases and difficult extreme prices are outside the worked evidence here.
The underlying schedule is regular and maturity-anchored, with a distinct one-remaining-coupon price branch. Odd coupon periods, month-end/leap-day anchors, optional redemption and actual market yield conventions need separate verification. A numeric root of this model is not a forecast of realized return.
Availability and verification scope
Checked October 18, 2026 against the official YIELD 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.