WeBlogy

HELOC Payment Calculator

"}function fval(t,e,r,a){var d=0,o=0;if(0==r)o=1*t/e*1;else{d=1*r/100/a*1;for(var n=1,i=0;1*e>i;i++)n*=1+1*d;o=t*n*d/(1*n-1)}return o}function calculate(){resultBlock.removeClass(hiddenClass);var t=parseFloat(document.getElementById("MortgLoanAmount").value).toFixed(2);if(isNaN(t)||0>t)return alert("Error"),!1;var e=parseFloat(document.getElementById("MortgInterestRate").value).toFixed(2);if(isNaN(e)||0>e)return alert("Error"),!1;var r=parseInt(document.getElementById("MortgMonths").value).toFixed(2);if(isNaN(r)||0>=r)return alert("Error"),!1;var a=parseInt(document.getElementById("IntOnly").value).toFixed(2);if(isNaN(a)||0>=a)return alert("Error"),!1;var d=12*r,o=12*a,n=fval(t,d,e,12),i=document.getElementById("inf");i.innerHTML="Monthly Principal & Interest Payment: "+c3(n.toFixed(2))+"";var s=Math.round(100*parseFloat(t*e/1200))/100,l=document.getElementById("infi");l.innerHTML="Monthly Interest Only Payment: "+c3(s.toFixed(2))+"";var h=Number(document.getElementById("month").value),c=Number(document.getElementById("year").value),u=t,p=0,m=0,F=0,y=0,x=e/1200,v=0,b=Math.round(100*parseFloat(n))/100,g=0,f=0,w=0,M="class='odd'",I="

";I+="",I+="",I+="Amortization Schedule",I+="",I+="",I+="No.",I+="Date",I+="Payment",I+="Interest",I+="Principal",I+="Balance",I+="";for(var E=1;o>=E;E++){M=E%2==0?"class='odd'":"";var N=mthname[h]+" "+c;b=Math.round(100*parseFloat(t*e/1200))/100,p=b,m=0,u=t,F+=p,f+=b,v+=b,g+=p,I+="",I+=""+E+"",I+=""+N+"",I+=""+c3(b)+"",I+=""+c3(p)+"",I+=""+c3(m)+"",I+=""+c3(u)+"",I+="",h+=1,h>11&&(f=0,g=0,w=0,c+=1,h-=12)}I+="",I+="Total:",I+=""+c3(1*v.toFixed(2))+"",I+=""+c3(1*F.toFixed(2))+"",I+=""+c3(1*y.toFixed(2))+"",I+=""+c3(u)+"",I+="",I+="",I+="No.",I+="Date",I+="Payment",I+="Interest",I+="Principal",I+="Balance",I+="";for(var u=t,p=0,m=0,F=0,y=0,x=e/1200,v=0,b=Math.round(100*parseFloat(n))/100,g=0,f=0,w=0,B=1;d>=B;B++){M=B%2==0?"class='odd'":"";var N=mthname[h]+" "+c;d>B?(p=Math.round(u*x*100)/100,m=1*(b-p).toFixed(2),u=1*(u-m).toFixed(2),v+=b):(p=Math.round(u*x*100)/100,b=1*(u+p).toFixed(2),m=u,v+=b,u=0),w+=m,f+=b,g+=p,F+=p,y+=m,I+="",I+=""+Number(B+E-1)+"",I+=""+N+"",I+=""+c3(b)+"",I+=""+c3(p)+"",I+=""+c3(m)+"",I+=""+c3(u)+"",I+="",h+=1,h>11&&(f=0,g=0,w=0,c+=1,h-=12)}I+="",I+="Total:",I+=""+c3(1*v.toFixed(2))+"",I+=""+c3(1*F.toFixed(2))+"",I+=""+c3(1*y.toFixed(2))+"",I+=""+c3(u)+"",I+="",I+="",I+="

",document.getElementById("ReShed").innerHTML=I;var A={},T={},P={},S=0,H=[],k=[],z=[],C=e/100,O=12*a,j=12*r,L=[],D=t*C/12,Q=0;S=Math.pow(1+C/12,j),Q=C>0?t*(C/12*S/(S-1)):t/j;var R=t,J=0,W=C,Y=0,q=0,G=0,K=0,U=0;R=-t,H.push(parseFloat(0)),k.push(parseFloat(0)),z.push(parseFloat(R.toFixed(2)));for(var E=1;O+1>E;E++)G=-R*W/12,K=0,Y+=G,D=G,q+=K,J=R,U+=1,12==U&&(H.push(parseFloat(Y.toFixed(2))),k.push(parseFloat(q.toFixed(2))),z.push(parseFloat(J.toFixed(2))),Y=0,q=0,U=0);for(var B=1;j+1>B;B++)G=-R*W/12,K=Q-G,q+=K,Y+=G,J=R-G+Q,U+=1,12==U?(H.push(parseFloat(Y.toFixed(2))),k.push(parseFloat(q.toFixed(2))),z.push(parseFloat(J.toFixed(2))),Y=0,q=0,U=0):B==j&&(H.push(parseFloat(Y.toFixed(2))),k.push(parseFloat(q.toFixed(2))),z.push(parseFloat(J.toFixed(2)))),R=J;A.name="Interest",T.name="Principal",P.name="Balance",A.data=H,T.data=k,P.data=z,L.push(A),L.push(T),L.push(P),Highcharts.visualize=function(t){t.xAxis.categories=[],Highcharts.setOptions({colors:["#b11116","#008000","#1991d0"]}),t.series=[],t.series=L;new Highcharts.Chart(t)},$(document).ready(function(){options={chart:{renderTo:"ct-chart",defaultSeriesType:"column"},credits:{enabled:!1},title:{text:"HELOC Payoff Schedule",style:{fontSize:"14px"}},xAxis:{min:1,title:{text:"Year"}},yAxis:{title:{text:"Amount, $"}},legend:{align:"center",borderWidth:0},tooltip:{formatter:function(){return"Year "+this.x+"
"+this.series.name+"
$"+this.y.formatCurr(2,",",".")}},responsive:{rules:[{condition:{maxWidth:250},chartOptions:{legend:{align:"center",verticalAlign:"bottom",layout:"horizontal"},yAxis:{labels:{align:"left",x:0,y:-5},title:{text:null}},subtitle:{text:null},credits:{enabled:!1}}}]},plotOptions:{column:{stacking:"normal",pointPadding:0}}},Highcharts.visualize(options)})}Number.prototype.formatCurr=function(t,e,r){var a=this,t=isNaN(t=Math.abs(t))?2:t,r=void 0==r?".":r,e=void 0==e?",":e,d=0>a?"-":"",o=parseInt(a=Math.abs(+a||0).toFixed(t))+"",n=(n=o.length)>3?n%3:0;return d+(n?o.substr(0,n)+e:"")+o.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+e)+(t?r+Math.abs(a-o).toFixed(t).slice(2):"")};var hiddenClass="hidden",resultBlock=$(".resultBlock"),mthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");jQuery(document).ready(function(){jQuery(window).resize(function(){var t=jQuery("#ct-chart").highcharts(),e=jQuery("#ct-chart").closest(".wraper").width();t.setSize(e,.75*e,!1)}),calculate()});

ncG1vNJzZmifn6SxpK3LnKylmaSkv7R6wqikaKCVobykec%2BasKadnql6pK3LnKylmaSkv3A%3D

Martina Birk

Update: 2023-03-05