Mortgage calculator

function mort (){if((document.getElementById(‘principal’).value==null || document.getElementById(‘principal’).value.length==0) ||(document.getElementById(‘years’).value==null || document.getElementById(‘years’).value.length==0)|| (document.getElementById(‘rate’).value==null || document.getElementById(‘rate’).value.length==0)) {document.getElementById(‘inst’).value=document.getElementById(‘tinst’).value=”Data Reqd.”;}else {var inst=”; var princ=document.getElementById(‘principal’).value; var term=document.getElementById(‘years’).value * 12;var intr =document.getElementById(‘rate’).value/1200; var tax=document.getElementById(‘tax’).value; var tintt=””; var gt=”;document.getElementById(‘inst’).value=Math.round((princ * intr/(1-(Math.pow(1/(1+intr), term))))*100)/100;document.getElementById(‘mtax’).value=Math.round((tax/12 )*100)/100;document.getElementById(‘tinst’).value= Math.round((document.getElementById(‘inst’).value*1+document.getElementById(‘mtax’).value*1)*100)/100;}}
// Widget Code by http://widgetcodes.com/

#outer{width:300px;background:#fff;text-align:center;}
#cover{border:2px solid #111;border-radius:7px;box-shadow:inset 0 0 13px #888;padding:7px 0}
.main{table-layout:fixed;width:94%;border:0;border-collapse:collapse;margin:0 auto;}
.main td{padding:0 8px;vertical-align:middle;text-align:left;border:0;font:500 11px arial}
.main input{width:96%;border:1px solid #ccc;margin:2px 0;padding:0 2%;height:17px;text-align:right;font:500 11px arial}.ac{text-align:center}
.main select{width:100%;border:1px solid #ccc;margin:2px 0;background:#fff;height:18px;font:500 11px arial}.w50{width:50%}.main button{width:100%;font:600 12px arial;margin:2px 0;}

Mortgage Calculator

Principal Interest Rate Amortisation Taxes + Insurance Monthly Repayments Principal + Interest Taxes + Insurance Monthly Instalment

Leave a Reply

Your email address will not be published. Required fields are marked *