Return the net present value of an investment.

View versions (1)

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)
GPL Licence — free for non commercial use. See Licence details.