Skip to main content

Free Loan Calculator

100% Client-Side: Your data never leaves your browser. Zero server processing or data storage.

Loan & EMI Calculator

Quickly estimate your monthly payments, see the total interest payable, and view the visual breakdown and payment schedule of your loan details.

$
$5K $1M $2M
%
0.1% 12.5% 25%
1 Yr 15 Yr 30 Yr
Monthly EMI
$0.00
Total Pay $0
Principal: 0%
Interest: 0%
Principal Amount 0%
Total Interest Payable $0.00
Total Payment (P + I) $0.00
Year Beginning Balance Principal Paid Interest Paid Total Payment Remaining Balance

Frequently Asked Questions

Loan EMI (Equated Monthly Installment) is calculated using the standard mathematical formula: EMI = [P x r x (1+r)^n] / [(1+r)^n - 1]. Here, P represents the principal loan amount, r is the monthly interest rate (annual interest rate divided by 12 * 100), and n is the total number of monthly payments (tenure in months).

An amortization schedule is a complete table of periodic loan payments showing the split between principal and interest for each installment. At the beginning of the loan, most of the payment goes toward paying off the interest. Over time, as the principal balance decreases, a larger portion of each payment goes toward paying off the principal amount until the balance reaches zero.

Yes, absolutely. This calculator runs 100% client-side inside your web browser. No inputs, calculations, or financial data are sent to our servers. Your calculations are completely private, local, and secure.

