Gratuity is a financial payment made to an employee by an employer in recognition of their service, typically upon retirement or termination of employment after a certain period of service. It is often calculated based on the employee's salary and years of service. In some countries, gratuity is mandated by law, while in others it may be a part of the employment contract or company policy. The purpose is to reward loyalty and provide financial support to employees transitioning out of the workforce.