Lower respiratory tract

Thoracic Cavity (Chest Cavity)

The thoracic cavity, or chest cavity, is the space inside the rib cage above the diaphragm that holds the lungs, the heart and the great vessels. It is divided into two pleural cavities, one around each lung, and the central mediastinum, and it changes size with every breath to move air through the lower respiratory tract.

Comparison diagram of the three compartments of the thoracic cavity: the two pleural cavities and the mediastinum
The thoracic cavity has three compartments: a pleural cavity around each lung on the sides and the mediastinum in the middle, which holds the heart, great vessels, trachea and esophagus.

At a Glance

The thoracic cavity is the upper part of the ventral body cavity, enclosed by the rib cage, sternum and thoracic spine and closed below by the diaphragm. It contains three compartments: the right and left pleural cavities, each surrounding a lung, and the mediastinum in the middle, which holds the heart, trachea, esophagus and great vessels.

Location
Chest, inside the rib cage, between the neck and the diaphragm
Compartments
Right pleural cavity, left pleural cavity and the mediastinum
Main contents
Lungs, heart, great vessels, trachea, esophagus, thymus and major nerves
Function
Houses and protects the chest organs and changes volume for breathing
Boundaries
Thoracic inlet above, chest wall around, diaphragm below
Part of
Ventral body cavity, together with the abdominopelvic cavity
On this page
  1. What Is the Thoracic Cavity?
  2. Where Is the Thoracic Cavity Located?
  3. What Are the Divisions of the Thoracic Cavity?
  4. What Organs Are in the Thoracic Cavity?
  5. What Is the Thoracic Cavity Function in the Respiratory System?
  6. How Is the Thoracic Cavity Different From the Abdominal Cavity?
  7. Common Conditions That Affect the Thoracic Cavity
  8. Key Facts
  9. Quiz
  10. FAQ

What Is the Thoracic Cavity?

The thoracic cavity is the enclosed space of the chest, bounded by the rib cage and its muscles and closed below by the diaphragm. It is the upper of the two parts of the ventral body cavity; the lower part, below the diaphragm, is the abdominopelvic cavity. The organs of breathing and circulation that need both protection and room to move, the lungs and the heart, sit inside it.

Thoracic cavity definition

In anatomy, the thoracic cavity is defined as the body cavity enclosed by the thoracic wall, extending from the superior thoracic aperture at the root of the neck down to the diaphragm. It is lined by serous membranes: the pleura around the lungs and the pericardium around the heart. The terms thoracic cavity and chest cavity mean the same thing.

Explained simply

Think of the chest as a room with walls made of ribs, a back wall made of the spine and a moving floor made of the diaphragm. Inside the room are two soft, inflatable lungs on the sides and the heart in the middle. When the walls move out and the floor moves down, the room gets bigger and air rushes into the lungs.

Where Is the Thoracic Cavity Located?

The thoracic cavity is located in the upper trunk, inside the rib cage, between the root of the neck above and the diaphragm below. It is smaller than the outside of the chest suggests, because the domed diaphragm rises high under the lower ribs and the thoracic vertebrae bulge forward into the back of the cavity.

Thoracic cavity boundaries

  • Top: the superior thoracic aperture, also called the thoracic inlet, a small ring formed by the first thoracic vertebra, the first ribs and the top of the sternum. The trachea, esophagus, great vessels and nerves pass through it.
  • Front: the sternum and the costal cartilages.
  • Sides: the ribs and the intercostal muscles between them.
  • Back: the 12 thoracic vertebrae and the back parts of the ribs.
  • Floor: the diaphragm, which closes the much wider inferior thoracic aperture.

The diaphragm is pierced by passages that link the chest to the abdomen. The inferior vena cava passes through it at about the level of the 8th thoracic vertebra, the esophagus at about the 10th and the aorta at about the 12th, as described on our openings of the diaphragm page. The right dome of the diaphragm usually sits a little higher than the left, because the liver lies beneath it.

Layered diagram of the chest wall from the skin inward: skin, muscles, ribs and intercostal muscles, endothoracic fascia, parietal pleura
To reach the thoracic cavity from outside, you pass through skin and fat, the chest muscles, the ribs with their intercostal muscles, the endothoracic fascia and finally the parietal pleura.

What Are the Divisions of the Thoracic Cavity?

The thoracic cavity is divided into three compartments: a right pleural cavity, a left pleural cavity and the mediastinum between them. Each compartment is sealed from the others by membranes, so a problem on one side, such as air or fluid in the pleural space, usually stays there.

The pleural cavities

Each side of the chest holds a lung wrapped in a two-layered membrane, the pleura. The thin space between the layers is the pleural cavity, which contains only a film of lubricating fluid; strictly speaking, the lung lies outside this space, pressed against it. The two pleural cavities fill most of the width of the chest.

The mediastinum

