The solubility of two ionic salts, namely, KF and NaCl, in water has been calculated by Monte Carlo molecular simulation. Water has been modeled with the extended simple point charge model (SPC/E), ions with the Tosi-Fumi model and the interaction between water and ions with the Smith-Dang model. The chemical potential of the solute in the solution has been computed as the derivative of the total free energy with respect to the number of solute particles. The chemical potential of the solute in the solid phase has been calculated by thermodynamic integration to an Einstein crystal. The solubility of the salt has been calculated as the concentration at which the chemical potential of the salt in the solution becomes identical to that of the pure solid. The methodology used in this work has been tested by reproducing the results for the solubility of KF determined previously by Ferrario et al. [J. Chem. Phys. 117, 4947 (2002)]. For KF, it was found that the solubility of the model is only in qualitative agreement with experiment. The variation of the solubility with temperature for KF has also been studied. For NaCl, the potential model used predicts a solubility in good agreement with the experimental value. The same is true for the hydration chemical potential at infinite dilution. Given the practical importance of solutions of NaCl in water the model used in this work, whereas simple, can be of interest for future studies.