Siebel VB Language Reference > VB Language Reference >
This standard VB function returns the net present value of an investment based on a stream of periodic cash flows and a constant interest rate.
NPV(rate, valuearray( ))
The discount rate per period
An array containing cash-flow values
The net present value of cash flows in valuearray( ) based on the rate.
Valuearray( ) must have at least one positive value (representing a receipt) and one negative value (representing a payment). Payments and receipts must be represented in the exact sequence. The value returned by NPV varies with the change in the sequence of cash flows.
If the discount rate is 12% per period, rate is the decimal equivalent, that is, 0.12.
NPV uses future cash flows as the basis for the net present value calculation. If the first cash flow occurs at the beginning of the first period, its value should be added to the result returned by NPV and must not be included in valuearray().
This example finds the net present value of an investment, given a range of cash flows by the user.