The thymus is a small organ in your chest that trains your immune system to fight infections. It acts as a kind of boot camp for white blood cells called T cells, teaching them to recognize threats while leaving your own healthy tissue alone. The thymus is most active during childhood and gradually shrinks after puberty, but it continues to influence your immune health throughout your entire life.
Where the Thymus Is Located
The thymus sits in your upper chest, directly behind your breastbone and just in front of and above your heart. It’s nestled between your lungs in an area called the mediastinum. In babies and children, the thymus is relatively large, reaching its peak weight of about one ounce around puberty. After that, it slowly shrinks and is replaced by fatty tissue, a process that begins surprisingly early, within the first year of life, and continues at a rate of roughly 3% per year during adulthood.
Despite this shrinking, the thymus doesn’t disappear entirely. Studies on adults up to age 56 have found that the organ still actively produces functional T cells, though at a much lower rate than in childhood. So while your thymus does most of its heavy lifting early on, it never fully retires.
How the Thymus Trains Your Immune System
The thymus has one critical job: turning immature white blood cells into fully functional T cells. T cells are the soldiers of your immune system, responsible for identifying and destroying infected or abnormal cells. But before they’re released into your bloodstream, they need to pass a two-part quality control process inside the thymus.
The first test is called positive selection. Immature cells enter the outer layer of the thymus (the cortex) and are checked to see whether they can recognize proteins displayed on your own cells. This is essential because T cells need to interact with your body’s normal signaling system to detect anything unusual. Cells that can’t do this are useless and die off. Those that pass move deeper into the thymus.
The second test is negative selection, and it works in the opposite direction. Here, T cells that react too strongly to your own tissue are eliminated. If these cells were released into your body, they would attack healthy organs, causing autoimmune disease. Cells that fail this test are destroyed within 4 to 12 hours. Only T cells that pass both tests, able to recognize threats but tolerant of your own body, graduate and enter your bloodstream.
This entire selection process sorts T cells into two main types. One type (CD4 cells, sometimes called helper T cells) coordinates immune responses. The other type (CD8 cells, or killer T cells) directly destroys infected or cancerous cells. Which type a cell becomes depends on what it interacts with during its training.
The Thymus as a Hormone-Producing Gland
Beyond physically housing T cells during their development, the thymus also functions as an endocrine gland. It produces hormones that stimulate T cell growth and maturation, both inside the thymus and elsewhere in the body. These hormones help signal immature immune cells to develop properly and play a supporting role in keeping the immune system responsive, particularly during childhood when the thymus is most active.
Why a Shrinking Thymus Matters
The gradual shrinking of the thymus is one reason your immune system becomes less effective as you age. With less functional thymic tissue, your body produces fewer new T cells. Instead, you rely increasingly on the memory T cells you built up earlier in life. This means your body is still good at fighting infections it has seen before, but it becomes slower at responding to entirely new threats, which partly explains why older adults are more vulnerable to novel infections and certain cancers.
Research on what happens when the thymus is surgically removed in adults paints a stark picture. A large study comparing more than 1,500 adults who had their thymus removed with a control group found that people who underwent the surgery had double the five-year mortality rate and double the cancer incidence. The increased mortality was driven by cancer rather than heart disease. Immune profiling showed that people without a thymus developed a pattern resembling accelerated immune aging: fewer new T cells, less diversity in their immune defenses, and higher levels of inflammation. Researchers believe this may reduce the body’s ability to detect and destroy cancerous cells before they take hold.
Conditions That Affect the Thymus
DiGeorge Syndrome
DiGeorge syndrome is a genetic condition where the thymus is underdeveloped or completely absent from birth. Without a functioning thymus, children produce very few T cells and are highly vulnerable to infections, which begin soon after birth and recur frequently. The condition also affects the heart and parathyroid glands and causes distinctive facial features, including low-set ears, a small receding jaw, and wide-set eyes. Doctors typically suspect DiGeorge syndrome based on these signs and confirm it with blood tests measuring T cell counts and genetic testing.
Thymoma
A thymoma is a tumor that grows in the thymus. These tumors are uncommon and often slow-growing, but they can disrupt normal thymic function and are strongly linked to autoimmune problems, particularly myasthenia gravis.
Myasthenia Gravis
The thymus plays a central role in myasthenia gravis, a condition where the immune system attacks the connections between nerves and muscles, causing weakness and fatigue. In most people with this condition, the thymus is abnormal. It either shows overgrowth of immune tissue (called hyperplasia) or contains a thymoma. Research has found that the thymus in these patients harbors T cells that are specifically reactive against a receptor on muscle cells. The current theory is that the disease may actually originate inside the thymus, where something goes wrong in the selection process, and self-attacking T cells escape into the body instead of being eliminated. Surgical removal of the thymus is one of the standard treatments and often improves symptoms.
What the Thymus Means for Overall Health
The thymus is easy to overlook because it’s small, hidden, and does most of its work before you’re old enough to think about it. But the T cells it produces during childhood form the foundation of your adaptive immune system for the rest of your life. Every time your body fights off a virus, rejects a cancerous cell, or responds to a vaccine, it’s relying on the immune education that started in the thymus. The organ’s quiet decline with age is now understood to be one of the key drivers of immune aging, making it far more important than its size would suggest.

