FUNCTION
npv
Return the net present value of an investment.
Interface
#include <codecogs/finance/accounting/npv.h>
using namespace Finance::Accounting;
This function calculates the net present value of an investment. It returns the net present value of a stream of equal periodic cash flows, which are subject to a given discount rate.
Parameters
rate
The interest rate
value
An array of values
nV
The number of values (entries in the array)
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.