; let scheduleYearly=[]; let scheduleMonthly=[]; let curTab='yearly'; function getCur(){ return curSym; } function fmt(n){ return getCur()+Number(n).toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2}); } function fmt0(n){ return getCur()+Math.round(n).toLocaleString(); } function updateCurrency(){ const sel=document.getElementById('currencySelect'); const custom=document.getElementById('customCurrency'); if(sel.value==='¤'){ custom.style.display='block'; curSym=custom.value||'¤'; } else { custom.style.display='none'; curSym=sel.value; } document.querySelectorAll('.currency-symbol').forEach(el=> el.textContent=curSym); calcLoan(); } function syncSlider(type){ if(type==='principal'){ const v=parseFloat(document.getElementById('loanPrincipal').value)||0; document.getElementById('loanPrincipalSlider').value=Math.min(2000000, Math.max(5000, v)); } else if(type==='interest'){ const v=parseFloat(document.getElementById('interestRate').value)||0; document.getElementById('interestRateSlider').value=Math.min(25, Math.max(0.1, v)); } else if(type==='tenure'){ const v=parseFloat(document.getElementById('loanTenure').value)||0; if(tenureUnit==='years') document.getElementById('loanTenureSlider').value=Math.min(30, Math.max(1, v)); else document.getElementById('loanTenureSlider').value=Math.min(360, Math.max(6, v)); } calcLoan(); } function syncInput(type){ if(type==='principal'){ const v=parseFloat(document.getElementById('loanPrincipalSlider').value)||0; document.getElementById('loanPrincipal').value=v; } else if(type==='interest'){ const v=parseFloat(document.getElementById('interestRateSlider').value)||0; document.getElementById('interestRate').value=v; } else if(type==='tenure'){ const v=parseFloat(document.getElementById('loanTenureSlider').value)||0; document.getElementById('loanTenure').value=v; } calcLoan(); } function setPresetInterest(v){ document.getElementById('interestRate').value=v; document.getElementById('interestRateSlider').value=v; calcLoan(); } function setPresetPrincipal(v){ document.getElementById('loanPrincipal').value=v; document.getElementById('loanPrincipalSlider').value=Math.min(2000000, v); calcLoan(); } function setTenureUnit(unit){ const curVal=parseFloat(document.getElementById('loanTenure').value)||15; tenureUnit=unit; document.getElementById('toggleYears').classList.toggle('active', unit==='years'); document.getElementById('toggleMonths').classList.toggle('active', unit==='months'); document.getElementById('toggleYears').setAttribute('aria-pressed', unit==='years'); document.getElementById('toggleMonths').setAttribute('aria-pressed', unit==='months'); const slider=document.getElementById('loanTenureSlider'); const minLabel=document.getElementById('tenureMinLabel'); const midLabel=document.getElementById('tenureMidLabel'); const maxLabel=document.getElementById('tenureMaxLabel'); if(unit==='years'){ let yearsVal=curVal>30? Math.round(curVal/12):curVal; if(yearsVal<1) yearsVal=1; if(yearsVal>30) yearsVal=30; slider.min=1; slider.max=30; slider.step=1; slider.value=yearsVal; document.getElementById('loanTenure').value=yearsVal; document.getElementById('loanTenure').min=1; document.getElementById('loanTenure').max=30; minLabel.textContent='1 Yr'; midLabel.textContent='15 Yr'; maxLabel.textContent='30 Yr'; renderTenurePresets([5,10,15,20,30], 'y'); } else { let monthsVal=curVal<35? curVal*12:curVal; if(monthsVal<6) monthsVal=6; if(monthsVal>360) monthsVal=360; slider.min=6; slider.max=360; slider.step=6; slider.value=monthsVal; document.getElementById('loanTenure').value=monthsVal; document.getElementById('loanTenure').min=6; document.getElementById('loanTenure').max=600; minLabel.textContent='6 Mo'; midLabel.textContent='180 Mo'; maxLabel.textContent='360 Mo'; renderTenurePresets([12,60,120,180,360], 'm'); } calcLoan(); } function renderPrincipalPresets(){ const c=document.getElementById('principalPresets'); if(!c) return; const vals=[50000,100000,250000,500000,1000000]; c.innerHTML=vals.map(v=>``).join(''); } function renderTenurePresets(vals, suffix){ const c=document.getElementById('tenurePresets'); if(!c) return; c.innerHTML=vals.map(v=>``).join(''); } function calcLoan(){ const P=parseFloat(document.getElementById('loanPrincipal').value)||0; const annual=parseFloat(document.getElementById('interestRate').value)||0; let tenureVal=parseFloat(document.getElementById('loanTenure').value)||0; const r=annual/100/12; const n= tenureUnit==='years'? Math.round(tenureVal*12) : Math.round(tenureVal); if(P<=0 || n<=0){ document.getElementById('emiValue').textContent=fmt(0); return; } let emi=0; if(r===0) emi=P/n; else emi=(P * r * Math.pow(1+r,n)) / (Math.pow(1+r,n)-1); const totalPay=emi*n; const totalInt=totalPay-P; const principalPct= totalPay>0? (P/totalPay*100):0; const interestPct=100-principalPct; document.getElementById('emiValue').textContent=fmt(emi); document.getElementById('principalPct').textContent=principalPct.toFixed(1)+'%'; document.getElementById('totalInterestVal').textContent=fmt(totalInt); document.getElementById('totalPaymentVal').textContent=fmt(totalPay); document.getElementById('legendPrincipalPct').textContent=principalPct.toFixed(1)+'%'; document.getElementById('legendInterestPct').textContent=interestPct.toFixed(1)+'%'; document.getElementById('chartCenterVal').textContent=fmt0(totalPay); // chart const circ=2*Math.PI*80; const princLen=circ*principalPct/100; const intLen=circ; document.getElementById('chartPrincipal').setAttribute('stroke-dasharray', princLen+' '+(circ-princLen)); document.getElementById('chartInterest').setAttribute('stroke-dasharray', circ+' 0'); document.getElementById('chartPrincipal').setAttribute('stroke-dashoffset','0'); // Schedule scheduleMonthly=[]; scheduleYearly=[]; let bal=P; let yearlyPrincipal=0, yearlyInterest=0, yearlyStartBal=P; for(let m=1;m<=n;m++){ const interestPortion=bal*r; const principalPortion=emi - interestPortion; const startBal=bal; bal-=principalPortion; if(bal<0.01) bal=0; scheduleMonthly.push({month:m, startBal:startBal, principal:principalPortion, interest:interestPortion, payment:emi, endBal:bal}); yearlyPrincipal+=principalPortion; yearlyInterest+=interestPortion; if(m%12===0 || m===n){ const yearNum=Math.ceil(m/12); scheduleYearly.push({year:yearNum, startBal:yearlyStartBal, principal:yearlyPrincipal, interest:yearlyInterest, payment:yearlyPrincipal+yearlyInterest, endBal:bal}); yearlyStartBal=bal; yearlyPrincipal=0; yearlyInterest=0; } } renderSchedule(); } function renderSchedule(){ const body=document.getElementById('scheduleBody'); const header=document.getElementById('periodHeader'); if(curTab==='yearly'){ header.textContent='Year'; body.innerHTML=scheduleYearly.map(row=>` ${row.year}${fmt(row.startBal)}${fmt(row.principal)}${fmt(row.interest)}${fmt(row.payment)}${fmt(row.endBal)} `).join(''); } else { header.textContent='Month'; body.innerHTML=scheduleMonthly.map(row=>` ${row.month}${fmt(row.startBal)}${fmt(row.principal)}${fmt(row.interest)}${fmt(row.payment)}${fmt(row.endBal)} `).join(''); } } function setTab(tab){ curTab=tab; document.getElementById('tabYearly').classList.toggle('active', tab==='yearly'); document.getElementById('tabMonthly').classList.toggle('active', tab==='monthly'); renderSchedule(); } function exportScheduleToCSV(){ const rows=curTab==='yearly'?scheduleYearly:scheduleMonthly; const header= curTab==='yearly' ? ['Year','Beginning Balance','Principal Paid','Interest Paid','Total Payment','Remaining Balance'] : ['Month','Beginning Balance','Principal Paid','Interest Paid','Total Payment','Remaining Balance']; let csv=header.join(',')+'\n'; rows.forEach(r=>{ const vals= curTab==='yearly' ? [r.year, r.startBal, r.principal, r.interest, r.payment, r.endBal] : [r.month, r.startBal, r.principal, r.interest, r.payment, r.endBal]; csv+=vals.map(v=> typeof v==='number'? v.toFixed(2):v).join(',')+'\n'; }); const blob=new Blob([csv],{type:'text/csv'}); const url=URL.createObjectURL(blob); const a=document.createElement('a'); a.href=url; a.download='loan-amortization-'+curTab+'.csv'; document.body.appendChild(a); a.click(); a.remove(); setTimeout(()=>URL.revokeObjectURL(url),1000); showToast('CSV downloaded'); } function toggleFaq(btn){ const item=btn.closest('.faq-item'); item.classList.toggle('open'); } // init renderPrincipalPresets(); renderTenurePresets([5,10,15,20,30],'y'); calcLoan(); } catch(e) { console.error('Unhandled tool exception:', e); }