I\'m trying to work on a script where the user inserts a monthly income and gets the future value with compound interest after 30 years. As it is now, I\'ve assigned some values
function FVcalc(PresentAmount,InterestRate,NumberOfYears) {
var timescompound = 1;
var AnnualInterestRate = (InterestRate/100)/timescompound;
var Years= NumberOfYears
var Periods=timescompound*Years;
var NumPayments=Periods;
var Prin=PresentAmount;
MonthPayment=Math.floor((Prin)*(Math.pow((1+AnnualInterestRate),(Periods)))*100)/100;
FVFactor=(Math.pow((1+AnnualInterestRate),(Periods)))
return MonthPayment
}
http://www.uic.edu/classes/actg/actg500/pfvatutor.htm