How the Lungs Work: Breathing and Gas Exchange Explained

Photo: www.kaboompics.com / Pexels
The average adult takes about 20,000 breaths per day without consciously deciding to take a single one. Each breath moves roughly half a liter of air through a branching tree of airways that terminates in approximately 480 million microscopic air sacs, collectively offering a gas-exchange surface the size of a tennis court — up to 75 square meters — folded inside a chest cavity that fits into a carry-on bag. The mechanism behind this is elegant, pressure-driven, and surprisingly simple once you understand what the diaphragm is actually doing.
The Architecture: More Tree Than Balloon
Most people picture the lungs as two simple balloons that inflate and deflate. The reality is closer to an upside-down tree with roughly 23 generations of branching airways.
Trachea — the main trunk, a cartilage-reinforced tube about 12 cm long that divides at the carina (a ridge of cartilage at the fork) into two primary bronchi, one entering each lung.
Bronchi — the main branches, which subdivide into secondary and tertiary bronchi, then into smaller bronchioles, and finally into terminal bronchioles (the last purely conducting airways, generation 16). All of these tubes are just moving air to the right address; no gas exchange happens here.
Respiratory bronchioles and alveolar ducts — generations 17–22, where the walls begin to sprout alveoli and limited gas exchange begins.
Alveoli — the terminus. Each alveolus (from Latin for "little cavity") is a hollow sphere roughly 200–250 micrometers in diameter, wrapped in a net of capillaries that cover about 70% of its outer surface. The alveolar wall and capillary wall together form a membrane just 0.5–1.0 micrometers thick — roughly 100 times thinner than a single sheet of printer paper.
Source: Ochs, M. et al., American Journal of Respiratory and Critical Care Medicine (2004) — Stereological analysis establishing approximately 480 million alveoli per human lung pair, with a total gas-exchange surface area of 143 m² (effective breathing area closer to 75 m²).
The right lung has three lobes; the left has two (making room for the heart). Each lobe is supplied by its own bronchus and its own branch of the pulmonary artery, which is why surgeons can remove a single lobe without collapsing the rest.
Breathing Mechanics: Boyle's Law Does the Work
Breathing is not a pump pushing air in. It is a pressure game. The diaphragm and chest muscles expand the thoracic cavity, pressure inside drops below atmospheric, and air flows in passively down the pressure gradient. Think of it like pulling the plunger of a syringe: the volume increases, pressure falls, and fluid is drawn in without being actively "sucked."
Diaphragm — a dome-shaped sheet of skeletal muscle that forms the floor of the chest cavity. When it contracts, the dome flattens downward, increasing thoracic volume by 1–2 cm along the vertical axis. This accounts for roughly 75% of the volume change during quiet breathing.
External intercostal muscles — between the ribs, these lift and splay the rib cage outward during deeper breaths, increasing thoracic volume along the horizontal axis.
During quiet expiration, the diaphragm simply relaxes. The elastic recoil of lung tissue, plus the slight inward pull of the chest wall, passively reduces volume and pressure rises above atmospheric, pushing air out. Expiration costs almost no muscular energy at rest. During forced expiration (exercise, coughing), the internal intercostals and abdominal muscles actively compress the chest.
The numbers during a single quiet breath:
| Variable | Typical value |
|---|---|
| Tidal volume (air moved per breath) | ~500 mL |
| Inspiratory reserve volume (extra inhale capacity) | ~3,000 mL |
| Expiratory reserve volume (extra exhale capacity) | ~1,100 mL |
| Residual volume (air always remaining in lungs) | ~1,200 mL |
| Total lung capacity | ~6,000 mL |
| Dead space (conducting airways, no gas exchange) | ~150 mL |
The residual volume — about 1.2 liters — never leaves the lungs, even after the most forceful possible exhalation. This is the air that keeps the alveoli partly inflated and prevents them from collapsing between breaths.
Source: West, J.B., Respiratory Physiology: The Essentials, 10th edition, Lippincott Williams & Wilkins (2016) — Standard reference values for lung volumes and mechanics in healthy adults.
Surfactant: The Reason Alveoli Don't Collapse
Here is the engineering problem the lungs had to solve. Water molecules on the inner surface of each alveolus are attracted to each other (surface tension). In a sphere, surface tension acts like a rubber band trying to collapse the sphere. If 480 million alveoli all obeyed surface tension without modification, breathing would require enormous muscular effort and small alveoli would constantly collapse into larger ones.
The solution is pulmonary surfactant — a phospholipid-protein mixture secreted by specialized type II pneumocytes (one of two main alveolar cell types). Surfactant molecules insert themselves at the air-water interface, disrupting the hydrogen bonding that creates surface tension, reducing it by roughly 90%.
This is not a minor detail. Premature infants born before about 28–32 weeks of gestation have not yet developed adequate surfactant production. The result is infant respiratory distress syndrome (IRDS) — alveoli collapse with each exhalation, and each breath requires the force of the first. Synthetic surfactant administered into the airway is one of the most significant advances in neonatal medicine.
Source: National Heart, Lung, and Blood Institute, NIH — Respiratory Distress Syndrome (2022 update) — Surfactant deficiency as the primary mechanism of IRDS in premature infants.
Gas Exchange: The 1-Micrometer Miracle
Once air reaches the alveoli, oxygen moves into the blood and carbon dioxide moves out by diffusion — the net movement of molecules from an area of higher concentration (here, partial pressure) to lower. No pumps, no active transport: pure physics.
Partial pressure — the contribution of a single gas to total gas pressure. In dry air at sea level (atmospheric pressure ~101 kPa), oxygen makes up 21%, giving it a partial pressure (PO₂) of about 21 kPa. In the alveoli, after mixing with water vapor and residual CO₂, PO₂ falls to about 13.3 kPa. In deoxygenated blood arriving from the tissues, PO₂ is around 5.3 kPa. Oxygen therefore diffuses down its gradient from alveolus into blood.
The reverse is true for carbon dioxide: PCO₂ in venous blood is about 6.1 kPa; in the alveolus it is about 5.3 kPa. CO₂ diffuses out of blood and into the alveolus, where it is exhaled.
CO₂ is about 20 times more soluble in the alveolar membrane than oxygen, so even though its partial pressure gradient is smaller, it crosses the membrane easily.
What happens to oxygen in the blood?
Only about 1.5% of the oxygen in blood is dissolved directly in plasma. The rest — 98.5% — binds to hemoglobin, the iron-containing protein in red blood cells. Each hemoglobin molecule has four iron-containing heme groups, each capable of binding one oxygen molecule, giving a single hemoglobin a capacity of four O₂. When oxygen partial pressure is high (as in the lungs), hemoglobin loads up readily. When PO₂ is low (as in active muscles), it unloads its cargo. This relationship is captured in the oxyhemoglobin dissociation curve — an S-shaped graph that explains why hemoglobin delivers oxygen efficiently without requiring the blood to become dangerously acidic.
Source: Hall, J.E., Guyton and Hall Textbook of Medical Physiology, 14th edition, Elsevier (2020) — Definitive treatment of oxygen transport, hemoglobin binding kinetics, and the oxyhemoglobin dissociation curve.
Breathing Control: CO₂ Is the Signal, Not O₂
There is a common assumption that the brain monitors blood oxygen levels and commands breathing when oxygen drops. This is mostly backwards. The primary driver of breathing rate is blood carbon dioxide — specifically, blood acidity.
CO₂ dissolved in blood reacts with water to form carbonic acid (H₂CO₃), which dissociates into bicarbonate (HCO₃⁻) and a hydrogen ion (H⁺). Rising H⁺ concentration means rising acidity (falling pH). Central chemoreceptors in the medulla oblongata (part of the brainstem) are exquisitely sensitive to this pH change. When CO₂ rises even slightly — as during exercise — these receptors signal the respiratory centers to increase breathing rate and depth, blowing off the excess CO₂.
Peripheral chemoreceptors in the carotid bodies (at the fork of the carotid arteries in the neck) and the aortic bodies do respond to oxygen levels — but only when PO₂ falls quite low (below about 8 kPa, roughly half of normal). This is why you can hold your breath longer after hyperventilating: you've blown off CO₂, so your chemoreceptors don't trigger the urge to breathe even as oxygen slowly drops. This is also why hyperventilation before underwater swimming is dangerous — the O₂ level can fall to the point of unconsciousness before CO₂ rises enough to trigger breathing.
The respiratory center in the medulla sets the baseline rhythm. The pneumotaxic center in the pons modulates that rhythm, shortening inspirations to increase breathing rate when needed. The apneustic center, also in the pons, promotes sustained inspiration.
Source: Prabhakar, N.R. & Semenza, G.L., Physiological Reviews (2012) — Mechanistic review of peripheral chemoreceptor function and hypoxic ventilatory response.
Why Exercise Makes You Breathe Hard
During vigorous exercise, working muscles consume oxygen about 10–15 times faster than at rest and produce proportionally more CO₂. Cardiac output increases (see how the human heart works), sending blood through the pulmonary capillaries faster. Breathing rate and depth both increase — a process called hyperpnea.
At maximum aerobic effort, ventilation can reach 100–150 liters per minute (versus about 6 liters per minute at rest), driven by both the brainstem chemoreceptors and by direct neural signals from exercising limb muscles (feed-forward control that anticipates rising CO₂ before it reaches the brain).
The ventilatory threshold — the point where CO₂ production outpaces the ability to exhale it at the current breathing rate — is closely tied to the lactate threshold in trained endurance athletes. At intensities above this threshold, the extra CO₂ load from bicarbonate buffering of lactic acid drives a disproportionate increase in breathing rate. Athletes in the highest aerobic condition have higher ventilatory thresholds, partly because their muscles are more efficient and partly because their respiratory muscles are stronger.
Source: Wasserman, K. et al., Principles of Exercise Testing and Interpretation, 5th edition, Lippincott Williams & Wilkins (2011) — Ventilatory threshold, anaerobic threshold, and exercise physiology in detail.
What Can Go Wrong: Common Disruptions
The lungs' architecture, while efficient, has specific vulnerabilities.
Asthma — the small airways (bronchioles) become inflamed and their smooth muscle contracts (bronchoconstriction), narrowing the lumen and increasing airflow resistance. The characteristic wheeze is turbulent airflow through these narrowed tubes. Bronchodilators (beta-2 agonists like salbutamol) relax bronchiolar smooth muscle; inhaled corticosteroids reduce the underlying inflammation.
COPD (Chronic Obstructive Pulmonary Disease) — primarily caused by long-term cigarette smoke exposure, COPD involves both chronic bronchitis (inflammation of the larger airways, excess mucus) and emphysema (destruction of alveolar walls, merging small air sacs into larger, less-efficient ones). Total surface area for gas exchange falls, and the loss of elastic tissue means the airways tend to collapse during exhalation, trapping air.
Pulmonary fibrosis — scar tissue replaces healthy alveolar tissue, thickening the gas-exchange membrane. Oxygen diffusion slows because it must cross a greater distance; patients become breathless with exertion as their blood fails to reach adequate oxygenation.
Pneumothorax — air enters the pleural space (between the lung and chest wall), disrupting the pressure differential that keeps the lung inflated. The lung on the affected side collapses. A small pneumothorax can resolve on its own; a tension pneumothorax (where air accumulates under pressure) is a medical emergency.
Source: Global Initiative for Chronic Obstructive Lung Disease (GOLD), GOLD Report 2024 — COPD definition, staging, and mechanism of airflow obstruction.
Lungs and the Immune System
The lungs are among the most immunologically active organs in the body. Every breath carries not just oxygen and nitrogen but also bacteria, viruses, fungal spores, dust particles, and chemical irritants. The respiratory tract has layered defenses.
Mucus and cilia — from the trachea down to the terminal bronchioles, the airway is lined with pseudostratified ciliated epithelium coated in mucus. Inhaled particles stick to the mucus, and the cilia beat in coordinated waves (roughly 1,000 strokes per minute) to move the mucus — and its trapped particles — upward toward the pharynx, where it is swallowed or expelled. This is the mucociliary escalator.
Alveolar macrophages — resident immune cells that patrol the alveolar surfaces, engulfing (phagocytosing) particles and microbes that make it past the mucociliary escalator. They are the last line of defense before pathogens reach the bloodstream.
IgA antibodies — secreted into airway mucus, these immunoglobulins neutralize viruses and bacteria before they can penetrate the epithelium.
The relationship between lung defense and systemic immunity is explored further in how the immune system works.
Source: Whitsett, J.A. & Alenghat, T., Nature Immunology (2015) — Respiratory epithelial cells and the regulation of mucosal immunity in the lung.
Why You Can Hold Your Breath Only So Long — The CO2 Trigger
Most people assume the urge to breathe during a breath-hold is the body crying out for more oxygen. It is not. What forces you to take that next breath is rising carbon dioxide — specifically the acidification it causes in your blood and cerebrospinal fluid.
Definition — Chemoreceptors: Sensory neurons that detect chemical changes in body fluids. The brain's breathing centers receive continuous input from two sets: central chemoreceptors on the surface of the medulla oblongata (responding to CO2-driven pH changes in cerebrospinal fluid) and peripheral chemoreceptors in the carotid bodies and aortic bodies (responding to both CO2 and, at lower sensitivity, to falling oxygen).
When you hold your breath, cellular metabolism continues uninterrupted. Muscles and organs keep consuming oxygen and releasing CO2. Within 30–40 seconds of an average adult's breath-hold, dissolved CO2 in arterial blood rises enough to lower blood pH by a measurable margin. The central chemoreceptors register this pH shift and begin firing distress signals to the respiratory motor neurons in the pons and medulla. The result is the increasingly painful, involuntary urge to inhale that most people cannot suppress beyond 60–90 seconds.
Peripheral chemoreceptors in the carotid bodies — small nodules of chemosensitive tissue sitting at the bifurcation of the common carotid arteries in the neck — do monitor oxygen as well, but only become the dominant signal when blood oxygen (PO₂) falls below roughly 8 kPa, approximately half of normal resting arterial PO₂. In a typical breath-hold, oxygen has not fallen to this threshold by the time CO2 forces inhalation. Oxygen is not the limiting factor; CO2 is the alarm.
Source: Dempsey, J.A. et al., Comprehensive Physiology (2012) — Detailed treatment of chemoreceptor contributions to ventilatory control during exercise and voluntary apnea, confirming CO2/pH as the dominant stimulus for breath-hold termination in normoxic conditions.
Why hyperventilating before a breath-hold is dangerous
Here is where the physics turns lethal. If you hyperventilate — deliberately breathing rapidly and deeply before submerging — you drive down your blood CO2 to well below normal resting levels (a process called hypocapnia). The carotid body CO2 sensors go quiet. Your breath-hold now starts from a CO2 deficit: it takes much longer for rising CO2 to reach the threshold that triggers the break-point urge. Meanwhile, oxygen is still being consumed at a normal rate.
The danger is that blood oxygen can fall to levels causing loss of consciousness — PO₂ dropping below about 4–5 kPa — before CO2 has climbed high enough to force inhalation. Underwater, that means the swimmer blacks out silently, with no warning, and drowns. This is shallow water blackout (more precisely called hypoxic blackout or hyperventilation-induced loss of consciousness), and it kills otherwise fit, experienced swimmers every year. The victim typically appears to be swimming normally right up to the moment they go limp.
The critical lesson: pre-dive hyperventilation extends the breath-hold not by storing more oxygen but by suppressing the CO2 alarm that would otherwise rescue you in time.
The mammalian dive reflex: buying more time the honest way
The body has a legitimate — and genuinely dramatic — mechanism for extending underwater survival: the mammalian dive reflex. It is triggered not by voluntary effort but by cold water contact with the face, particularly around the nose and the trigeminal nerve distribution.
Within seconds of cold-water facial immersion, three coordinated changes activate simultaneously. Heart rate drops sharply (bradycardia), often falling 10–25% in casual swimmers and as much as 50% in trained freedivers. Blood vessels in the limbs and skin constrict strongly (peripheral vasoconstriction), shunting blood toward the brain and heart — the organs that cannot tolerate even brief hypoxia. The spleen contracts, squeezing out a reserve of oxygenated red blood cells into circulation, transiently raising the blood's oxygen-carrying capacity.
The net effect is a dramatic reduction in oxygen consumption by peripheral tissues. The same finite oxygen supply stretches considerably further when most of the body is effectively shut out of the queue. Elite competitive freedivers exploit this reflex deliberately, training in cold water and practicing facial immersion techniques to deepen the bradycardic response. World record static apnea performances — exceeding 24 minutes with prior oxygen loading — rely on the dive reflex as a physiological foundation, not just on lung capacity.
Source: Panneton, W.M., Frontiers in Physiology (2013) — Mechanistic review of the mammalian dive reflex: trigeminal afferent pathways, cardiovascular responses, splenic contraction, and comparative data across diving mammals and humans.
The interplay between the CO2 alarm and the dive reflex explains both the danger and the possibility in breath-hold diving. Suppress the CO2 signal artificially with hyperventilation and you remove the safety net. Let the reflex engage naturally through cold-water immersion and the body gracefully extends its oxygen budget — on its own terms, without deception.
Frequently Asked Questions
Q: Why do we yawn?
A: The most widely supported explanation is that yawning stretches the lungs and the intercostal muscles, helping redistribute surfactant across alveoli and briefly increasing ventilation. Some evidence also links yawning to brain temperature regulation. The "low oxygen" theory — that we yawn when oxygen drops — has been largely disproved by studies showing yawning is not triggered by reduced O₂ or elevated CO₂.
Q: Can you breathe pure oxygen indefinitely?
A: No. Breathing 100% oxygen at atmospheric pressure causes oxygen toxicity over hours to days: reactive oxygen species damage alveolar cells, leading to pulmonary edema and inflammation. Hyperoxia also suppresses the hypoxic drive in people who rely on it. Supplemental oxygen therapy uses concentrations well below 100% for this reason.
Q: Why do high altitudes make you breathless?
A: At high altitude, atmospheric pressure is lower. Oxygen still makes up 21% of air, but each breath contains fewer oxygen molecules. The partial pressure gradient driving diffusion into blood is smaller, so less oxygen loads onto hemoglobin per breath. Acclimatization involves increased breathing rate, higher red blood cell production (via erythropoietin), and chemical changes in hemoglobin's oxygen affinity.
Q: What is a "second wind" during exercise?
A: Second wind likely reflects the time needed for the cardiovascular and respiratory systems to reach the steady state demanded by exercise. During the first minutes of intense effort, there is a transient oxygen deficit as delivery systems ramp up. Once cardiac output, breathing rate, and muscle blood flow stabilize, the perception of effort eases.
Q: How do the lungs clear themselves of pollution?
A: Particles larger than about 10 micrometers are filtered in the nose and upper airway. Particles between 2.5–10 micrometers (PM10) are trapped by mucus in the conducting airways and cleared by the mucociliary escalator. Fine particles (PM2.5 and smaller) reach the alveoli and are handled by macrophages — but fine particles can overwhelm this system with chronic exposure, accumulating in alveolar tissue and causing inflammation.
Q: Why does cold air feel harder to breathe?
A: Cold, dry air irritates the bronchioles and can trigger reflexive bronchoconstriction, particularly in people with airway hyperreactivity. The effect is partly mechanical (cold reduces ciliary beating efficiency and thickens mucus) and partly inflammatory. Breathing through the nose helps because the nasal passages warm and humidify air before it reaches the lower airways.
Source: Carlsen, K.H. et al., British Journal of Sports Medicine (2008) — Airway hyperresponsiveness to cold air in athletes and general population.
The Takeaway
The lungs are a pressure engine and a diffusion machine simultaneously. The diaphragm creates the pressure gradient that moves air; 480 million alveoli then handle the chemistry of life — exchanging gases across a membrane one cell thick. The brainstem's CO₂ sensors, not your conscious will, decide how fast you breathe. When this system works well, you never think about it. When alveolar walls are lost to emphysema, surfactant is absent in a premature infant, or airways narrow in asthma, the fragility of the design becomes visible. The lungs run so efficiently under normal conditions that they leave you convinced breathing is trivial — which is exactly the point.
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

