Calculates the net present value of an investment by using a discount rate
and a series of future payments (negative values) and income (positive
values).
Remarks:
The NPV investment begins one period before the date of the first value in
the cash flow and ends with the last value in the cash flow. The NPV
calculation is based on future cash flows. If your first cash flow occurs
at the beginning of the first period, the first value must be added to the
NPV result, not included in the cash flows.
calculateNetPresentValue() is similar to the calculatePresentValue()
function (present value). The primary difference between
calculateNetPresentValue() and calculatePresentValue() is that
calculatePresentValue() allows cash flows to begin either at the end or
at the beginning of the period. Unlike the variable NPV cash flow values,
PV cash flows must be constant throughout the investment.
calculateNetPresentValue() is also related to the
calculateInternalRateOfReturn() function (internal rate of return). IRR
is the rate for which NPV equals zero:
calculateNetPresentValue({ rate: calculateInternalRateOfReturn(...), ... }) = 0.
Parameters
options: NetPresentValueOptions
The net present value calculation
options.
Returns number
The net present value.
Throws
When there are no cash flow values or rate is invalid.
Calculates the net present value of an investment by using a discount rate and a series of future payments (negative values) and income (positive values).
Remarks:
calculateNetPresentValue()is similar to thecalculatePresentValue()function (present value). The primary difference betweencalculateNetPresentValue()andcalculatePresentValue()is thatcalculatePresentValue()allows cash flows to begin either at the end or at the beginning of the period. Unlike the variable NPV cash flow values, PV cash flows must be constant throughout the investment.calculateNetPresentValue()is also related to thecalculateInternalRateOfReturn()function (internal rate of return). IRR is the rate for which NPV equals zero:calculateNetPresentValue({ rate: calculateInternalRateOfReturn(...), ... }) = 0.