Use Play to run the gas-exchange cycle, or Step to advance one stage at a time. Drag to rotate the scene and click any structure — alveolus, membrane, capillary, oxygen, carbon dioxide, or a red blood cell — to learn what it does.
Every cell in your body burns oxygen and produces carbon dioxide as waste. Your lungs are where the blood picks up fresh oxygen and drops off that carbon dioxide. The actual swap happens in about $300$–$500$ million tiny air sacs called alveoli. Each one is wrapped in blood capillaries, and the wall between air and blood — the respiratory membrane — is only about $0.5\,\mu\mathrm{m}$ thick.
Gases do not get pumped across; they simply diffuse from high concentration to low. We measure each gas by its partial pressure, $P$. In the alveolus the oxygen partial pressure is about $P_{\mathrm{O_2}}\approx 104\,\mathrm{mmHg}$, while blood arriving from the body is only about $40\,\mathrm{mmHg}$. Oxygen therefore diffuses into the blood. Carbon dioxide is the reverse — about $45\,\mathrm{mmHg}$ in the blood versus $40\,\mathrm{mmHg}$ in the alveolus — so it diffuses out. Each gas follows its own gradient, which is why the two move in opposite directions at once.
Oxygen barely dissolves in plasma, so red blood cells carry hemoglobin, which snaps up oxygen the moment it crosses. By binding it, hemoglobin keeps the dissolved oxygen low, so the gradient stays steep and even more oxygen pours in — this is why blood can carry roughly $70\times$ more oxygen than plasma alone. The rate of exchange follows Fick's law: it rises with surface area $A$ and the pressure difference $\Delta P$, and falls with membrane thickness $T$, roughly $\text{rate}\propto \frac{A\,\Delta P}{T}$. Huge area, big gradient, tiny thickness — the lung is built to maximise all three.
Press Play and watch oxygen cross into the blood and bind hemoglobin while carbon dioxide leaves. Drag the Alveolar O₂ slider down toward $40$ — the gradient flattens and oxygen stops crossing (this is what happens at high altitude). Then push Blood flow / breathing to exercise: steeper gradients and faster flow speed everything up.
| Stage | What happens | Driving force |
|---|---|---|
| 1. Inhale | Fresh air fills the alveolus, raising alveolar PO₂ (~104 mmHg) | Breathing |
| 2. Blood arrives | Deoxygenated blood (PO₂ ~40, PCO₂ ~45) flows into the capillary | Circulation |
| 3. O₂ diffuses in | Oxygen crosses the membrane from alveolus into blood | O₂ gradient (104→40) |
| 4. O₂ binds hemoglobin | Oxygen loads onto hemoglobin in red blood cells | Binding keeps gradient steep |
| 5. CO₂ diffuses out | Carbon dioxide crosses from blood into the alveolus | CO₂ gradient (45→40) |
| 6. Exhale | Blood leaves oxygen-rich; CO₂-laden air is breathed out | Breathing |
The values shown in the sim are the standard textbook figures for a healthy person at rest at sea level. Alveolar air sits at about $P_{\mathrm{O_2}}=104\,\mathrm{mmHg}$ and $P_{\mathrm{CO_2}}=40\,\mathrm{mmHg}$. Blood entering the lungs from the body is about $P_{\mathrm{O_2}}=40$ and $P_{\mathrm{CO_2}}=45$. After exchange, blood leaving the lungs has essentially equilibrated with the alveolar air ($P_{\mathrm{O_2}}\approx 100$, $P_{\mathrm{CO_2}}\approx 40$). Notice the oxygen gradient ($104-40=64$) is much larger than the carbon-dioxide gradient ($45-40=5$); carbon dioxide can still keep pace because it diffuses about $20$ times more readily through the membrane than oxygen.
If your lungs were a single balloon, their inner surface would be a few hundred square centimetres — nowhere near enough. By dividing into hundreds of millions of alveoli, the lung packs roughly $70\,\mathrm{m^2}$ of exchange surface (about the area of a tennis court) inside the chest. Diseases that destroy alveolar walls (emphysema) merge many small sacs into fewer large ones, slashing surface area and making every breath less effective — a direct, visible consequence of the surface-area term in Fick's law.
Gas exchange is the swapping of oxygen and carbon dioxide between the air in your lungs and your blood. In the alveoli — the tiny air sacs of the lungs — oxygen moves from the air into the blood, and carbon dioxide moves from the blood into the air to be breathed out. The exchange happens entirely by diffusion across a very thin membrane.
Key takeaway: gas exchange loads the blood with oxygen and unloads carbon dioxide, by diffusion, in the alveoli.Each gas diffuses from where its partial pressure is high to where it is low — down its own gradient, independently of the other gas. Air in the alveolus is rich in oxygen (about $104$ mmHg) and low in carbon dioxide, while blood arriving from the body is the reverse. So oxygen moves into the blood and carbon dioxide moves out, at the same time.
Key takeaway: each gas follows its own partial-pressure gradient, so O₂ and CO₂ travel in opposite directions.The respiratory membrane between air and blood is only about $0.5$ micrometres thick — thinner than a single sheet of plastic wrap. Diffusion is fast only over very short distances, so a thin barrier lets gases cross almost instantly. The membrane is just a flattened alveolar cell, a fused basement membrane, and a flattened capillary cell.
Key takeaway: a paper-thin membrane keeps the diffusion distance tiny, so exchange is fast and complete.Oxygen does not dissolve well in blood plasma, so red blood cells carry the protein hemoglobin, which grabs oxygen as it diffuses in. By binding oxygen, hemoglobin keeps the dissolved-oxygen level in the plasma low, which keeps the gradient steep and pulls even more oxygen in from the alveolus. About $98\%$ of the oxygen in blood is carried on hemoglobin.
Key takeaway: hemoglobin binds oxygen, keeping the gradient steep and letting blood carry far more oxygen than plasma alone.There are roughly $300$–$500$ million alveoli in the lungs, and together they create a gas-exchange surface of about $70$ square metres — close to the size of a tennis court — packed inside your chest. Diffusion rate increases with surface area, so this enormous area lets the lungs exchange enough gas to support the whole body.
Key takeaway: hundreds of millions of tiny sacs create a vast surface area, multiplying the rate of gas exchange.During exercise, working muscles use more oxygen and make more carbon dioxide, so the blood arriving at the lungs is lower in oxygen and higher in carbon dioxide. That makes the partial-pressure gradients steeper, so each gas diffuses faster. Breathing rate and blood flow also rise, refreshing the air and blood more often.
Key takeaway: exercise steepens the gradients and speeds up breathing and circulation, raising the rate of gas exchange.External respiration is the gas exchange in the lungs: oxygen into the blood and carbon dioxide out, at the alveoli. Internal respiration is the gas exchange at the body tissues: oxygen leaving the blood for the cells and carbon dioxide entering the blood. Both are diffusion driven by partial-pressure gradients; only the direction is reversed. Neither is the same as cellular respiration, the chemical reaction inside cells that actually uses the oxygen.
Key takeaway: external (lungs) and internal (tissues) respiration are mirror-image diffusion steps, distinct from cellular respiration.