The effect of the free electron background in plasmas is introduced in HartreeFockSlater selfconsistent field atomic model to correct the single electron energies for each electron configuration, and to provide accurate atomic data for BoltzmannSaha equation. In the iteration process chemical potential is adjusted to change the free electron background to satisfy simultaneously the conservation of the free electrons in Saha equation as well as in HartreeFockSlater selfconsistent field atomic model. As examples the equations of state of the carbon and aluminum plasmas are calculated to show the applicability of this method.