Contact

NPV Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples

Financial Intermediate ONLYOFFICE Spreadsheet Editor

Discount equally spaced future cash flows while keeping an initial payment at time zero outside the function.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer

=NPV(0.10,600,600)-1000 is expected to return approximately 41.3223140496. The function discounts the two future receipts at the ends of periods 1 and 2. The initial outlay 1000 occurs now, so it is subtracted outside NPV.

NPV returns a monetary present value, not a rate of return. A positive result means the modeled discounted future cash flows exceed the initial outlay at the supplied discount rate; it does not guarantee that the cash flows will occur.

Syntax and timing

=NPV(rate, value1, [value2], ...)

rate is the discount rate per equally spaced period. The official help allows up to 255 value arguments representing payments as negative values and receipts as positive values. Arguments can include ranges. The inspected calculation starts its discount exponent at 1.

For annual cash flows use an annual rate; for monthly cash flows use an appropriately defined monthly rate. Dividing a nominal annual rate by 12 is not the same conversion as taking the twelfth root of an effective annual growth factor. Choose the rate convention that matches the model. NPV has no date input or day-count basis.

Step-by-step: keep the initial outlay separate

  1. Enter initial cash flow -1000 in B2.
  2. Enter future receipts 600 in B3 and 600 in B4, one period apart.
  3. Put discount rate 0.10 in D2.
  4. In D3 enter =NPV(D2,B3:B4)+B2.
  5. Label D3 Net present value, using the same currency unit as the cash flows.
Timing Cash flow Independent present value at 10%
Now, time 0 −1000 −1000
End of period 1 600 600/1.1 = 545.454545455
End of period 2 600 600/1.1² = 495.867768595
Total 41.3223140496

=NPV(0.10,600,600) alone is expected to return 1041.32231405, the value of future receipts before the initial cost. =NPV(0.10,-1000,600,600) instead discounts every value one period later and is expected to return 37.5657400451. The latter does not put the initial outlay at time zero.

Important range behavior: zero is not a blank

The source processes numeric elements of ranges and arrays and advances the period counter only for included numbers. Nonnumeric elements are skipped. Therefore a blank row can compress the timeline rather than preserve an empty payment period.

For a separate check, put 110 in F2, leave F3 genuinely blank and put 121 in F4. =NPV(0.10,F2:F4) is expected from the inspected range loop to give 200, using periods 1 and 2. If F3 contains numeric 0 instead, the expected result is 190.909090909, using periods 1,2,3. Enter zero explicitly when a period exists but its cash flow is zero.

The same range loop does not propagate every embedded error as a formula failure; it includes only number elements. This makes input validation important. Inspect the range for errors, text and blanks instead of interpreting a numeric NPV as proof that every row was included. Direct scalar arguments have a different numeric-conversion path, so do not infer identical handling from a range example.

Advanced use: compare assumptions on the same timeline

Keep the cash-flow row order and time-zero treatment fixed while varying the rate. At a zero rate, =NPV(0,600,600)-1000 is expected to return 200, the undiscounted net sum. At 10% it gives approximately 41.3223. A change in rate is meaningful only if the timing and currency assumptions remain the same.

For irregular dates, use a dated present-value method rather than treating uneven gaps as equal periods. In ONLYOFFICE’s inspected XNPV implementation, rate zero is rejected, so do not assume that every NPV control transfers unchanged to XNPV. The two functions also place the initial timing origin differently.

Errors and safeguards

The explicit NPV rate guard rejects −1 with #DIV/0!. The source does not impose a general economic-validity check on every other rate. Use a rate greater than −1 for an ordinary discount-factor model; pathological values can give mathematically defined but inappropriate alternating discount factors.

Keep payments and receipts in one unit and from one consistent viewpoint. Do not replace a missing future estimate with a blank merely to make the result calculate. A financial model’s interpretation depends on cash-flow quality, timing and discount assumptions, not only on formula syntax.

Availability and verification scope

Checked October 18, 2026 against the official NPV 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.