XNPV Function (OpenOffice Calc)
Discount irregular dated cash flows with OpenOffice XNPV. Verify the first-date anchor, fixed 365-day exponent and leap-year examples with aligned ranges.
Verification status: Eight ordinary reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, through generated native ODF and GUI hard recalculation. Saved identities, inputs and results were checked. How formula examples are checked
Quick answer: =XNPV(.1;F10:F14;G10:G14) returned 223.24767465592 in the tested Apache OpenOffice 4.1.16 build. Use the numeric worksheet setup below for these range addresses.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
- Scope: Desktop Calc, English function names and semicolon-separated formulas.
- Checked: October 14, 2026. Eight ordinary reference formulas were recalculated from generated ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent arithmetic were checked.
What XNPV returns
XNPV sums each cash flow discounted by (1+Rate)^((Date-FirstDate)/365). The first supplied date is the time origin, and its cash flow is not discounted. The function uses actual date differences with a fixed 365-day denominator, not YEARFRAC’s selectable basis. Release implementation.
Syntax and arguments
XNPV(Rate;Values;Dates)
- Rate: annual discount rate; the ordinary examples use nonnegative values.
- Values: required range of cash-flow amounts.
- Dates: matching range of numeric date serials in the same positional order.
- The implementation requires equal counts and at least two entries. There is no Basis argument.
Numeric worksheet setup
Enter each value in the stated cell. Dates in G10:G14 are numeric date serials with the December 30, 1899 origin; format them as dates if desired. J12:J14 are unused.
| Row | F: ordinary flows | G: date serial and interpretation | H: delayed receipt | I: two investments | J: two flows |
|---|---|---|---|---|---|
| 10 | −1000 | 45292 (2024-01-01) | −1000 | −1000 | −1000 |
| 11 | 200 | 45474 (2024-07-01) | 0 | −100 | 1100 |
| 12 | 300 | 45658 (2025-01-01) | 0 | 300 | — |
| 13 | 400 | 45839 (2025-07-01) | 0 | 500 | — |
| 14 | 500 | 46023 (2026-01-01) | 1500 | 700 | — |
MIRR treats each successive row as one equal period; it does not use column G. XNPV uses the actual date differences in G. Keep these timing models distinct.
Eight reproducible examples
The native column contains saved 4.1.16 results; independent references use high-precision arithmetic and the stated source rules. Values are shown to twelve decimal places where needed. The range examples use the numeric setup above.
| Formula | Native 4.1.16 result | Independent reference |
|---|---|---|
=XNPV(.1;F10:F14;G10:G14) |
223.24767465592 |
223.24767465592 |
=XNPV(0;F10:F14;G10:G14) |
400 |
400 |
=XNPV(.05;F10:F14;G10:G14) |
306.119582455629 |
306.119582455629 |
=XNPV(.1;H10:H14;G10:G14) |
239.3457565821 |
239.345756582101 |
=XNPV(.1;I10:I14;G10:G14) |
189.107385399373 |
189.107385399373 |
=XNPV(.1;F10:F11;G10:G11) |
-809.282583349933 |
-809.282583349933 |
=XNPV(.1;F11:F14;G11:G14) |
1282.78549085044 |
1282.785490850441 |
=XNPV(.2;F10:F14;G10:G14) |
83.910085438436 |
83.910085438436 |
Practical worksheet
The main series is −1000 on January 1, 2024; 200 on July 1, 2024; 300 on January 1, 2025; 400 on July 1, 2025; and 500 on January 1, 2026. At 10%, XNPV is approximately 223.247674655920.
The day offsets are 0,182,366,547,731. In particular, the January 1, 2025 flow uses 366/365 years because 2024 is a leap year. It is not automatically discounted by exactly one annual period. At a zero rate, the result is simply the sum, 400.
Advanced interpretation and checks
The first two entries at 10% give −1000+200/(1.1)^(182/365)≈−809.282583349933. This independently checks the date fraction and time-zero handling.
Selecting F11:F14 with G11:G14 changes the first supplied date to July 1, 2024. The resulting 1282.785490850441 is the present value of those four positive receipts at the new origin; it is not the original series with an unchanged anchor. Move dates and values together when sorting or slicing ranges.
Boundaries and troubleshooting
The source checks matching list lengths and at least two entries, then applies the fixed-365 formula. Unlike an IRR root search, summing discounted values does not inherently require both signs; the positive-only slice is a valid present-value calculation and was tested.
Use real date serials, Rate>−1 for the ordinary real-valued model, and aligned ranges. Native cases use ordinary chronological dates and nonnegative rates; negative-rate boundaries, text/blank conversions, invalid count mismatches and unsorted dates were not executed. The function evaluates the chosen cash flows and discount assumption; it does not establish that the assumed rate is appropriate.
Related functions
Official evidence and checking scope
The generated ODF produced the informational load warning “Not all attributes could be read.” The sheet was hard-recalculated and saved separately. All eight ordinary function identities, inputs and results were reconciled; a stale SUM cache changed from 999999 to 3 and an uncached SUM returned 7. This establishes the stated examples, not every workbook style or invalid input. Other explanatory identities are independent calculations. The authoring-tool XLSX was not executed in OpenOffice, and its preview values are not the native results reported here.