xHarbour Reference Documentation > Function Reference |
Calculates the future value of constant, periodic investments.
Fv( <nInvestment> , ; <nInterestRate> , ; <nPeriods> ) --> nFutureValue
The function returns the future value of a periodic, constant investments at a constant interest rate over a period of time as a numeric value.
See also: | Payment(), Periods(), Pv(), Rate() |
Category: | CT:Math , Financial functions , Mathematical functions |
Source: | ct\finan.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example calculates the future value of a monthly investment // of 100 units of money over a period of 66 months at a savings // interest rate of 4% per year. PROCEDURE Main LOCAL nInvestment := 100 // monthly payment LOCAL nInterest := 0.04/12 // monthly interest rate LOCAL nMonths := 66 // total investment period ? FV( nInvestment, nInterest, nMonths ) // result: 7368.63 RETURN
http://www.xHarbour.com