Estimate gratuity payable as per tenure.
PAISAPEDIA
PaisaPedia
Results
Gratuity and tax computation are based on current statutory provisions. Actual tax may vary depending on total income and amendments. For educational purposes only.
function val(id){return parseFloat(document.getElementById(id).value)||0} function round(x){return Math.round(x)}
function slabTaxNew(income){ let slabs=[ {prev:0,limit:400000,rate:0}, {prev:400000,limit:800000,rate:.05}, {prev:800000,limit:1200000,rate:.10}, {prev:1200000,limit:1600000,rate:.15}, {prev:1600000,limit:2000000,rate:.20}, {prev:2000000,limit:2400000,rate:.25}, {prev:2400000,limit:Infinity,rate:.30} ] let tax=0 for(let s of slabs){ if(income>s.limit) tax+=(s.limit-s.prev)*s.rate else{tax+=(income-s.prev)*s.rate;break} } if(income<=1200000){ tax -= Math.min(tax,60000) } return tax<0?0:tax } function calculate(){ let type=document.getElementById("empType").value let salary=val("salary") let years=val("years") let months=val("months") let actualReceived=val("actualReceived") let otherIncome=val("otherIncome") /* 6-month rounding rule */ if(type==="covered" && months>6) years+=1
let calculatedGratuity=0
if(type==="govt"){ calculatedGratuity=salary*15*years/26 } else if(type==="covered"){ calculatedGratuity=salary*15*years/26 } else{ calculatedGratuity=salary*15*years/30 }
/* Override if actual received entered */ let gratuityReceived = actualReceived>0 ? actualReceived : calculatedGratuity
let exemption=0
if(type==="govt"){ exemption=gratuityReceived } else if(type==="covered"){ let formula=salary*15*years/26 exemption=Math.min(2000000, gratuityReceived, formula) } else{ let formula=salary*15*years/30 exemption=Math.min(2000000, gratuityReceived, formula) }
let taxable=Math.max(0, gratuityReceived-exemption)
/* Tax Calculation (New Regime Default) */ let totalIncome=otherIncome+taxable let tax=slabTaxNew(totalIncome) let finalTax=round(tax*1.04)
document.getElementById("resultBlock").innerHTML=
`
Calculated Gratuity: ₹${round(calculatedGratuity).toLocaleString()}
Gratuity Considered: ₹${round(gratuityReceived).toLocaleString()}
Exempt Amount: ₹${round(exemption).toLocaleString()}
Taxable Gratuity: ₹${round(taxable).toLocaleString()}
Total Tax (incl. 4% cess): ₹${finalTax.toLocaleString()}
Detailed Breakdown
Salary Used: ₹${salary.toLocaleString()}
Years Counted: ${years}
Other Income: ₹${otherIncome.toLocaleString()}
Total Taxable Income: ₹${round(totalIncome).toLocaleString()}
`
let message= `Hi PaisaPedia, Gratuity Received: ₹${round(gratuityReceived)} Taxable Portion: ₹${round(taxable)} Tax Payable: ₹${finalTax}
Client Source: PaisaPedia`
document.getElementById("waLink").href= "https://wa.me/918059635006?text="+encodeURIComponent(message)
}
document.querySelectorAll(".ppInput, select").forEach(e=>e.addEventListener("input",calculate)) calculate()
