In the lungs, whilst oxygen is smaller than carbon dioxide, the difference in solubility means that carbon dioxide diffuses roughly 20 times faster than oxygen. The difference between the rate of diffusion of the individual molecules is compensated for by the large difference in partial pressures of oxygen, creating a larger diffusion gradient than that of carbon dioxide. However, this means that in disease states which impair the ability of the lungs to adequately ventilate with oxygen, oxygen exchange is often compromised before that of carbon dioxide.