Formualizer Docs

NPV

Calculates net present value for equally spaced cash flows.

The first cash-flow argument is discounted one period from the present, matching spreadsheet NPV behavior for periodic series.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

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

Arguments

ArgumentTypeRequiredDefault
ratenumberRequired—
value1anyRequired—
value2valueOptional—

Accepts a variable number of arguments. Minimum: 2.

Differences from Excel

A rate of −1 returns #NUM! in Formualizer and #DIV/0! in Excel.

Remarks

  • rate is the discount rate per period.
  • Cash-flow sign convention: investments/outflows are negative, returns/inflows are positive.
  • Text, blank, and logical cells in references are ignored. Direct scalar and computed-array values are consumed left-to-right, and direct non-numeric text returns #VALUE!.
  • Embedded error values inside provided cash-flow values are propagated as errors.
  • Returns argument coercion errors for invalid rate or direct scalar failures.

Examples

Discount three end-of-period cash flows.

Formula =NPV(0.05,40,50,60)

Expected result 135.276967930029

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Provide the same series as an array in a single value argument.

Formula =NPV(0.05,{40,50,60})

Expected result 135.276967930029

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A zero discount rate leaves the cash flows undiscounted.

Formula =NPV(0,40,50,60)

Expected result 150

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A rate of negative one makes the discount denominator zero.

Formula =NPV(-1,40,50,60)

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Discount three successive receipts of 4,000, 5,000 and 6,000 at 8% per period.

Formula =NPV(0.08, 4000, 5000, 6000)

Expected result 12753.3912513336

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Discount an outlay in the first period followed by three receipts, all at 10% per period.

Formula =NPV(0.10, -5000, 2000, 2500, 3000)

Expected result 1034.76538487808

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Is the first cash flow discounted at period 0 or period 1?

NPV discounts the first supplied cash flow one full period, matching spreadsheet NPV behavior.

Implementation

Engine source

On this page