The crystal structures and energies of the quartz, stishovite and CaCl2 phases of silica were calculated as a function of pressure with the polarization-included electron gas (PEG) model. The calculated structures are in good agreement with experiment throughout the pressure range in which experimental results exist. The calculated pressure of the quartz to stishovite phase transition is about 3.5 GPa, as compared to an experimental value of 5.5 GPa. The calculated pressure of the stishovite to CaCl2 structure phase transition is slightly less than 200 GPa, higher than the value suggested by experiments of about 100 GPa. The compressibility of quartz, the quartz to stishovite transition pressure, and the stishovite to CaCl2 structure transition pressure are all calculated more accurately with the PEG model, which allows the ions to distort from spherical symmetry, than with the modified electron gas model, which constrains the ions to be spherical.