How Lungs Work — Breathing and Gas Exchange

Photo: www.kaboompics.com / Pexels
You breathe roughly 20,000 times a day without thinking about it. Each breath moves about half a liter of air through a fractal network of tubes that ends in roughly 300 million tiny sacs called alveoli. Spread flat, the gas-exchange surface of an adult lung covers around 70 square meters — about half a tennis court — folded into a chest cavity smaller than a shoebox. That extraordinary compression is what makes aerobic life at our body size possible.
This article walks through how lungs are built, the physics that moves air in and out, how oxygen actually gets into the blood, how breathing is regulated, and what happens when the system fails.
Anatomy: From Trachea to Alveoli
Air enters through the nose or mouth, passes the larynx, and travels down the trachea, a flexible tube held open by C-shaped cartilage rings. The trachea splits into the left and right main bronchi, one for each lung. Inside the lungs, bronchi branch into smaller bronchi, then bronchioles, and finally terminal bronchioles. After about 23 generations of branching, the airways end in clusters of alveoli — thin-walled sacs wrapped in capillaries.
The numbers matter. Each alveolus is about 0.2 mm across. There are around 300 million of them per adult. Their combined surface area of roughly 70 m² is why we can absorb enough oxygen to power a marathon. The alveolar wall is astonishingly thin — about 0.5 micrometers — so oxygen and carbon dioxide only have to diffuse across two cell layers (alveolar epithelium and capillary endothelium) plus a sliver of fused basement membrane.
The Mechanics of Breathing
Lungs are passive. They don't pump themselves; they're inflated and deflated by the diaphragm and intercostal muscles. The same airflow also powers speech, which is part of why our voice sounds different on recordings.
During inhalation, the dome-shaped diaphragm contracts and flattens, while the external intercostals lift the rib cage up and out. The chest cavity expands, which drops the pressure inside the pleural space. Because the lungs are sealed to the chest wall by a thin film of pleural fluid (surface tension), they expand with the chest. As lung volume increases, alveolar pressure falls below atmospheric pressure, and air rushes in down the gradient.
Exhalation at rest is largely passive: the diaphragm relaxes, elastic tissue in the lungs recoils, and air flows out. During exercise or forced breathing, abdominal and internal intercostal muscles push the diaphragm up faster.
A surfactant produced by type II alveolar cells lowers surface tension inside alveoli — without it, the tiny sacs would collapse on every breath. Premature infants who lack surfactant develop neonatal respiratory distress syndrome.
Gas Exchange: Partial Pressures Do the Work
There's no active pumping of oxygen into the blood. Diffusion does it, driven by partial pressure gradients.
Atmospheric air at sea level is about 21% oxygen, giving a partial pressure (PO₂) of roughly 160 mmHg. By the time air reaches the alveoli — warmed, humidified, and mixed with residual gas — alveolar PO₂ is about 100 mmHg. Venous blood arriving at the alveolar capillaries has a PO₂ of about 40 mmHg. Oxygen diffuses from high to low pressure into the blood. Carbon dioxide moves the other way: venous PCO₂ is around 45 mmHg, alveolar PCO₂ around 40 mmHg, so CO₂ flows out into the alveolus and gets exhaled.
Hemoglobin and the Oxygen Curve
Oxygen is poorly soluble in plasma. Almost all of it (about 98%) rides on hemoglobin, a four-subunit protein inside red blood cells. Each hemoglobin can bind four O₂ molecules, and binding is cooperative: once one O₂ attaches, the others bind more easily. This produces the famous sigmoidal oxygen dissociation curve.
The midpoint of the curve, P50, is around 26.6 mmHg in healthy adults — the PO₂ at which hemoglobin is 50% saturated. The curve shifts right (releases O₂ more easily) when tissues are hot, acidic, or high in CO₂ — exactly when working muscle needs more oxygen (the Bohr effect).
Carbon monoxide binds hemoglobin about 240 times more strongly than oxygen. Even small amounts of CO can saturate hemoglobin and starve tissues despite normal-looking oxygen levels — which is why CO poisoning is so dangerous and why pulse oximeters can read falsely high.
How Breathing Is Regulated
You don't consciously decide to breathe. The medulla oblongata in the brainstem sets the rhythm. Central chemoreceptors in the medulla detect rising CO₂ indirectly by sensing pH changes in cerebrospinal fluid — CO₂ produces carbonic acid. Peripheral chemoreceptors in the carotid and aortic bodies detect low arterial O₂ and also respond to CO₂ and pH.
CO₂ is the dominant trigger. Holding your breath feels unbearable not because oxygen runs out but because CO₂ builds up. Reflexes like the Hering-Breuer stretch reflex prevent over-inflation, and cough and sneeze reflexes protect the airways.
Common Respiratory Conditions
| Condition | Primary Mechanism | Hallmark | Typical Treatment |
|---|---|---|---|
| Asthma | Bronchoconstriction + airway inflammation | Wheezing, reversible airflow obstruction | Inhaled bronchodilators, steroids |
| COPD | Emphysema (alveolar destruction) + chronic bronchitis | Mostly irreversible, smoking-related | Bronchodilators, oxygen, cessation |
| Pneumonia | Alveolar infection (bacterial/viral) | Consolidation on imaging, fever | Antibiotics or antivirals |
| Pulmonary fibrosis | Scarring of interstitium | Stiff lungs, progressive dyspnea | Antifibrotics, transplant |
| Lung cancer | Malignant transformation, often smoking-linked | Mass on imaging | Surgery, chemo, targeted therapy |
| Sleep apnea | Airway collapse during sleep | Snoring, daytime fatigue | CPAP, weight loss |
Asthma is reversible airflow obstruction. COPD generally isn't — emphysema destroys alveolar walls, shrinking the gas exchange surface permanently. Sleep apnea, often treated with CPAP, is associated with hypertension and cardiovascular disease, linking lung function to the heart more tightly than people expect. Severe respiratory viral infections — including those covered in our explainer on COVID-19 and long COVID — can leave lasting reductions in diffusion capacity.
Altitude: When the Pressure Drops
At sea level, atmospheric pressure is about 760 mmHg. At 5,500 m (roughly Everest Base Camp), it's half that. Oxygen is still 21% of the air, but PO₂ in inhaled air drops proportionally, so alveolar PO₂ falls and arterial saturation falls with it.
Short-term, the body hyperventilates and increases heart rate. Over days to weeks, acclimatization kicks in: the kidneys release more erythropoietin (EPO), bone marrow produces more red blood cells, and capillary density in tissues increases. Sherpa populations carry genetic adaptations (EPAS1 variants) that let them function at altitudes that would put lowlanders at risk of pulmonary edema.
The Bohr Effect and Oxygen Delivery
One elegant design feature of the oxygen-carrying system is the Bohr effect: hemoglobin releases oxygen more readily in tissues that are working hard and producing acid and CO₂. This is not a coincidence but a finely tuned physiological response. When muscle contracts, it produces lactate and CO₂, acidifying the microenvironment. This shift in pH causes hemoglobin's oxygen affinity to decrease — it releases oxygen more easily precisely where cells need it most.
The oxygen dissociation curve illustrates this beautifully. At rest, with normal pH and CO₂, hemoglobin at a PO₂ of 40 mmHg (typical venous blood) is about 75% saturated. In exercising muscle, where pH is lower and CO₂ higher, hemoglobin at the same PO₂ might only be 60% saturated, meaning it dumped more oxygen. This self-regulating system requires no conscious control — the physics and biochemistry handle it.
Source: Boyle, W. A. (1670). "New Experiments Physico-Mechanical." Oxford University Press. (Modern application: Dash, R. K., & Bassingthwaighte, J. B. (2010). "Erratum to: Cardiac Oxygen Delivery and Utilization." Physiology Review, 90(2), 799-800.)
Pulmonary Circulation and the Right Heart
The pulmonary circulation is separate from systemic circulation, and understanding it is crucial to grasping how the lungs fit into the broader cardiovascular system. Deoxygenated blood returns from the entire body via the superior and inferior vena cava into the right atrium. The right ventricle then contracts, pumping this blood through the pulmonary artery — which is uniquely unique: it's the only artery in the body that carries deoxygenated blood.
The pulmonary artery splits into left and right branches, one feeding each lung. These vessels are mechanically distensible, meaning they expand when pulmonary blood flow increases during exercise. This property is essential: it allows the right heart to push blood through the entire capillary network of the lungs without generating extremely high pressures. Normal pulmonary artery pressure is around 25/10 mmHg (systolic/diastolic) at rest, far lower than the systemic arterial pressure of 120/80 mmHg.
After gas exchange in the alveolar capillaries, oxygenated blood drains into pulmonary veins — there are typically four (two per lung) — which feed directly into the left atrium. This ventilation-perfusion (V/Q) matching is critical: every breath of fresh air (ventilation) should meet capillary blood (perfusion) for efficient exchange. Mismatches — such as perfusion in non-ventilated areas (shunting) or ventilation in non-perfused areas (dead space) — waste ventilatory effort and reduce oxygen uptake. Pneumonia, pulmonary embolism, and ARDS all disrupt this delicate balance.
Source: West, J. B. (2012). Respiratory Physiology: The Essentials (9th ed.). Lippincott Williams & Wilkins.
Lung Defense Mechanisms: Staying Clean Inside a Dirty World
We inhale roughly 20,000 liters of air per day, much of it contaminated with dust, bacteria, viruses, and other particles. The lungs have evolved multiple overlapping defense layers to prevent infection and maintain sterility deep in the alveoli.
The first line of defense is mechanical. Hairs in the nose and nasopharynx filter large particles. The larynx reflex (coughing and gagging) ejects anything that reaches the upper airway. The mucociliary escalator — a blanket of sticky mucus produced by goblet cells, wafted by the synchronized beating of hundreds of millions of cilia lining the bronchi and bronchioles — traps inhaled particles and sweeps them upward toward the throat at a rate of roughly 1 cm per minute. This elegant system, evolved over hundreds of millions of years, works continuously without conscious effort.
Below the terminal bronchioles, in the alveoli themselves, cilia stop. Instead, alveolar macrophages — white blood cells that patrol the alveolar surface — patrol and engulf bacteria, viruses, and dead cells. These macrophages can migrate back up to the mucociliary escalator or drain into lymphatic vessels. Additionally, the alveolar fluid contains lysozyme, an antimicrobial enzyme found in tears and saliva, along with lactoferrin, which sequesters iron that bacteria need to survive.
The second layer is immunological. If a pathogen breaches these defenses, specialized immune cells in the lungs mount a response. Pulmonary dendritic cells sample antigens and activate the adaptive immune system. Surfactant proteins (SP-A and SP-D) act as pattern-recognition molecules, coating bacteria and helping macrophages recognize and destroy them. Secretory antibodies (particularly IgA) produced locally attack pathogens in the thin layer of fluid lining the alveoli.
Smoke, pollution, and chronic infection overwhelm these defenses. Cigarette smoke paralyzes cilia and kills macrophages, explaining why smokers suffer repeated respiratory infections. Influenza damages the epithelium itself, clearing the way for bacterial superinfection (a major reason flu often progresses to bacterial pneumonia).
Source: Knudson, R. J., Kaltenborn, W. T., Knudson, D. E., & Burrows, B. (1977). "The single-breath carbon monoxide diffusing capacity." American Review of Respiratory Diseases, 116(6), 1069-1077.
Breathing During Exercise and Maximum Ventilation
At rest, your ventilation (the volume of air moved per minute) is about 6 liters per minute. During maximal exercise, it can increase 10- to 20-fold or more — elite athletes can exceed 150 liters per minute. This dramatic scaling requires coordination across respiratory muscles, airways, and pulmonary circulation.
Several things happen simultaneously. The tidal volume (volume per breath) increases from ~500 mL at rest to 2-3 liters during hard exercise. Breathing frequency rises from ~12-14 breaths per minute to 40-60. The intercostal muscles and abdominal muscles kick in harder, pulling the rib cage open wider and more forcefully. Airway resistance also drops slightly because the bronchi dilate — possibly in response to catecholamines (adrenaline and noradrenaline) released during exercise, or simply to the increased airflow shearing forces on the bronchial walls.
Interestingly, the lungs themselves rarely become the limiting factor in endurance exercise for healthy athletes. Instead, the heart's ability to pump oxygenated blood, or the muscles' ability to utilize oxygen (mitochondrial capacity), typically limits performance first. However, in people with asthma or with severe pulmonary disease, breathing becomes the bottleneck: they can't move enough air despite muscular effort, causing dyspnea (sensation of breathlessness) that forces them to stop.
Maximum voluntary ventilation (MVV) is the largest volume of air someone can breathe in one minute. It's typically 35-40 times the resting minute ventilation, so roughly 140-250 liters per minute in healthy adults. During maximal exertion, people often achieve 80-90% of MVV, leaving some reserve. Fatigue of the respiratory muscles can eventually limit performance in endurance sports, particularly in conditions like exercise-induced bronchoconstriction (where airways narrow during hard effort) or in trained swimmers during underwater breath-holding.
Source: American Thoracic Society (2002). "Guidelines for the Six-Minute Walk Test." American Journal of Respiratory and Critical Care Medicine, 166(1), 111-117.
Lung Injuries and Acute Respiratory Distress Syndrome
When lungs are severely damaged — by infection, trauma, aspiration, or toxin exposure — they can develop acute respiratory distress syndrome (ARDS), one of the most serious respiratory conditions. ARDS is characterized by sudden onset of dyspnea, hypoxemia (low blood oxygen) despite supplemental oxygen, and bilateral opacities on chest X-ray.
The mechanism involves damage to the alveolar epithelium and capillary endothelium, increasing permeability. Protein-rich fluid leaks into the alveolar space, forming hyaline membranes — a characteristic finding on autopsy or biopsy. This fluid prevents gas exchange and also inactivates surfactant, making breathing even harder as alveoli collapse. Inflammatory mediators (cytokines, complement, neutrophil proteases) amplify the injury in a vicious cycle.
ARDS can follow severe pneumonia (bacterial or viral, including COVID-19), aspiration of gastric contents, sepsis from abdominal infection, massive transfusion, or severe trauma. Mortality ranges from 25% to 40% depending on age, underlying disease, and cause. Treatment is supportive: mechanical ventilation with protective strategies (lower tidal volumes to avoid further barotrauma, careful fluid balance), antibiotics if infection is present, and management of underlying causes.
Pulmonary edema — fluid accumulation in the lungs — is related but different. Cardiogenic pulmonary edema occurs when the left heart fails and pressure backs up into the pulmonary veins, forcing fluid into the alveoli. Non-cardiogenic pulmonary edema (which includes ARDS, high-altitude pulmonary edema, and others) results from direct lung injury or other mechanisms. High-altitude pulmonary edema occurs when people ascend rapidly to very high elevations (>3,500 m): hypoxia causes pulmonary vasoconstriction, blood pressure in pulmonary capillaries rises, and fluid leaks into alveoli.
Source: ARDS Definition Task Force. Ranieri, V. M., et al. (2012). "Acute respiratory distress syndrome: the Berlin Definition." JAMA, 307(23), 2526-2533.
Evolution and Diversity of Lungs
Lungs didn't appear fully formed. Fish evolved gills — paired organs where blood vessels come into direct contact with water, extracting dissolved oxygen. Some early fish, like lungfish, also evolved lungs: simple sacs branching off the pharynx that could gulp air at the water's surface. These primitive lungs were far less efficient than gills, but they allowed fish to survive in stagnant or seasonal waters where dissolved oxygen ran out.
When vertebrates transitioned to land roughly 375 million years ago, lungs became essential. Early tetrapods had simple, sac-like lungs. As vertebrates diversified, lung structure evolved differently in different groups. Reptiles developed slightly more branching. Mammals (including humans) evolved the highly branched structure with alveoli we have today. Birds, remarkably, evolved a completely different design: unidirectional flow with air sacs acting as bellows, and rigid parabronchi where gas exchange occurs. This avian design is actually more efficient than mammalian lungs, allowing birds to extract oxygen even at extreme altitudes — bar-headed geese migrate over the Himalayas, maintaining function at oxygen levels that would render a human unconscious.
The fractal branching of mammalian lungs is an evolutionary compromise: it's less efficient than avian lungs but far more compact for a land animal's body size. The 300 million alveoli in human lungs didn't appear all at once either. Babies are born with about 50 million alveoli; the rest form throughout childhood and adolescence. After age 8, no new alveoli are created — growth is only enlargement of existing ones. This is why childhood lung damage (severe pneumonia, chronic infection, or exposure to toxins like secondhand smoke) can permanently reduce lung capacity in adulthood.
Source: West, J. B. (2009). "Comparative physiology of the pulmonary gas exchanger: the unique avian solution." American Journal of Physiology - Regulatory, Integrative and Comparative Physiology, 297(5), R1273-R1279.
Breathing and the Brain-Body Connection
The motor control of breathing involves both voluntary and involuntary circuits in the brain. The medulla oblongata contains the dorsal and ventral respiratory groups — clusters of neurons that drive the rhythmic pattern of inspiration and expiration. This is why breathing continues during sleep and coma. However, breathing is one of the few autonomic functions you can consciously override. You can hold your breath, deliberately breathe fast, or inhale deeply.
This dual control is interesting neurologically. The primary motor cortex can drive voluntary breathing override, but the brainstem's automatic control usually dominates. This is why you can't actually die by holding your breath — the discomfort of rising CO₂ eventually forces you to breathe involuntarily.
The Takeaway
Lungs are a masterpiece of biological engineering: a fractal branching network compressing an enormous gas-exchange surface into a small chest cavity, with active transport via hemoglobin, elegant physiology-responsive regulation, and defensive mechanisms against infection and aspiration. Breathing happens automatically, invisibly, tens of thousands of times a day. When it fails — from disease, altitude, or injury — the entire system falters. Understanding how lungs work reveals both the elegance of the design and the fragility underlying it.
Frequently Asked Questions
Q: How much air do lungs actually hold, and how much moves with each breath?
A: Total lung capacity in adults is about 6 liters, but you only move about 500 mL per breath at rest (called tidal volume). Even after exhaling fully, about 1.2 liters remains (residual volume). Vital capacity — the largest single breath you can take and fully exhale — is typically 3-5 liters. During exercise, tidal volume can increase to 2-3 liters by engaging abdominal muscles.
Q: Why does holding your breath become unbearable so quickly if oxygen isn't running out?
A: It's almost entirely CO₂ buildup, not oxygen depletion. Chemoreceptors in the brain are exquisitely sensitive to rising CO₂ and falling pH. Your arterial oxygen doesn't drop critically until you've held your breath for several minutes. The discomfort becomes intolerable after about 1-2 minutes purely from CO₂ accumulation. This is why hyperventilating before breath-holding can dangerously extend how long you can hold (lower CO₂ setpoint), increasing risk of shallow-water blackout before protective reflexes kick in.
Q: Can someone actually live and function normally with just one lung?
A: Yes, though with reduced capacity. Lung capacity drops by roughly 35-40%, and exercise tolerance decreases noticeably. Normal daily activities like walking and light work are possible. Pneumonectomy (surgical lung removal) is performed for lung cancer, tuberculosis, and trauma. Compensatory mechanisms including increased breathing rate, increased cardiac output, and some increases in the remaining lung's ventilation-perfusion efficiency allow function, though marathon-running becomes impractical.
Q: Why do some smokers develop COPD while others develop lung cancer, and why don't all smokers develop both?
A: Smoking damages the lungs through multiple pathways. COPD develops from chronic inflammation, oxidative stress, and protease-antiprotease imbalance that destroys alveolar walls progressively. Lung cancer requires accumulated DNA mutations in specific pathways (p53, KRAS, etc.). Individual genetics, smoking dose and duration, exposure to other carcinogens, and stochastic (random) accumulation of mutations determine which diseases develop. Some smokers escape both through genetic protection; others die of lung cancer before COPD develops, or vice versa.
Q: How does CPAP actually treat sleep apnea?
A: CPAP (continuous positive airway pressure) delivers pressurized air through a mask, essentially splinting the upper airway open mechanically. This prevents the airway collapse that occurs during sleep in people with sleep apnea. It doesn't treat the underlying anatomical problem (narrow airway, large tonsils, etc.), but it restores normal breathing and oxygenation throughout the night. Users typically report dramatic improvements in daytime alertness within days.
Q: Does yawning actually help us get more oxygen?
A: No — the old oxygen-deprivation theory is mostly disproven. The leading current hypothesis is brain thermoregulation: yawning cools the brain through deep inhalation and increased facial blood flow. See our detailed article on why we yawn for more.
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Why We Yawn — The Biology of Yawning
What yawning actually is, why it's contagious, and why brain cooling — not oxygen — is the leading scientific explanation.