The mediastinum is the central partition of the chest, running from the sternum in front to the spine behind and from the thoracic inlet to the diaphragm. An imaginary plane through the sternal angle and the disc between the 4th and 5th thoracic vertebrae splits it into a superior and an inferior mediastinum. The inferior part is subdivided into anterior, middle and posterior regions, and the middle region holds the heart inside the pericardial cavity, a third serous space within the chest.

What Organs Are in the Thoracic Cavity?

The thoracic cavity contains the two lungs, the heart and the great blood vessels, the trachea and main bronchi, the esophagus, the thymus, the thoracic duct and several major nerves. The table below shows where each one sits and what it does.

The lungs take up most of the space: the right lung has three lobes and the left lung two, leaving room for the heart. Each lung is joined to the mediastinum only at its root, the hilum, where the bronchi, pulmonary arteries and pulmonary veins enter and leave. The trachea runs down the superior mediastinum and divides into the two main bronchi at about the level of the sternal angle.

Just behind the trachea lies the esophagus, a muscular food tube that crosses the whole chest before passing through the diaphragm; our trachea vs esophagus page compares the two. The phrenic nerves, which drive the diaphragm, run down each side of the heart, while the vagus nerves pass behind the lung roots to supply the heart, lungs and gut.

Contents of the thoracic cavity by compartment
StructureCompartmentMain job
Right lungRight pleural sacGas exchange; has three lobes
Left lungLeft pleural sacGas exchange; has two lobes and a notch for the heart
Heart in its pericardiumMiddle mediastinumPumps blood through the lungs and the body
TracheaSuperior mediastinumCarries air down to the two main bronchi
EsophagusSuperior and posterior mediastinumCarries swallowed food and liquid to the stomach
Thoracic aortaSuperior and posterior mediastinumCarries oxygen-rich blood to the body
Superior and inferior venae cavaeSuperior and middle mediastinumReturn oxygen-poor blood to the right atrium
Pulmonary trunk and arteriesMiddle mediastinum and lung rootsCarry oxygen-poor blood to the lungs
Pulmonary veinsLung roots and middle mediastinumReturn oxygen-rich blood to the left atrium
ThymusSuperior and anterior mediastinumHelps T cells mature; largest in childhood
Thoracic ductPosterior and superior mediastinumMain lymph vessel, returns lymph to the veins
Phrenic nervesMiddle mediastinum, beside the pericardiumCarry the signals that contract the diaphragm
Vagus nervesSuperior and posterior mediastinumSupply the heart, airways and digestive tract
Source: Typical adult anatomy, our editors

What Is the Thoracic Cavity Function in the Respiratory System?

In the respiratory system, the thoracic cavity acts as an adjustable chamber: when it grows larger, pressure in the lungs falls and air flows in, and when it shrinks, pressure rises and air flows out. Its volume changes in three directions during every breath.

  1. Top to bottom: the diaphragm contracts and descends, the largest single change in quiet breathing.
  2. Front to back: the upper ribs and sternum swing up and forward.
  3. Side to side: the lower ribs swing up and outward.

The lungs follow these changes because the pleura couples them to the chest wall, and the resulting pressure differences drive air through the airways; the full sequence is on our mechanics of breathing page. The muscles that do the work are described under muscles of respiration, and the amount of air moved is covered in lung volumes and capacities.

Chest cavity function beyond breathing

The thoracic cavity also protects the heart and lungs, gives the heart room to beat, and provides a passage for the trachea, esophagus, vessels and nerves between the neck and the abdomen. The falling pressure in the chest during each breath in also helps draw venous blood back toward the heart, an effect called the respiratory pump, which links breathing with pulmonary circulation and the rest of the circulation.

How Is the Thoracic Cavity Different From the Abdominal Cavity?

The thoracic cavity lies above the diaphragm and holds the lungs and heart inside a bony rib cage, while the abdominal cavity lies below it and holds the digestive organs inside mostly muscular walls. Both are parts of the ventral body cavity, and the diaphragm is the moving wall they share.

Their linings differ too. The thoracic cavity is lined by the pleura and pericardium, while the abdominal cavity is lined by the peritoneum. During each breath in, the diaphragm moves down, so the chest gains volume while the abdominal organs are pushed down and forward, which is why the belly rises during quiet breathing. Because the diaphragm domes so high, the upper abdominal organs, including the liver, stomach and spleen, lie partly under the shelter of the lower ribs even though they sit in the abdominal cavity.

Comparison chart of the thoracic cavity and the abdominal cavity: position, walls, lining, organs and changes during breathing
The diaphragm separates the thoracic cavity above from the abdominal cavity below; both belong to the ventral body cavity but have different walls, linings and organs.

Common Conditions That Affect the Thoracic Cavity

