How gratuity is calculated
Gratuity is a lump sum your employer pays when you leave after long enough service, as a thank-you for the years you put in. For an employer covered by the gratuity law, it's 15 days' wages for every year of service, with a month taken as 26 working days:
Gratuity = monthly wages × 15 × years of service ÷ 26
So someone whose last basic + DA was ₹50,000 a month and who served 7 years 7 months gets ₹50,000 × 15 × 8 ÷ 26 = ₹2,30,769. The 7 months count as a full year because they're more than six months. With 7 years 5 months, only 7 years would count.
Employers not covered by the law don't have to pay gratuity, but many do under their own policy. The usual basis is half a month's wages for each completed year (wages × 15 × years ÷ 30), with part-years left out.