We present a differential optical method (DOM) based on an interferometric technique at λ=632.9 nm, for the detection of small amounts of gaseous contaminants in a gas. The DOM is based on comparative measurements of the refractive index of pure gas and mixtures of gaseous contaminant and the pure gas. This method allows detection of small amounts (ppmv) of contaminant as a function of pressure and temperature. The DOM was applied to gaseous SF6 contaminated with 0.49% and 10.5% of CO2 at 294.1±0.5 K, up to 0.5 MPa and 350, 700, 1244, and 1489 ppmv of water vapor at 304.1±0.1 K, up to 1 MPa. Comparative measurements with a hygrometer (MCM, Dewmatic 600 D) show good agreements at 350±25 and 700±50 ppmv of water. © 1998 American Institute of Physics.