formation energy?

Hi,

I want to calculate formation energy with the formula in the attachment but I dont know what is chemical potential and how can I calculate chemical potential?