The VBA PV function calculates the present value of a loan or investment that has periodic fixed payments and a fixed interest rate.
The syntax of the function is:
Where the function arguments are:
Rate | - | The interest rate, per period. |
Nper | - | The number of periods over which the loan or investment is to be paid. |
Pmt | - | The (fixed) payment amount per period. |
[Fv] | - |
An optional argument that specifies the future value of the loan / investment. If omitted, [Fv] uses the default value 0. |
[Due] | - |
An optional argument that defines whether the payment is due at the start or the end of the period. The [Due] argument can have the value 0 or 1, meaning:
0 - the payment is due at the end of the period; If the [Due] argument is omitted, it uses the default value 0 (denoting payments due at the end of the period). |
Cash Flow Sign Convention:
Note that, in line with the general cash flow sign convention, cash outflows are represented by negative numbers and cash inflows are represented by positive numbers.In the following VBA code, the VBA PV function is used to calculate the present value of an annuity that pays $1,000 per month for a period of 5 years. The interest is 5% per year and each payment is made at the end of the month.
' Calculate the present value of an annuity that pays $1,000 per month over 5 years.
Dim pv1 As Double' Interest is 5% per year and each payment is made at the end of the month. pv1 = PV( 0.05/12, 60, -1000 ) ' pv1 is calculated to be 52990.7063239272. |
The above VBA code calculates the present value of the annuity to be $52,990.71.
Note that: