Your immune system depends on a steady supply of nutrients to work normally. Vitamin D, omega-3 fatty acids and dietary fiber are three of the best-studied: vitamin D is involved in how immune cells respond and stay in balance, omega-3s shape the signaling molecules involved in inflammation, and fiber feeds gut bacteria that interact with immune cells. Diet supports normal immune function, but it does not replace medical care, and anyone with a diagnosed condition should plan diet changes with their care team.
Key Takeaways
- The NIH says adequate intakes of vitamins A, C, D and E, selenium and zinc are important for normal immune function, and a varied diet is the foundation.
- Almost all immune cells carry the vitamin D receptor, and vitamin D is involved in regulating both innate and adaptive immune responses. Adults need 15 to 20 mcg (600 to 800 IU) a day.
- Omega-3s EPA and DHA form signaling molecules that tend to be less inflammatory than those made from omega-6 fats; fatty fish is the main food source.
- Fiber is fermented by gut bacteria into short-chain fatty acids, which interact with immune cells. Americans average about 16 g a day, below the 21 to 38 g recommended.
- Clinical trials of specific diets are small and varied, and responses are individual. Plan any elimination or restrictive diet with a clinician or registered dietitian.
Evidence grade: Moderate. NIH fact sheets establish reference intakes and the roles of vitamin D, omega-3s and other nutrients in normal immune function, but human trials of specific diets for immune balance are small, varied and often low certainty.
How the Immune System Relies on Nutrition
The immune system has two broad arms. The innate system is the first line of defense: physical barriers like the skin and gut lining, plus white blood cells such as neutrophils, macrophages and natural killer cells. The adaptive system, made up of B cells that make antibodies and T cells, develops over days to weeks and builds immune memory.
Inflammation is a normal part of the immune response that helps clear threats and start healing; keeping it in balance is what people usually mean by "immune regulation."
According to the NIH Office of Dietary Supplements (ODS), getting enough vitamins A, C, D and E, selenium and zinc is important for proper immune function, and clinical deficiencies of these nutrients weaken immunity. The ODS also notes that a nutritious variety of foods helps maintain overall good health and a strong immune system. For a nutrient-by-nutrient overview, see our guide to essential vitamins for immune function.
Vitamin D and Immune Regulation
Vitamin D is best known for helping the body absorb calcium, but it also plays a role in immune function. The ODS explains that almost all immune cells, including B and T cells, express the vitamin D receptor. Some immune cells, such as macrophages and dendritic cells, can even convert vitamin D into its active form. These findings suggest vitamin D helps modulate both innate and adaptive immune responses. Research also links vitamin D to the activity of T-regulatory cells, a type of T cell involved in keeping immune responses in check.
The body makes vitamin D when skin is exposed to sunlight, and a few foods supply it naturally. The RDA for adults is 15 to 20 mcg (600 to 800 IU) a day. The Food and Nutrition Board considers a blood 25-hydroxyvitamin D level of 20 ng/mL (50 nmol/L) or more adequate for bone and overall health in most people.
Food sources of vitamin D
The ODS lists 3 ounces of cooked sockeye salmon at about 14.2 mcg (570 IU), 3 ounces of farmed rainbow trout at about 16.2 mcg (645 IU), and a cup of vitamin D-fortified 2% milk at about 2.9 mcg (120 IU). Fortified foods, especially milk, provide most of the vitamin D in American diets. Egg yolks, cheese and beef liver contain small amounts.
Omega-3 Fatty Acids and Inflammatory Balance
Omega-3s are polyunsaturated fats found in fatty fish, flaxseed, chia seeds and walnuts. Most research focuses on the long-chain omega-3s EPA and DHA, which come mainly from fish and fish oil. The plant omega-3 ALA has an adequate intake of 1.1 to 1.6 g a day for adults, but the body converts less than 1% of ALA into DHA, so eating EPA and DHA directly is the practical way to raise them.
Omega-3s are built into cell membranes and form eicosanoids, signaling molecules that affect the immune, cardiovascular and other systems. Eicosanoids made from omega-6 fats tend to be more potent drivers of inflammation. The ODS explains that a higher ratio of omega-3s to omega-6s tips this balance toward less inflammatory activity, and that higher EPA and DHA intakes and blood levels are associated with lower levels of inflammatory cytokines such as interleukin-1 and interleukin-6. Immune cells readily take up EPA and DHA, which may also affect how those cells work.
The ODS lists 3 ounces of cooked farmed Atlantic salmon at about 1.24 g DHA and 0.59 g EPA. Learn more in our article on the benefits of omega-3 fatty acids.
Nutrients Involved in Immune Balance at a Glance
| Nutrient | Role described by NIH and research | Daily reference for adults | Food sources |
|---|---|---|---|
| Vitamin D | Receptor found on almost all immune cells; involved in innate and adaptive responses and T-regulatory cell activity | RDA 15 to 20 mcg (600 to 800 IU); upper limit 100 mcg (4,000 IU) | Fatty fish, fortified milk and plant milks, egg yolks, UV-exposed mushrooms |
| Omega-3s (EPA, DHA, ALA) | Form less inflammatory eicosanoids than omega-6 fats; higher EPA/DHA levels associated with lower inflammatory cytokines | ALA adequate intake 1.1 to 1.6 g; no set intake for EPA/DHA | Salmon, herring, trout, flaxseed, chia seeds, walnuts |
| Dietary fiber | Fermented by gut bacteria into short-chain fatty acids that interact with immune cells | 21 to 38 g (MedlinePlus) | Beans and peas, whole grains, fruits, vegetables |
| Vitamins A, C, E, zinc, selenium | Needed for proper immune function; deficiencies weaken immunity | See NIH fact sheets for each nutrient | Varied whole-food diet |
Fiber, the Gut Microbiome and Immune Signaling
The gut lining is one of the immune system's main physical barriers, and the trillions of bacteria living there constantly interact with immune cells. A 2018 review in Cell Host & Microbe explains that dietary fibers interact directly with gut microbes, which ferment them into key metabolites called short-chain fatty acids. These metabolites influence both microbial ecology and host physiology.
A 2013 study in Science found that short-chain fatty acids regulated the size and function of the colonic T-regulatory cell pool in mice. That was animal research, and it does not show the same effect in people, but it helps explain why fiber is a focus of immune research.
MedlinePlus reports that Americans eat about 16 grams of fiber a day on average, while older children, adolescents and adults are advised to eat 21 to 38 grams. Good sources include beans and peas, whole grains, fruits and vegetables. Add fiber gradually over a few weeks; a large jump can cause gas, bloating and cramps.
Probiotics and Fermented Foods
Probiotics are live microorganisms, such as certain Lactobacillus and Bifidobacterium strains, found in some fermented foods and supplements. The ODS notes that they act mainly in the gut and might support immune function by strengthening the gut barrier and influencing immune cells, but the mechanisms are unclear and study results are inconsistent. Findings for one strain cannot be applied to others. Our guide to probiotics and gut health covers the basics.
What Clinical Diet Studies Have Measured
Much of the research on diet and immune balance was done in people already living with immune-related conditions. The results are mixed and do not translate into one diet for everyone.
- Rheumatoid arthritis: A 2021 systematic review in Nutrition Reviews identified 70 human studies of diets, supplements and fasting. The trials measured disease-activity scores and symptoms. Some high-dose omega-3 and Mediterranean-diet trials reported improvements in some measures, fasting produced only short-lived changes, and responses to vegetarian, elimination and other diets were highly individual. The authors recommended that nutrition be routinely addressed as part of care.
- Multiple sclerosis: A 2020 Cochrane review found 30 trials of dietary interventions, including omega-3 and other polyunsaturated fats, antioxidants and structured diet programs. Every trial had methodological problems. The reviewers found little to no difference in relapses or disability for most comparisons, with evidence rated low or very low certainty. The ODS similarly reports that vitamin D supplementation does not appear to change the signs and symptoms of the condition.
- Celiac disease: This is the one immune-related condition where a specific diet is the standard medical approach. The NIDDK says people diagnosed with celiac disease need to follow a gluten-free diet for life, planned with a doctor or registered dietitian.
In short, nutrition is part of the picture, but no diet has been shown to replace treatment, and results in one condition do not carry over to another.
Elimination and Restrictive Diets: Why Supervision Matters
Elimination diets remove foods and reintroduce them one at a time to look for personal reactions, but removing whole food groups can leave nutrient gaps.
Gluten is a good example. The NIDDK advises talking with a doctor about testing before starting a gluten-free diet, because avoiding gluten first can make celiac test results inaccurate. It also warns that cutting gluten without guidance may leave a diet short on fiber, iron and calcium, and that some packaged gluten-free foods are higher in fat and sugar. If you are considering going gluten-free without a diagnosis, our article Is gluten-free right for you? walks through the questions to ask.
Building an Eating Pattern That Supports Immune Balance
A practical, research-aligned approach centers on whole foods rather than any single nutrient:
- Eat fatty fish such as salmon, trout or herring regularly for EPA, DHA and vitamin D.
- Build meals around vegetables, fruits, beans and whole grains to move toward 21 to 38 grams of fiber.
- Include plant omega-3 sources like ground flaxseed, chia seeds and walnuts.
- Choose fortified milk or plant milks if you eat little fish.
- Try fermented foods if you enjoy them, keeping in mind that benefits are strain-specific.
For meal ideas built on these foods, see our anti-inflammatory diet guide.
If You Have a Diagnosed Condition, Plan With Your Care Team
If you live with an immune-related condition, talk with your doctor or a registered dietitian before you change your diet or add supplements. They can check your nutrient levels, keep a restrictive plan complete, and watch for interactions with your medicines. Keep following your prescribed treatment; diet changes work alongside it, not in place of it.
Safety and Interactions
- Vitamin D: The upper limit for adults is 100 mcg (4,000 IU) a day from all sources, unless a clinician advises otherwise. Thiazide diuretics combined with vitamin D supplements may raise blood calcium, especially in older adults and people with reduced kidney function. Corticosteroids such as prednisone can impair vitamin D metabolism, and orlistat can reduce vitamin D absorption. Talk to your doctor or pharmacist if you take any of these.
- Omega-3s: Side effects are usually mild, such as an unpleasant taste, bad breath, heartburn, nausea and loose stools. The FDA considers supplements providing up to 5 g a day of EPA and DHA safe when used as recommended. Fish oil may prolong clotting time in people taking warfarin, so talk to your doctor if you take warfarin or another blood thinner.
- Probiotics: The risk of harmful effects is greater in people with severe illness or a compromised immune system. If you take medicine that suppresses the immune system, ask your clinician first.
- Fiber: Increase it gradually and drink fluids to reduce gas and bloating.
Frequently Asked Questions
What nutrients does the immune system need to work normally?
The NIH highlights vitamins A, C, D and E, selenium and zinc. A varied diet with fish, vegetables, fruits, beans, whole grains and nuts covers most needs.
How is vitamin D involved in immune function?
Almost all immune cells carry the vitamin D receptor, and vitamin D appears to help modulate both innate and adaptive immune responses. Adults need 15 to 20 mcg (600 to 800 IU) a day.
Do omega-3 fats help keep inflammation in balance?
EPA and DHA form signaling molecules that tend to be less inflammatory than those made from omega-6 fats, and higher omega-3 levels are associated with lower inflammatory cytokines. Fatty fish is the richest food source.
Should I go gluten-free or try an elimination diet?
A gluten-free diet is essential for people diagnosed with celiac disease, but there is no general reason for everyone to avoid gluten. If you suspect a problem, get tested before cutting gluten, and plan any elimination diet with a doctor or dietitian so it stays nutritionally complete.
Can probiotics support immune health?
Probiotics might support the gut barrier and immune cell activity, but results are inconsistent and depend on the specific strain. People with a weakened immune system should talk to a clinician before using them.
Should I change my diet if I have a medical condition?
Talk to your care team first. They can check your nutrient levels, help you avoid gaps, and make sure diet changes fit with your treatment and medications.
Sources
- NIH Office of Dietary Supplements. Dietary Supplements for Immune Function and Infectious Diseases: Health Professional Fact Sheet. 2025.
- NIH Office of Dietary Supplements. Vitamin D: Health Professional Fact Sheet. 2025.
- NIH Office of Dietary Supplements. Omega-3 Fatty Acids: Health Professional Fact Sheet. 2025.
- MedlinePlus Medical Encyclopedia. Fiber. National Library of Medicine. 2026.
- Makki K, Deehan EC, Walter J, Bäckhed F. The Impact of Dietary Fiber on Gut Microbiota in Host Health and Disease. Cell Host Microbe. 2018.
- Smith PM, Howitt MR, Panikov N, et al. The microbial metabolites, short-chain fatty acids, regulate colonic Treg cell homeostasis. Science. 2013.
- National Center for Complementary and Integrative Health. Probiotics: Usefulness and Safety. 2019.
- Philippou E, Petersson SD, Rodomar C, Nikiphorou E. Rheumatoid arthritis and dietary interventions: systematic review of clinical trials. Nutr Rev. 2021.
- Parks NE, Jackson-Tarlton CS, Vacchi L, Merdad R, Johnston BC. Dietary interventions for multiple sclerosis-related outcomes. Cochrane Database Syst Rev. 2020.
- National Institute of Diabetes and Digestive and Kidney Diseases. Eating, Diet, & Nutrition for Celiac Disease. 2020.
Disclosure: OPA Nutrition sells supplements, including products mentioned in this article. This content is for education only and is not medical advice. Statements about dietary supplements have not been evaluated by the Food and Drug Administration. These products are not intended to diagnose, treat, cure, or prevent any disease. Talk to your healthcare provider before using any supplement, especially if you take medication or have a medical condition.
Written and reviewed by Michael Gonzales, Founder, OPA Nutrition · Last reviewed: · How OPA researches and writes
