The refractive index of helium at atmospheric pressure can be determined from ab initio calculations in combination with careful pressure and temperature measurements. Therefore, helium can serve as a theory-based standard of refractive index; it might be used as a medium of known refractive index for high-accuracy interferometric length measurements or it can be used to characterize and correct errors in a gas refractometer. We have used helium to correct for pressure-induced distortions of two refractometers built by us, where both refractometers basically consist of a laser locked to the transmission maximum of a simple Fabry-Perot cavity. As a proof-of-principle of the helium-correction technique, we have used our device to measure the molar refractivity of nitrogen and we find reasonable agreement with previous measurements. When our two refractometers simultaneously measure the refractive index of a common nitrogen sample, we find that the two systems agree with each other within a few parts in 109.