Recent computed tomography studies show that inspired gas composition affects the development of anesthesia-related atelectasis. This suggests that gas absorption plays an important role in the genesis of the atelectasis. A mathematical model was developed that combined models of gas exchange from an ideal lung compartment, peripheral gas exchange, and gas uptake from a closed collapsible cavity. It was assumed that, initially, the lung functioned as an ideal lung compartment but that, with induction of anesthesia, the airways to dependent areas of lung closed and these areas of lung behaved as a closed collapsible cavity. The main parameter of interest was the time the unventilated area of lung took to collapse; the effects of preoxygenation and of different inspired gas mixtures during anesthesia were examined. Preoxygenation increased the rate of gas uptake from the unventilated area of lung and was the most important determinant of the time to collapse. Increasing the inspired O2 fraction during anesthesia reduced the time to collapse. Which inert gas (N2 or N2O) was breathed during anesthesia had minimal effect on the time to collapse.