EMI Calculator
Use this calculator to estimate your Equated Monthly Installment (EMI) for a loan. EMI is a fixed amount that you pay to the lender every month on a specific date, for a fixed tenure, towards repayment of your loan amount and interest. After the loan tenure is completed, your loan is considered closed.
.calculator-container {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.calculator-container h2 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.calculator-form .form-group {
margin-bottom: 15px;
display: flex;
align-items: center;
}
.calculator-form label {
width: 180px;
display: inline-block;
margin-right: 10px;
font-weight: bold;
color: #555;
}
.calculator-form input[type="number"] {
flex-grow: 1;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Important for padding and border */
}
.calculator-form button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
width: 100%;
margin-top: 10px;
}
.calculator-form button:hover {
background-color: #45a049;
}
.calculator-result {
margin-top: 25px;
padding: 15px;
background-color: #f9f9f9;
border: 1px solid #eee;
border-radius: 4px;
}
.calculator-result h3 {
margin-top: 0;
color: #333;
border-bottom: 1px solid #ddd;
padding-bottom: 10px;
}
.calculator-result p {
margin-bottom: 8px;
color: #555;
}
.calculator-result p:last-child {
margin-bottom: 0;
}
function calculateEMI() {
var principal = parseFloat(document.getElementById("loanAmount").value);
var rate = parseFloat(document.getElementById("annualInterestRate").value);
var time = parseFloat(document.getElementById("loanTenure").value);
var resultDiv = document.getElementById("result");
var monthlyEMIElement = document.getElementById("monthlyEMI");
var totalInterestPayableElement = document.getElementById("totalInterestPayable");
var totalPaymentElement = document.getElementById("totalPayment");
// Clear previous results
monthlyEMIElement.textContent = "";
totalInterestPayableElement.textContent = "";
totalPaymentElement.textContent = "";
// Input validation
if (isNaN(principal) || isNaN(rate) || isNaN(time) || principal <= 0 || rate <= 0 || time <= 0) {
resultDiv.style.display = "block";
monthlyEMIElement.textContent = "Please enter valid positive numbers for all fields.";
return;
}
var monthlyRate = (rate / 12) / 100;
var numberOfMonths = time * 12;
// EMI calculation formula: EMI = P * r * (1 + r)^n / ((1 + r)^n – 1)
var emi = principal * monthlyRate * Math.pow(1 + monthlyRate, numberOfMonths) / (Math.pow(1 + monthlyRate, numberOfMonths) – 1);
var totalPayment = emi * numberOfMonths;
var totalInterest = totalPayment – principal;
monthlyEMIElement.textContent = "Your Monthly EMI: ₹" + emi.toFixed(2);
totalInterestPayableElement.textContent = "Total Interest Payable: ₹" + totalInterest.toFixed(2);
totalPaymentElement.textContent = "Total Payment (Principal + Interest): ₹" + totalPayment.toFixed(2);
resultDiv.style.display = "block";
}
Understanding EMI
An Equated Monthly Installment (EMI) is a fixed payment amount made by a borrower to a lender at a specified frequency—typically monthly—over the duration of a loan. EMIs are calculated based on the principal loan amount, the interest rate, and the loan tenure. The EMI amount remains constant throughout the loan tenure, ensuring predictability for the borrower. Each EMI payment consists of two components: a portion of the principal amount and a portion of the interest charged by the lender. Initially, a larger part of the EMI goes towards paying the interest, and as the loan tenure progresses, the principal component increases.
Key Components of EMI Calculation:
- Principal Loan Amount (P): This is the initial amount of money borrowed from the lender.
- Annual Interest Rate (R): This is the yearly rate at which interest is charged on the loan. For EMI calculation, this rate is converted to a monthly rate.
- Loan Tenure (T): This is the total duration for which the loan is taken, usually expressed in years. For EMI calculation, this tenure is converted into months.
The Formula:
The standard formula used to calculate EMI is:
EMI = P × r × (1 + r)^n / ((1 + r)^n – 1)
Where:
P is the Principal Loan Amount
r is the monthly interest rate (Annual Rate / 12 / 100)
n is the loan tenure in months (Loan Tenure in Years × 12)
Why is an EMI Calculator Useful?
An EMI calculator simplifies the complex loan repayment calculation process. It allows borrowers to:
- Estimate their monthly financial commitment before taking a loan.
- Compare different loan offers with varying interest rates and tenures.
- Determine the total cost of borrowing (principal + total interest).
- Plan their finances effectively by understanding their repayment schedule.
For example, if you borrow ₹10,00,000 (Principal) at an annual interest rate of 8.5% for a tenure of 10 years, the EMI would be approximately ₹12,747.53. Over the 10 years (120 months), your total payment would be around ₹15,29,703.60, with the total interest paid being approximately ₹5,29,703.60. This calculator helps you explore various scenarios to find a loan that best fits your budget.