A method and device for determining dynamic hyperinflation during mechanical ventilation of a spontaneously breathing patient, wherein mechanical ventilation is removed during one breath of the patient, inspiratory and expiratory volumes of the patient are measured during the one breath, and a difference between the inspiratory and expiratory volumes measured during the one breath is calculated. Dynamic hyperinflation of the patients lungs is indicated in relation to the calculated difference.