Conditions of the thoracic cavity include air, fluid or blood collecting in the pleural spaces, injuries to the chest wall, masses in the mediastinum and organs passing through the diaphragm from below. Our respiratory diseases section covers the lung conditions in more detail, and anyone with chest pain or difficulty breathing should see a doctor.

  • Pneumothorax: air in a pleural cavity, which lets the lung on that side partly or fully collapse.
  • Pleural effusion and hemothorax: fluid or blood collecting in a pleural cavity and pressing on the lung.
  • Chest wall injury: rib fractures or a flail chest that make breathing painful or less effective.
  • Mediastinal masses: growths of the thymus, lymph nodes or nerves that can press on the airways or vessels.
  • Hiatal hernia: part of the stomach sliding up into the chest through the esophageal opening of the diaphragm.
  • Pectus excavatum: a sunken sternum that makes the front-to-back depth of the chest smaller.

Key Facts

  • The thoracic cavity, or chest cavity, is the space inside the rib cage, closed below by the diaphragm.
  • It has three compartments: the right and left pleural cavities and the central mediastinum.
  • The heart sits in the middle mediastinum inside its own serous sac, the pericardial cavity.
  • The top opening, the superior thoracic aperture or thoracic inlet, is formed by the first thoracic vertebra, the first ribs and the manubrium.
  • The inferior vena cava, esophagus and aorta pass through the diaphragm at about the 8th, 10th and 12th thoracic vertebrae.
  • During inhalation the thoracic cavity enlarges top to bottom, front to back and side to side, lowering the pressure in the lungs.
  • The thoracic cavity and the abdominopelvic cavity together make up the ventral body cavity.
Did you know? The name of the chest's top opening is confusing: anatomists call it the thoracic inlet, but doctors often call the same region the thoracic outlet, as in thoracic outlet syndrome.

Quick Quiz: Test What You Know About the Thoracic Cavity

6 questions. Tap an answer to check it.

  1. What forms the floor of the thoracic cavity?

  2. Which compartment of the thoracic cavity holds the heart?

  3. How many pleural cavities are there in the thoracic cavity?

  4. The thoracic cavity is part of which larger body cavity?

  5. At about which vertebral level does the aorta pass through the diaphragm?

  6. Which structure divides the mediastinum into superior and inferior parts?

Frequently Asked Questions

Are the thoracic cavity and the chest cavity the same thing?

Yes. Thoracic cavity is the anatomical term and chest cavity is the everyday term for the same space: the region inside the rib cage, above the diaphragm, that holds the lungs, the heart and the great vessels. Thorax comes from the Greek word for breastplate, which is also why the ribs are called the thoracic cage.

Is the heart in the thoracic cavity?

Yes. The heart lies in the thoracic cavity, in the middle part of the mediastinum, between the two lungs and slightly to the left. It is wrapped in its own double-layered sac, the pericardium, which encloses a thin pericardial cavity. The heart is not inside either pleural cavity; those spaces surround only the lungs.

Are the lungs inside the pleural cavity?

Not strictly. Each lung lies inside its pleural sac, but the pleural cavity is only the thin space between the visceral pleura on the lung and the parietal pleura on the chest wall. The lung is wrapped by the inner layer and pressed against the cavity, much like a fist pushed into a soft balloon. In everyday speech, though, people often say the lungs sit in the pleural cavities.

What separates the thoracic cavity from the abdominal cavity?

The diaphragm separates the thoracic cavity from the abdominal cavity. This dome-shaped sheet of muscle and tendon attaches all around the lower edge of the rib cage and the lumbar spine. It has openings that let the inferior vena cava, the esophagus and the aorta pass between the two cavities, along with smaller nerves and vessels.

What is the thoracic cavity lined with?

The thoracic cavity is lined by serous membranes. The parietal pleura lines the chest wall, the upper surface of the diaphragm and the sides of the mediastinum, and the visceral pleura covers each lung. The heart has its own lining, the pericardium. Between the chest wall and the parietal pleura lies a thin layer of connective tissue called the endothoracic fascia.

What are the dorsal and ventral body cavities?

The body has two main cavities. The dorsal body cavity, at the back, contains the cranial cavity with the brain and the vertebral canal with the spinal cord. The ventral body cavity, at the front, is larger and is split by the diaphragm into the thoracic cavity above and the abdominopelvic cavity below, which holds the digestive, urinary and reproductive organs.

Why is the thoracic cavity smaller than the chest looks?

From the outside, the chest seems to reach down to the lower ribs, but the diaphragm bulges up into the rib cage like a dome, so the liver, stomach and spleen take up the lowest part of the space the ribs enclose. The thoracic vertebrae also project forward into the back of the cavity, giving it a kidney-shaped cross-section.

References

The Respiratory System Editorial Team
Written and fact-checked by our editors against current anatomy and physiology references. Every diagram on this page is our own. Read our editorial policy. Last updated November 2026. For education only, not medical advice.