For many decades optical interferometers have been used to measure the electron density of plasmas. During the last ten years X-ray lasers in the wavelength range 14 to 47 nm have enabled researchers to use interferometers to probe even higher density plasmas. The data analysis assumes that the index of refraction is due only to the free electrons, which makes the index of refraction less than one and the electron density proportional to the number of fringe shifts. Recent experiments in Al plasmas observed plasmas with an index of refraction greater than one and made us question the validity of the usual formula for calculating the index of refraction. Recent calculations showed how the anomalous dispersion from the bound electrons can dominate the index of refraction in many types of plasma and make the index greater than one or enhance the index such that one would greatly overestimate the electron density of the plasma using interferometers. In this work we calculate the index of refraction of C, Al, Ti, and Pd plasmas for photon energies from 0 to 100 eV (12.4 nm) using a new average-atom code. The results show large variations from the free electron approximation under many different plasma conditions. We validate the average-atom code against the more detailed OPAL code for carbon and aluminum plasmas. During the next decade X-ray free electron lasers and other sources will be available to probe a wider variety of plasmas at higher densities and shorter wavelengths so understanding the index of refraction in plasmas will be even more essential.