Coding India's Gratuity Rules: 26, the Six-Month Trap and the 50% Wage Clause
A few months ago I wrote about modelling India's tax slabs without cliff-edge bugs . Gratuity looked easier after that. It's one line of maths: const gratuity = ( wages * 15 * years ) / 26 ; That line is correct. The bugs live in its inputs. Below are the three edge cases I had to handle when building a gratuity calculator in Next.js, and the code that handles each one. Edge case 1: the divisor…
India's gratuity rules can be tricky to navigate, with edge cases that require careful handling. Gratuity is calculated as 15 days' wage multiplied by the number of years of service, divided by 26. This calculation is based on a Supreme Court ruling from 1980 that treats a month as 26 working days. However, the divisor changes depending on the size of the employer. For companies with ten or more employees, the divisor is 26, while smaller employers calculate it as half a month's average salary per completed year, or 15/30.
Another edge case is when an employee has served more than six months. Section 53(2) of the Code on Social Security stipulates that gratuity is paid for every completed year of service, or part thereof in excess of six months. For example, an employee with 7 years and 7 months of service is eligible for 8 years' gratuity, while one with 7 years and 6 months is entitled to 7 years.
The salary used in gratuity calculations may not include all components of remuneration, such as HRA, conveyance allowance, overtime, commission, bonus, and employer's PF contribution. Under Section 2(88) of the Code on Social Security, wages for gratuity are calculated by excluding these items. However, if the excluded items exceed half of the total remuneration, the excess amount is added back to the wages before gratuity calculation.
In summary, India's gratuity rules involve careful consideration of various factors, including employer size, service duration, and the composition of an employee's salary. By understanding and implementing these rules, employers can ensure compliance and provide fair compensation to their employees.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.