How Memory Works in the Brain: Encoding, Storage, and Forgetting
Memory is not a recording. It is a reconstruction — assembled fresh each time you recall it, from fragments stored across the cortex. Understanding how encoding, long-term potentiation, and retrieval actually work explains why memories are reliable enough to be useful and unreliable enough to be distorted.

How the Liver Works: The Body's Chemical Plant Explained
The liver performs over 500 distinct biochemical functions simultaneously, filters roughly 1.4 liters of blood per minute, produces 800–1,000 mL of bile per day, and is the only internal organ that can regrow itself after losing up to 70% of its mass. Here is how it manages all of that.

Why Do Our Ears Pop? The Science of Pressure Equalization
Every airplane climb or diving descent reminds us: the human ear is exquisitely sensitive to pressure change. The familiar pop occurs because the middle ear—a small air-filled chamber behind the eardrum—must equalize its pressure to match the ambient environment. When you yawn or swallow, the Eustachian tube opens to let air flow in or out, restoring balance. Altitude, diving, colds, and even weather shifts can create pressure mismatches that strain the tympanic membrane; when equalization finally succeeds, you feel the sudden relief of the pop.

Why Do Our Limbs Fall Asleep? The Science of Paresthesia
Sustained pressure compresses the nerves running through your limbs, blocking the electrical signals that carry sensation to your brain and creating numbness. When you shift position and release the pressure, those compressed nerves 'wake up' with a flood of erratic firing that produces the familiar 'pins and needles' tingling sensation called paresthesia. This temporary phenomenon is harmless and resolves in seconds, but understanding what happens reveals how your peripheral nervous system works and when similar sensations might signal something more serious.

Why Do We Get Motion Sickness? The Science of Sensory Conflict
Motion sickness strikes when your inner-ear vestibular system, eyes, and body position sensors send the brain conflicting motion signals. The leading explanation is the sensory-conflict theory, supported by the evolutionary toxin-detector hypothesis: your brain interprets the contradiction as a sign of poisoning and triggers nausea, sweating, and dizziness as a purge reflex. Reading in a moving car, standing below deck on a boat in rough seas, or piloting a flight simulator worsens the conflict. This response is ancient, rooted in survival.

Why Do We Have Eyebrows? The Science and Evolution
Eyebrows serve a dual purpose that touches on both biology and behavior. They channel sweat, rain, and debris away from the eyes, protecting our vision in wet or dusty environments. But more importantly, eyebrows communicate emotion and intent across distances, making them crucial for social bonding and face recognition. Humans evolved progressively smaller brow ridges and more mobile eyebrows than our archaic ancestors, supporting increasingly complex facial expression and nonverbal conversation.