The present invention discloses a method to determine the lung clearance index (LCI) or other indices of ventilation inhomogeneity of the lungs by combining two pulmonary gas exchange techniques Inert gas rebreathing (IGR) is used for rapid wash-in of the inert tracer gas and for accurate determination of the functional residual capacity (FRC) by gas analysis alone. This is followed by multiple-breath wash-out (MBW) for determination of the cumulative expired volume (VCE) required to clear the inert tracer gas from the lungs, and calculation of the LCI as the ratio between VCE and FRC. The advantages of the method are i) significant reduction of required test time, ii) significant reduction of consumed gas mixture for wash-in of tracer gas, iii) potential for further reduction of the use of tracer gas, and iv) more accurate determination of the FRC by gas dilution alone. Furthermore the present invention relates to a corresponding system and computer-readable medium.