Interest Calculator

function interest(){var principal=document.getElementById(‘principal’).value;var rate=document.getElementById(‘rate’).value;var time=document.getElementById(‘time’).value;var itype=document.getElementById(‘itype’).value;var crate=document.getElementById(‘crate’).value;var time=document.getElementById(‘time’).value;var irate=rate/crate;var inttamt=document.getElementById(‘inttamt’).value;var decimal=2;if( itype==’c’ ){document.getElementById(‘inttamt’).value=Math.round((document.getElementById(‘principal’).value * Math.pow((1+irate/100),(time/12*crate))*1-principal*1 ) *100)/100;}if(itype==’s’ ){document.getElementById(‘inttamt’).value=Math.round(((document.getElementById(‘principal’).value * rate * time/12)/100)*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}
.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;}

Interest Calculator

Principal Amount

Interest Rate

Interest Type

SimpleCompound

Compounding Frequency

MonthlyQuarterlyHalf-yearlyYearly

Period (months)

Interest Amount

Leave a Reply

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