FINANCE
SALARY Calculator
CTC to in-hand salary breakdown. PF, HRA, income tax (new regime 2024-25).
MONTHLY IN-HAND (APPROX.)
₹0
—
Annual In-Hand
—
Total Annual Deductions
EARNINGS
DEDUCTIONS
Developer Reference
Core Algorithm & Standalone Script
Standalone, zero-dependency JavaScript implementation powering this tool. Free to inspect, copy, and build upon.
function fmt(n) { return Math.round(n).toLocaleString('en-IN'); }
function fmtRs(n) { return '₹' + fmt(n); }
function calcTax(taxableIncome) {
// New Regime 2024-25 with standard deduction of 75000
const ti = Math.max(0, taxableIncome - 75000);
const slabs = [
[300000, 0], [400000, 0.05], [700000, 0.10], [1000000, 0.15], [1200000, 0.20], [1500000, 0.25], [Infinity, 0.30]
];
let tax = 0, prev = 0;
for (const [limit, rate] of slabs) {
if (ti <= prev) break;
const taxable = Math.min(ti, limit) - prev;
tax += taxable * rate;
prev = limit;
}
// Rebate u/s 87A: if taxable income <= 7L, no tax
if (ti <= 700000) tax = 0;
const cess = tax * 0.04;
return tax + cess;
}
function calc() {
const ctc = parseFloat(document.getElementById('inp-ctc').value) || 0;
const basic = ctc * 0.50;
const hra = basic * 0.50;
const epfEmployer = Math.min(basic * 0.12, 21600);
const specialAllowance = ctc - basic - hra - epfEmployer;
const epfEmployee = Math.min(basic * 0.12, 21600);
const profTax = 2400;
const taxableIncome = ctc - epfEmployer;
const incomeTax = calcTax(taxableIncome);
const totalDeductions = epfEmployee + profTax + incomeTax;
const annualInHand = ctc - epfEmployer - totalDeductions;
const monthlyInHand = annualInHand / 12;
document.getElementById('val-monthly').textContent = fmtRs(monthlyInHand);
document.getElementById('val-annual-inhand').textContent = fmtRs(annualInHand);
document.getElementById('val-total-deductions').textContent = fmtRs(totalDeductions);
document.getElementById('earnings-table').innerHTML = [
['Basic Salary', basic], ['HRA', hra], ['Special Allowance', specialAllowance], ['Employer PF', epfEmployer]
].map(([l, v]) => `<tr class="earning"><td>${l}</td><td>${fmtRs(v / 12)}/mo</td><td>${fmtRs(v)}/yr</td></tr>`).join('');
document.getElementById('deductions-table').innerHTML = [
['Employee PF', epfEmployee], ['Professional Tax', profTax], ['Income Tax (New Regime)', incomeTax]
].map(([l, v]) => `<tr class="deduction"><td>${l}</td><td>-${fmtRs(v / 12)}/mo</td><td>-${fmtRs(v)}/yr</td></tr>`).join('')
+ `<tr class="total"><td>Net In-Hand</td><td>${fmtRs(monthlyInHand)}/mo</td><td>${fmtRs(annualInHand)}/yr</td></tr>`;
}
document.getElementById('inp-ctc').addEventListener('input', calc);
calc();