<html><head><title>Vehicle Loan EMI Calculator Script</title></head><body><div id="calculator"><div align='center'><h3>Vehicle Loan EMI Calculator Script</h3></div><table width="100%" border="0" cellpadding="0" cellspacing="4" ><tr><td colspan=2><table width=100% height=100%><tr><td><form name=first><table align=center border=0 cellpadding=1 cellspacing=1 id=emi_calc style='font-size:12px;'><tr><td>Amount (Vehicle Price) </td> <td> <input type=text id=lamt onkeyup=checnum(this); maxlength=9> </td> </tr><tr><td>Down Payment </td> <td> <input type=text id=dpay onkeyup=checnum(this); maxlength=9> </td> </tr><tr><td>Annual Interest Rate </td> <td> <input type=text id=inte onkeyup=checnum(this); maxlength=9> % </td> </tr><tr><td>Term/Period </td> <td> <input type=text id=term onkeyup=checnum(this); maxlength=9> months </td> </tr><tr><td colspan=2></td></tr><tr><td colspan=2 align=center><input type=button value='Calculate' onclick=loanemi_calc();><input type=button value='Reset' onclick="reset();"></td></tr><tr><td colspan=2 style="font-size:11px;" align="center" colspan='2' id='dumdiv'>©<a href="https://www.emexee.com" id="dum" style="color: #3D366F; font-size:11px; text-decoration:none;"></a></td></tr><tr><td>Monthly Payment </td> <td> <input type=text id=emi readonly> </td> </tr><tr><td>Total Interest Payment </td> <td> <input type=text id=tip readonly> </td> </tr><tr><td>Total Amount to Pay </td> <td> <input type=text id=tamt readonly> </td> </tr></table></form></table></div></body></html> <script type="text/javascript">function checnum(as){ var a = as.value; for(var x=0; x<a.length; x++) { var ff = a[x]; if(isNaN(a)) { a = a.substring(0,(a.length-1)); as.value = a; }} } function loanemi_calc() { var sds = document.getElementById("dum"); if(sds == null){ alert("You are using a free package. You are not allowed to remove the copyright. "); } var sdss = document.getElementById("dumdiv"); if(sdss == null){ alert("You are using a free package. You are not allowed to remove the copyright. "); } if(sdss != null) {var lamt = document.getElementById("lamt").value;var dpay = document.getElementById("dpay").value;var inte = document.getElementById("inte").value;var term = document.getElementById("term").value;if(lamt==""){alert("Enter Vehicle loan amount");document.getElementById("lamt").focus();}else if(inte==""){alert("Enter interest rate in percentage");document.getElementById("dpay").focus();}else if(term==""){alert("Enter term of loan payment");document.getElementById("inte").focus();}else{if(dpay==""){dpay = 0;document.getElementById("term").value=dpay;//$("#dpay").val(dpay);}lamt = parseFloat(lamt);dpay = parseFloat(dpay);inte = parseFloat(inte);term = parseFloat(term);if(dpay<=lamt){var p = lamt - dpay;var r = inte/1200;var part1 = Math.pow((1+r), term);var part2 = p * r * part1;var part3 = part1 - 1;var emi = Math.round(100 * (part2 / part3)) / 100;document.getElementById("emi").value=emi;var tamt = Math.round(100 * emi * term) / 100;document.getElementById("tamt").value=tamt;var tip = Math.round(100 * (tamt - p)) / 100;document.getElementById("tip").value=tip;}else{alert("Enter down payment less than the Auto loan amount");document.getElementById("dpay").value="";document.getElementById("dpay").focus();}} } } function reset() { document.getElementById("lamt").value="";document.getElementById("dpay").value="";document.getElementById("inte").value="";document.getElementById("term").value="";document.getElementById("emi").value="";document.getElementById("tip").value="";document.getElementById("tamt").value="" ; } </script>