I use this code to calculate out a monthly payment for home loans.
 
Given the Loan Amount, Interest Rate, and Term in years, it will return the monthly payment (Principal + Interest).
 
HTH
 
Marlon
 
 
 
function CalculateIt(LoanAmount, InterestRate,Years) {
 
 MonthlyInterestRate = (InterestRate / 100) /12;
 var Multiplier = 1 + MonthlyInterestRate;
 var TermRate = 1;
 for (var x=0;x<(Years*12);x++) {
  TermRate = TermRate * Multiplier;
 }
 var PrincipalInterest = (LoanAmount * MonthlyInterestRate) / (1 - (1/TermRate));
 PrincipalInterest = Math.floor(PrincipalInterest * 100) / 100;
 return PrincipalInterest;
}
 
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
Sent: Thursday, September 12, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: General Question

Does anyone have a good payment plan code snippet they would like to share?  If possible a 30 year payment plan?

Thanks in advance
Your Island_girl

Reply via email to