Home EMI Calculator
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f8f9fa;
color: #333;
line-height: 1.6;
margin: 0;
padding: 20px;
}
.loan-calc-container {
max-width: 800px;
margin: 30px auto;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 74, 153, 0.1);
padding: 30px;
border: 1px solid #e0e0e0;
}
h1 {
color: #004a99;
text-align: center;
margin-bottom: 30px;
font-size: 2.2em;
}
.input-group {
margin-bottom: 20px;
display: flex;
flex-direction: column;
align-items: flex-start;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #004a99;
}
.input-group input[type="number"],
.input-group input[type="text"],
.input-group select {
width: calc(100% – 20px);
padding: 12px 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1em;
box-sizing: border-box;
margin-top: 5px;
}
.input-group input:focus,
.input-group select:focus {
border-color: #004a99;
outline: none;
box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2);
}
button {
display: block;
width: 100%;
padding: 12px 15px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
font-size: 1.1em;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s ease;
margin-top: 20px;
}
button:hover {
background-color: #218838;
}
.result-section {
margin-top: 30px;
padding: 25px;
background-color: #e7f3ff;
border-left: 5px solid #004a99;
border-radius: 4px;
}
.result-section h2 {
color: #004a99;
margin-top: 0;
font-size: 1.8em;
}
#emiResult, #totalInterest, #totalPayment {
font-size: 2em;
font-weight: bold;
color: #004a99;
display: block;
margin-top: 10px;
}
.article-section {
margin-top: 50px;
padding: 30px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 74, 153, 0.05);
border: 1px solid #e0e0e0;
}
.article-section h2 {
color: #004a99;
margin-top: 0;
font-size: 1.8em;
border-bottom: 2px solid #004a99;
padding-bottom: 10px;
margin-bottom: 20px;
}
.article-section p, .article-section ul, .article-section li {
margin-bottom: 15px;
color: #555;
}
.article-section strong {
color: #004a99;
}
@media (max-width: 600px) {
.loan-calc-container {
padding: 20px;
}
h1 {
font-size: 1.8em;
}
.result-section h2, .article-section h2 {
font-size: 1.5em;
}
#emiResult, #totalInterest, #totalPayment {
font-size: 1.6em;
}
}
Home EMI Calculator
Calculate EMI
Your EMI Details
Monthly EMI:
—
Total Interest Payable:
—
Total Payment (Loan Amount + Interest):
—
Understanding Your Home Loan EMI
An Equated Monthly Installment (EMI) is a fixed amount paid by a borrower to a lender at a specified date each month. EMIs are used for home loans, car loans, personal loans, and other repayable financial instruments. For a home loan, the EMI comprises both the principal component and the interest component, which decreases over the loan tenure.
How is Home Loan EMI Calculated?
The formula used to calculate the EMI for a home loan is as follows:
EMI = [P x R x (1+R)^N] / [(1+R)^N – 1]
Where:
P = Principal Loan Amount (the total amount borrowed)
R = Monthly Interest Rate (Annual Interest Rate / 12 / 100)
N = Loan Tenure in Months (Loan Tenure in Years * 12)
Example Calculation:
Let's consider a home loan with the following details:
Loan Amount (P) = ₹ 50,00,000
Annual Interest Rate = 8.5%
Loan Tenure = 20 Years
First, we calculate the monthly interest rate (R) and the loan tenure in months (N):
Monthly Interest Rate (R) = (8.5 / 12) / 100 = 0.00708333
Loan Tenure in Months (N) = 20 * 12 = 240 months
Now, plugging these values into the EMI formula:
EMI = [50,00,000 x 0.00708333 x (1 + 0.00708333)^240] / [(1 + 0.00708333)^240 – 1]
Calculating (1 + R)^N: (1.00708333)^240 ≈ 5.2655
EMI = [50,00,000 x 0.00708333 x 5.2655] / [5.2655 – 1]
EMI = [186666.56] / [4.2655]
EMI ≈ ₹ 43,772
Total Interest Payable = (EMI * N) – P
Total Interest Payable = (43,772 * 240) – 50,00,000 = ₹ 1,05,05,280 – ₹ 50,00,000 = ₹ 55,05,280
Total Payment = EMI * N
Total Payment = 43,772 * 240 = ₹ 1,05,05,280
This calculator helps you estimate your monthly outgoings and the total cost of your home loan, enabling better financial planning.
function calculateEMI() {
var principal = parseFloat(document.getElementById("loanAmount").value);
var annualRate = parseFloat(document.getElementById("interestRate").value);
var tenureYears = parseFloat(document.getElementById("loanTenure").value);
var errorMsgDiv = document.getElementById("errorMessage");
var resultsDiv = document.getElementById("results");
errorMsgDiv.innerText = ""; // Clear previous error messages
resultsDiv.style.display = 'none'; // Hide results
if (isNaN(principal) || principal <= 0) {
errorMsgDiv.innerText = "Please enter a valid loan amount.";
return;
}
if (isNaN(annualRate) || annualRate <= 0) {
errorMsgDiv.innerText = "Please enter a valid annual interest rate.";
return;
}
if (isNaN(tenureYears) || tenureYears 0) {
emi = principal * monthlyRate * Math.pow(1 + monthlyRate, tenureMonths) / (Math.pow(1 + monthlyRate, tenureMonths) – 1);
} else {
// If interest rate is 0, EMI is simply principal divided by tenure
emi = principal / tenureMonths;
}
var totalInterest = (emi * tenureMonths) – principal;
var totalPayment = emi * tenureMonths;
document.getElementById("emiResult").innerText = "₹ " + emi.toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
document.getElementById("totalInterest").innerText = "₹ " + totalInterest.toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
document.getElementById("totalPayment").innerText = "₹ " + totalPayment.toFixed(0).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
resultsDiv.style.display = 'block'; // Show results
}