Calculate EPF (KWSP) contributions
calculate_epfCalculates monthly EPF (KWSP) employee and employer contributions for one employee in Malaysia from fixed monthly salary, using the applicable Third Schedule band by age and citizenship.
Instructions
Works out the monthly EPF (KWSP) employee and employer contributions for one employee in Malaysia, from the EPF Third Schedule in effect for the pay period, and cites the band used. Fixed monthly salaries only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | Yes | The employee's age in whole years. | |
| payPeriod | No | The calendar month the salary is paid for, as YYYY-MM. It decides which rate tables apply. Defaults to the current month in Malaysia. | |
| citizenship | Yes | malaysian, permanent_resident, or non_malaysian (a foreign worker without PR). | |
| monthlySalary | Yes | Monthly salary in RM, at most 2 decimal places: basic pay plus fixed allowances. Excludes overtime, commission, bonuses and arrears. | |
| registeredWithEpfBefore1Aug1998 | No | Only for non_malaysian: true if the employee registered with EPF before 1 Aug 1998, which puts them on the Malaysian rates. Defaults to false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | The EPF Third Schedule part applied. | |
| total | Yes | RM | |
| employee | Yes | RM, deducted from pay. | |
| employer | Yes | RM, paid on top of pay. | |
| citations | Yes | ||
| payPeriod | Yes | ||
| disclaimer | Yes | ||
| explanation | Yes | ||
| monthlySalary | Yes |