Distinguishing octane numbers of commercial gasoline is experimentally demonstrated by use of single split-ring resonator metamaterials functioning at terahertz frequencies. The differences in frequency-dependent absorption coefficients and refractive indices of various grades of gasoline lead to a modification in the surrounding dielectric environment and consequently the resonance properties of the planar metamaterials. This consequently enables a distinct frequency shift in the inductive-capacitive electric dipolar resonances. This paper reveals that such metamaterial arrays, as highly sensitive chemical sensors, have promising potential in petroleum industrial applications.