emi calculator code for year and for month
<!DOCTYPE html> <html> <head> <title>EMI Calculator</title> <script> function calculateEMI() { var loanAmount = parseFloat(document.getElementById('loanAmount').value); var interestRate = parseFloat(document.getElementById('interestRate').value); var loanTenure = parseFloat(document.getElementById('loanTenure').value); var monthlyInterest = interestRate / (12 * 100); var totalMonths = loanTenure * 12; var emi = (loanAmount * monthlyInterest * Math.pow(1 + monthlyInterest, totalMonths)) / (Math.pow(1 + monthlyInterest, totalMonths) - 1); document.getElementById('emiResult').innerHTML = 'Monthly EMI: $' + emi.toFixed(2); } </script> </head> <body> ...