I have the following fields:
*Age
*Salary
*Employee Contribution ( % of salary, depending on age )
*Employer Contribution ( % of salary, depending on age )
*Date of Birth

I need to make the Employee/Employer Contribution fields auto-calculate the amount, and the amount of contribution varies for different age groups and different salaries.

Age groups:
* Below 35
* 35-49


* 50-54
* 55-59
* 60-64
* 65 and above

Salary Groups:
* Exceeding 50, Not exceeding 500
* Exceeding 500, Not exceeding 750
* Exceeding 750, Not exceeding 1200
* Exceeding 1200, Not exceeding 1500
* Exceeding 1500

So, for example, I have a worker who is 40 years of age and receiving a salary of 1400, I want the field to auto calculate by auto changing contribution rates in accordance to his/her age group/salary.

eg:
IF AGE<=35,
then the system follows a certain set of salary calculations as the amount contributed varies from each age group.

Can anyone tell me how I could go about doing this?