Noncontact terahertz time-domain spectroscopy was employed to measure pressure-dependent refractive indices of gases such as helium (He), argon (Ar), krypton (Kr), oxygen (O2), nitrogen (N2), methane (CH4), and carbon dioxide (CO2). The refractive indices of these gases scaled linearly with pressure, for pressures in the 55-3,750 torr range. At the highest pressure, the refractive indices ((n-1) x 106) of He and CO2 were 170 and 2,390, respectively. The refractive index of CO2 was 14.1-fold higher than that of He, owing to the stronger polarizability of CO2. Although the studied gases differed in terms of their molecular structure, their refractive indices were strongly determined by polarizability. The measured refractive indices agreed well with the theoretical calculations.