Diffusion capacity is a measurement of the lung's ability to absorb and excrete gases, notably, oxygen and carbon dioxide. It is part of a comprehensive test series of lung function called pulmonary function testing.