By varying oxygen content of the microstrip line resonator of YBa 2 Cu 3 O 7-x the effective penetration depth was studied. Based on the two-fluid model, we fit the data of the resonant frequency by means of the inductance formula. It allows us to determine the zero-temperature penetration depth of the fully oxygenated,(O ≈ 7) and oxygen deficient (O = 6.8) states in the same strip to be 483.2 nm and 789.8 nm, respectively. The ratio of the superconducting carrier densities with different oxygen contents is then derived and found to be consistent with the result of Hall measurement. A correlation between oxygen contents and charge carriers of the samples will be obtained in our work as accurately as possible.