CTC Calculator -New

.ctc-card{ max-width:650px; margin:auto; background:#ffffff; border-radius:14px; box-shadow:0 10px 25px rgba(0,0,0,0.1); padding:22px; font-family:'Segoe UI', Arial, sans-serif; } .ctc-card h2{ text-align:center; margin-bottom:22px; color:#0b3c5d; font-weight:800; } .ctc-table{ width:100%; border-collapse:collapse; } .ctc-table td{ padding:10px; border-bottom:1px solid #eee; font-size:15px; } .ctc-table td:first-child{ font-weight:700; color:#1f2d3d; } .ctc-table td:last-child{ text-align:right; font-weight:700; color:#1e7e34; } .ctc-table input{ width:100%; padding:7px 10px; border:1px solid #ccc; border-radius:6px; text-align:right; font-weight:700; color:#0b3c5d; } .highlight{ background:#f1f6fb; } .total{ background:#e8f5e9; font-size:17px; } .error{ color:#c82333; font-weight:800; } .success{ color:#1e7e34; font-weight:800; }

CTC Structure – New Wages Code (Nov 2025)

CTC
Basic 0
DA
HRA
Flexi Basket
Special Allowance 0
Gross 0
PF (12% of Basic) 0
ESIC (3.25% if Gross ≤ 21,001) 0
Gratuity (4.81% of Basic) 0
Bonus
Total CTC 0
function calcCTC(){ let ctc = Number(document.getElementById("ctc").value) || 0; let da = Number(document.getElementById("da").value) || 0; let hra = Number(document.getElementById("hra").value) || 0; let flexi = Number(document.getElementById("flexi").value) || 0; let bonus = Number(document.getElementById("bonus").value) || 0; let basic = (ctc * 0.50) - da; if (basic < 0) basic = 0; let pf = (basic <= 15000) ? basic * 0.12 : 1800; let gratuity = basic * 0.0481; let tempGross = basic + da + hra + flexi; let esicTemp = tempGross ctc && ctc > 0) { specialCell.innerHTML = "❌ Entered components exceed CTC"; document.getElementById("gross").innerText = "—"; document.getElementById("esic").innerText = "—"; document.getElementById("finalCTC").innerText = "—"; } else { let special = ctc - fixedTotal; if (special < 0) special = 0; let gross = tempGross + special; let esic = gross <= 21001 ? gross * 0.0325 : 0; let finalCTC = gross + pf + esic + gratuity + bonus; specialCell.innerHTML = "" + special.toFixed(2) + ""; document.getElementById("gross").innerText = gross.toFixed(2); document.getElementById("esic").innerText = esic.toFixed(2); document.getElementById("finalCTC").innerText = finalCTC.toFixed(2); } document.getElementById("basic").innerText = basic.toFixed(2); document.getElementById("pf").innerText = pf.toFixed(2); document.getElementById("gratuity").innerText = gratuity.toFixed(2); }