Home Loan Emi Calculator with Emi

Home Loan EMI Calculator with EMI Breakdown

Estimate your home loan EMI (Equated Monthly Installment) based on your loan amount, interest rate, and tenure.

EMI Breakdown

Total Loan Amount:

Interest Rate: %

Loan Tenure: Years

Monthly EMI:

function calculateEmi() { const loanAmount = parseFloat(document.getElementById(“loanAmount”).value); const interestRate = parseFloat(document.getElementById(“interestRate”).value) / 100 / 12; const loanTenure = parseInt(document.getElementById(“loanTenure”).value) * 12; if (isNaN(loanAmount) || isNaN(interestRate) || isNaN(loanTenure) || loanAmount <= 0 || interestRate <= 0 || loanTenure <= 0) { alert("Please fill all fields correctly."); return; } const emi = (loanAmount * interestRate * Math.pow(1 + interestRate, loanTenure)) / (Math.pow(1 + interestRate, loanTenure) – 1); const totalAmount = emi * loanTenure; const totalInterest = totalAmount – loanAmount; document.getElementById("emiBreakdown").style.display = "block"; document.getElementById("emiAmount").textContent = emi.toFixed(2); document.getElementById("totalLoanAmount").textContent = loanAmount.toFixed(2); document.getElementById("emiInterestRate").textContent = (interestRate * 12 * 100).toFixed(2); document.getElementById("emiLoanTenure").textContent = (loanTenure / 12); alert("Your EMI has been calculated successfully!"); }

Leave a Reply

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