<% Dim P 'Payment Dim I 'Interest Dim L 'Loan Term In Years Dim J Dim N Dim M Dim H Dim C Dim Q Dim X 'Set the Conter for the Ammoritization X=0 'Hard Code Some Loan Values HERE 'Replace these with your variables 'Total of Loan Amount P=100000 'Interest Rate I=7 'Loan term in years L=30 'Calculate Monthly Interest J=I/(12 * 100) 'Length of loan in Months N=L * 12 'Now the magic..... M = P * ( J / (1 - (1 + J) ^ -N)) Response.Write "Monthly Payment: " & Round(M, 2) & "
" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" 'Loop through And Get the Monthly Paymen ' ts for the length of the loan Do While X < N H=P*J Response.Write "" C=M-H Response.Write "" Q=P-C Response.Write "" P=Q X=X+1 Loop %>
Interest PaidPrincipal PaidRemaing Balance
" & Round(H, 2) & "" & Round(C, 2) & "" & Round(Q, 2) & "