How to sum the salary components amount in a custom field

I have created a custom field Fixed Amount on salary structure form. I have set values in salary components i.e. Basic (B)= 4000, HRA (HRA) = 1000, Allowance (A)= 1000. There field names are mentioned bracket. I want sum of these three values in Fixed Amount i.e. 6000.