We propose a model that can explain the dependence of the superconducting critical temperature on the oxygen content x in YBa 2 Cu 3 O 6 + x . On the basis of the experimentally observed linear dependence of the critical temperature on the superconducting volume and calculating the superconducting volume as a function of x, one can derive the critical temperature variation versus x. The model equations may take into account the existence of different oxygen ordering. The threshold oxygen concentration for which filamentary superconductivity occurs can be calculated. One can explain the variation of the critical temperature with an applied pressure, too. The generality of the proposed theory is underlined. The application of the model gives the dependence of the superconducting critical temperature on the stoichiometry for many compounds.