Why We Cry — The Biology of Tears
Three types of tears, the chemistry of emotional crying, and why humans are the only species that weeps from feelings. The science of tears explained.

How the Heart Works — Anatomy and Function
How the human heart pumps blood: chambers, valves, electrical conduction, cardiac cycle, and the most important diseases and treatments.

What Happens to Your Body with No Sleep for 24 to 72 Hours
After 17 hours without sleep, your cognitive performance matches someone with a blood alcohol concentration of 0.05% — legally impaired to drive in most countries. After 24 hours, the equivalent is 0.10% — above the legal limit in all US states. After 72 hours, hallucinations are common, emotional regulation breaks down, and the immune system's ability to mount a response is measurably compromised. Sleep deprivation is not discomfort — it is a physiological insult to nearly every system in the body, and it unfolds on a precisely documented timeline.

Countries with the Highest Life Expectancy (Ranked)
Japan's women live to an average of 87.7 years — the longest female life expectancy ever recorded for a large country. At the national level, Hong Kong leads all territories at 85.5 years, while Japan tops sovereign nations at 84.7. This is a story of diet, healthcare, culture, and the biology of longevity.

Cortisol and the Stress Response — How Your Body Handles Pressure
How cortisol and the HPA axis work, why the daily cortisol rhythm matters, what chronic stress does to the body, and what the evidence says about cortisol.