Calculation of solubility constant