Investment Studio > Expressions > Functions > Financial > NPV
float npv(float discount_rate, float cash_flows [, ...])
Returns the Net Present Value of an investment given a discount rate and a series of future cash flows occurring at regular intervals (e.g. monthly or annually).
discount_rate is the rate of discount for one payment period.
cash_flows is the series of future inflows (positive values) and outflows (negative values) occurring at the end of each payment period. Cash flows must be listed in their order of occurrence. The list may contain array arguments, in which case all array elements are converted to floats (with exclusion if conversion fails) and interpreted as a single, one-dimensional sequence. If an array is two-dimensional, it's read in the usual order (i.e. row by row: left to right, top to bottom).
Note that all cash flows occur at the end of their period. This means that if the first cash flow which you want to consider occurs at the beginning of the first period, it must be added to the NPV of the subsequent cash flows, not included in the list of arguments to the NPV function.
Mathematically, given N cash flows,
| N | ||
| NPV = | å | cash_flow[k] |
| ¾¾¾¾¾¾¾¾¾ | ||
| (1 + discount_rate)k | ||
| k = 1 |
NPV is related to IRR (Internal Rate of Return): the IRR of an investment is the interest rate for which NPV vanishes: ideally, npv(irr(cash_flows), cash_flows) = 0.
Example
You are offered to pay USD 1000 now to receive an annual income of 200, 250, 300 and 350 in the four following years. The sum of the future cash flows is 1100, so this may look like a good investment. But if the discount rate is 5%, the net present value is
=npv(5%, 200, 250, 300, 350) - 1000
» USD -35.67.