The VBA FV Function
The VBA FV function calculates the future value of a loan or investment that has periodic fixed payments and a fixed interest rate.
The syntax of the function is:
FV( Rate, Nper, Pmt, [Pv], [Due] )
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.|
An optional argument that specifies the present value of the loan / investment.
If omitted, [Pv] uses the default value 0.
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;
1 - the payment is due at the beginning 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.
This is seen in the example below.
VBA FV Function Example
In the following VBA code, the VBA FV function is used to calculate the future value of an investment of $1,000 per month for a period of 5 years. The present value is 0 and interest is 5% per year. Each payment is made at the end of the month.
|Dim fv1 As Double|
fv1 = FV( 0.05/12, 60, -1000 )
The above VBA code calculates the future value of the investment to be $68,006.08.
- As the payments are monthly, the annual interest rate of 5% is divided by 12 to calculate the monthly interest rate. Also, the number of periods during the 5 years of the investment is supplied as 60 months.
- As the [Pmt] argument represents a series of outgoing payments, this is supplied as a negative value.
- As the present value of the annuity is 0, the [Pv] argument can be omitted from the FV function.
- As the payments are due at the end of each period, the [Due] argument can also be omitted from the function.