% dim monthlyPayment dim principal dim annualInterest dim monthlyInterest dim loan_Months dim loan_Years dim current_monthly_interest dim monthly_principal dim new_principal dim piti dim base dim mbase dim annualTax dim annualInsurance principal = Request.Form("principal") annualInterest = Request.Form("annualInterest") loan_Years = Request.Form("loan_Years") annualTax = Request.Form("annualTax") annualInsurance = Request.Form("annualInsurance") if principal > 0 then loan_Months = loan_Years * 12 monthlyInterest = annualInterest / (12*100) base = 1 mbase = 1 + monthlyInterest For i = 0 to loan_Months base = base * mbase Next monthlyPayment = principal * (monthlyInterest / (1 - (1 + monthlyInterest)^ -loan_Months)) If Request.Form("annualTax") <> "" AND Request.Form("annualInsurance") <> "" Then piti = principal * monthlyInterest / (1-(1/base)) + (annualTax/12) + (annualInsurance/12) Else piti = 0 End IF end if %>