My Tax Calculator

Income Tax Calculator – India body { font-family: Arial, sans-serif; margin: 20px; padding: 20px; } .container { max-width: 400px; margin: auto; padding: 20px; border: 1px solid #ddd; border-radius: 10px; box-shadow: 2px 2px 10px #ccc; } input, select, button { width: 100%; padding: 10px; margin-top: 10px; } button { background-color: #007bff; color: white; border: none; cursor: pointer; } button:hover { background-color: #0056b3; }

Income Tax Calculator – India

Enter Annual Income (₹): Select Tax Regime: New Regime Old Regime Calculate Tax

Total Tax: ₹0

function calculateTax() { let income = parseFloat(document.getElementById(“income”).value); let regime = document.getElementById(“taxRegime”).value; let tax = 0; if (isNaN(income) || income < 0) { alert("Please enter a valid income amount"); return; } if (regime === "new") { if (income <= 250000) tax = 0; else if (income <= 500000) tax = (income – 250000) * 0.05; else if (income <= 750000) tax = 12500 + (income – 500000) * 0.10; else if (income <= 1000000) tax = 37500 + (income – 750000) * 0.15; else if (income <= 1250000) tax = 75000 + (income – 1000000) * 0.20; else if (income <= 1500000) tax = 125000 + (income – 1250000) * 0.25; else tax = 187500 + (income – 1500000) * 0.30; } else { if (income <= 250000) tax = 0; else if (income <= 500000) tax = (income – 250000) * 0.05; else if (income <= 1000000) tax = 12500 + (income – 500000) * 0.20; else tax = 112500 + (income – 1000000) * 0.30; } document.getElementById("result").innerText = `Total Tax: ₹${tax.toFixed(2)}`; }