XIRR Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Find an annualized root for dated cash flows, with explicit guess, multiple-root and solver-validation cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
For −1000 paid on January 1, 2026 and 1100 received on January 1, 2027, =XIRR(B2:B3,A2:A3) has an independently verified expected root of approximately 0.10, or 10%. XIRR finds a rate that makes the dated discounted cash-flow sum zero. It does not forecast that return or guarantee a unique solution.
Syntax and defaults
=XIRR(values, dates, [guess])
The official help requires corresponding payment/date arrays with at least one negative and one positive amount. guess is an optional annual decimal starting estimate, default 0.10. Supply dates with DATE and keep every date paired with its cash flow.
The source equation discounts each cash flow using (date−first_date)/365. The first date must be no later than the other dates in the inspected implementation. Unlike its XNPV implementation, this source does not require the later dates to be fully sorted, but chronological order is the clearest and safest worksheet convention.
Step-by-step: independently verify a simple root
- Enter
=DATE(2026,1,1)in A2 and=DATE(2027,1,1)in A3. - Enter
-1000in B2 and1100in B3. - Put
=XIRR(B2:B3,A2:A3)in D2. - As a second starting-estimate check, put
=XIRR(B2:B3,A2:A3,0.20)in D3. - Format the results as percentages and check the cash-flow equation using unrounded values.
The expected root is 10% because −1000+1100/(1+0.10)=0. The equation, not the display rounding, verifies the root. Different sensible guesses should lead to that same unique root for this simple two-cash-flow case, but this does not prove convergence for arbitrary series.
If the receipt is 1210 exactly 730 days after the initial payment, the independently expected root is also 10%:1210/(1.1²)=1000. If the 1100 receipt is 366 days later instead, the root is 1.1^(365/366)−1≈0.0997135859341. A calendar year containing leap day is not exactly one 365-day exponent period.
Advanced case: a return can have more than one root
Consider a mathematical series −100,230,−132 at dates separated by 365 days. Its equation is −100+230/(1+r)−132/(1+r)^2=0. Both 10% and 20% satisfy it. This follows independently by multiplying through by (1+r)² and factoring the resulting quadratic.
A guess helps a numerical search but does not identify which root is economically relevant or prove that the result is unique. Do not promise that a particular guess will always select a particular root across versions or difficult data. Examine the cash-flow pattern, independently check any returned residual and explain which root is being used. These are algebraic examples, not recommendations for evaluating a real investment.
Solver behavior and verification limits
The inspected implementation uses a finite-difference Newton-style search, up to 500 iterations, with a rate-change threshold of 1e-7. A finite result can be returned without a final universal present-value-residual test. A fallback search is entered when the first result is nonfinite; it also has bounded iterations. Its endpoint shortcut can return a function residual rather than the corresponding rate. Consequently, a returned number alone is not a convergence certificate.
For the positive main-example root, an independent dated sum or a compatible XNPV residual should be near zero. ONLYOFFICE’s inspected XNPV rejects zero and negative rates, so it cannot validate every possible XIRR root. For those rates, use the explicit discounted-sum equation and ensure 1+r remains in the intended domain.
Input errors and safe preparation
The source rejects a guess ≤−1, unequal lengths, an empty series and an initial cash-flow value of zero. A single value/date pair follows a separate #N/A branch. Its sign check distinguishes negative from nonnegative values, which is weaker than proving that a strictly positive receipt exists; follow the help’s stronger mixed-sign requirement.
Dates are floored to whole days for the calculation. Any later date earlier than the first date or beyond the supported maximum is rejected. Boolean and invalid numeric conversions have their own errors; use numeric cash flows and dates without headers or empty rows. The guide’s worked cases avoid identical-date-only series, zero derivatives, extreme guesses and ambiguous multiple-root execution claims.
Availability and verification scope
Checked October 18, 2026 against the official XIRR 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.