The electronic structure, the charge-density distribution, and the optical-absorption spectrum of a CaF2 crystal are studied by means of a first-principles local-density calculation. The calculated imaginary part of the dielectric function is in good agreement with experimental measurement up to 27.0 eV. We have also used a simplified self-interaction-correction (SIC) model to address the problem of band-gap underestimation in the local-density calculation. Although some marginal improvement in the optical result has been achieved, there is no strong evidence of unequivocal rectification other than an increment in the band gap. This study shows additional (non-SIC) correction to the conduction-band states of CaF2 may also be necessary. © 1992 The American Physical Society.