The thymus is a small gland that trains your immune system’s most important white blood cells, called T cells, to recognize threats and ignore your own healthy tissue. It sits in your upper chest behind your breastbone, just in front of and above your heart, nestled between your lungs in an area called the mediastinum. Despite being relatively small, the thymus plays a role in immune function that lasts your entire life.
How the Thymus Trains T Cells
The thymus is essentially a school for immature immune cells. T cells are produced in your bone marrow, but they arrive at the thymus incomplete. They can’t yet distinguish a dangerous invader from your own body’s proteins. The thymus puts them through a two-stage screening process that determines which T cells survive and which get destroyed.
In the first stage, called positive selection, immature T cells pass through the outer layer of the thymus (the cortex). Here, they’re tested on whether they can interact with the molecules your body uses to flag cells for immune inspection. T cells that fail this basic competency test are eliminated. Only cells capable of reading your body’s immune signals move forward.
In the second stage, negative selection, the surviving T cells move into the inner layer of the thymus (the medulla). Specialized cells in this region display thousands of proteins found throughout your body, from your liver tissue to your skin cells to your pancreas. Any T cell that reacts aggressively to these self-proteins is killed off. This prevents autoimmune disease by weeding out cells that would otherwise attack your own organs. The thymus also generates a special class of regulatory T cells during this process. These cells act as peacekeepers in your immune system, actively suppressing any self-reactive immune responses that slip through.
The entire system is remarkably thorough. An estimated 95 to 98 percent of T cells that enter the thymus don’t survive the screening. The small fraction that passes both tests are mature, functional T cells that can fight infections without turning on your own body.
Where It Is and How It Changes With Age
The thymus is a pinkish-gray gland made up of two irregularly shaped lobes covered in small bumps called lobules. It’s quite large in babies and children, growing steadily until it reaches its peak weight of about 1 ounce during puberty. After puberty, it begins to shrink and is gradually replaced by fatty tissue. By older adulthood, it’s rather small.
This shrinking process, called involution, is one reason immune function declines with age. The thymus produces fewer and fewer new T cells as it gets smaller. Your body compensates by relying on the large pool of mature T cells it built up during childhood and adolescence, but the supply of fresh, newly trained T cells drops significantly.
Hormones the Thymus Produces
The thymus also functions as an endocrine gland, producing hormones that support T cell development. These hormones stimulate the maturation of T cells within the thymus and help regulate immune activity elsewhere in the body. The thymus’s hormone production follows the same trajectory as its size: most active during childhood and tapering off after puberty.
What Happens When the Thymus Is Missing
The clearest evidence of the thymus’s importance comes from people born without one. DiGeorge syndrome is a congenital condition in which the thymus is absent or severely underdeveloped at birth. Because T cells can’t mature without thymic training, children with this condition have dangerously low T cell counts and are vulnerable to infections from the moment they’re born. For children who have no functional T cells at all, the condition is fatal unless thymus tissue can be transplanted. In milder cases, T cell function varies and can sometimes improve on its own over time.
Why the Thymus Still Matters in Adults
For decades, the shrinking of the thymus after puberty led many to assume it was expendable in adults. A large study published in Blood Advances challenged that assumption. Researchers found that adults who had their thymus removed during surgery had more than twice the five-year risk of death compared to similar patients who kept theirs. The risk of developing cancer was also more than doubled in the five-year window after surgery.
Over multiple decades of follow-up, the increased risks persisted. Cancer accounted for nearly 64 percent of deaths in the group that had their thymus removed, compared to about 30 percent in the control group. People who developed cancer after thymus removal also experienced significantly higher rates of cancer relapse despite receiving definitive treatment (60 percent versus 32 percent).
Interestingly, thymus removal did not increase the risk of heart disease or cardiovascular death, suggesting the thymus’s ongoing contribution in adulthood is specifically tied to immune surveillance, the process by which T cells detect and destroy abnormal cells before they become cancerous.
Thymus Conditions
The thymus can be affected by two main categories of problems: abnormal growth and tumors. True thymic hyperplasia is an enlargement of the gland with an increase in normally organized thymus tissue beyond what’s expected for a person’s age. Lymphoid hyperplasia is different. It involves an increase in immune cell clusters within the thymus, and the gland itself may not even be enlarged. Lymphoid hyperplasia is sometimes associated with autoimmune conditions like myasthenia gravis.
Thymomas are tumors that arise from the thymus. They range from slow-growing and contained to more aggressive forms. Because the thymus sits in the chest near the heart and lungs, even benign growths can cause symptoms like chest pain, coughing, or difficulty breathing if they press on surrounding structures. Imaging techniques like CT, MRI, and PET scans help distinguish between harmless enlargement and tumors that need treatment.

