The human body may need vitamins and minerals in small amounts, but these building blocks have an immense impact. Missing out on any of them can have serious consequences on health and nutrition.

“Vitamins and minerals help your body do what it needs to in terms of everyday functioning, from proper digestion to immunity,” says Shelley Maniscalco, founder and president of Nutrition on Demand. Magnesium, for example, is needed in more than 300 reactions in the body and helps with muscle and nerve function, and potassium is needed for muscle contraction and decreases risk of stroke, according to Jonathan Valdez, owner of Genki Nutrition and media spokesman for the New York State Academy of Nutrition and Dietetics.

Angel Planells, spokesman for the Academy of Nutrition and Dietetics, equates their lack to a car running with used oil. “We’re not running as efficiently as we could be,” he explains. “It puts the body under a lot of stress.”

Minerals are usually elements you’d find on the periodic table, such as calcium, explains Alex Berezow, senior fellow of bioscience at the American Council on Science and Health. Vitamins are organic compounds that are needed for bodily functions. For example, vitamin A prevents night blindness and protects against cataracts, vitamin D helps absorb calcium, vitamin E acts as an antioxidant, and vitamin C assists with the immune system, according to Valdez. “All the vitamins and minerals from food are important in proper amounts because the body is unable to make (them),” he adds.

Scientists and nutritionists generally agree that these products should come from food, especially a diet of fruits and vegetables, and not from supplements. Part of that is because produce also brings fiber into the system, which is essential for satiety and heart health. Even if fiber is consumed in supplement form, plant foods have phytochemicals like chlorophyll, which they have developed over the years to stave off predators. Dr. Jed Fahey, assistant professor and director of Johns Hopkins University’s Lewis B. and Dorothy Cullman Chemoprotection Center, specializes in researching phytochemicals. “While you can argue that carbohydrates and fats are required for survival, phytochemicals are required for the health span or the maintenance of a long, healthy, productive, and vigorous life,” he says. Their function has also not been fully studied, so the benefits in supplements hasn’t caught up to their efficacy yet.

Carol Haggans, with the Office of Dietary Supplements at the National Institutes of Health, recommends consulting a physician before starting a pill as a substitute. A deficiency in one or more vitamins or minerals may necessitate the need to bolster with a supplement, but that can also interfere with medications. “Generally speaking, it’s best to get nutrients from food rather than supplements,” she says. Echoing Fahey, she explains that phytochemicals likely have benefits that have yet to be explored and that cannot yet be duplicated.

Of course, there are spans in life where a supplement is necessary. Older people have a tougher time absorbing certain items. For example, hydrochloric acid production required to break down vitamin B12 diminishes with age, so older adults may need to use supplements or consume more fortified foods, such as breakfast cereals. Vitamin B12 is also only found naturally in animal products. Planells explains this also means that difficulty chewing meat is another reason older populations may be deficient in B12. Vegans and vegetarians would also need to take it in other ways. Iron is another one where it’s easily absorbable when it comes from meats but not so much when extracted from vegetables, according to Maniscalco.

Pregnant women need vastly more iron, which may be difficult to take in from food alone. “Any woman or teenage girl who could become pregnant should get 400 mg of folic acid on top of what they get from their diets,” Haggans adds. Any physician would recommend this because folic acid reduces the risk of neural tube defects in pregnancy, but that benefit comes at the beginning of gestation, before most women are aware they are pregnant.

Kerry Schulze, associate scientist at the Center for Human Nutrition at Johns Hopkins University, studies pregnant women in Bangladesh and Nepal. These women are at higher risk because of the lack of access to appropriate vitamins and minerals. While pregnant women in the United States also need a boost to folic acid and iron, women in developing countries often lack the baseline of other nutrients enjoyed by American women. Her studies have focused on giving a general recommended dietary allowance (RDA) to women whose diets are deficient in those nutrients. While this supplement during pregnancy gives those women a short boost, it doesn’t make up for the deficiency in vitamins and minerals resulting from the limited access to required foods.

Berezow argues that anyone who lives in the United States, even those in impoverished areas with less access to healthy diets, receives enough vitamins and minerals and should not need a daily multivitamin, even though many take them as a part of their daily routines. That’s because so many foods are fortified simply to make up for those who aren’t eating produce. For example, table salt includes iodine because it affects thyroid function and prevents goiters in the population. “The only people who should take vitamins are people who have specific metabolic deficiencies,” he explains, and those should be diagnosed by a doctor. Some of the most prevalent deficiencies can be of vitamin D and calcium, especially as people age.

Time and scientific knowledge have taken care of most of the drastic instances of lack of nutrients. Rickets and scurvy, for example, are attributed to a deficiency of vitamins D and C, respectively. Once those causes were ferreted out, it was easy enough to fix with exposure to sunlight and consumption of citrus fruit.

However, there can also be too much of a good thing. “Most of the nutrients have an upper limit,” Haggans explains. The Food and Nutrition Board of the National Research Council sets the standards for the RDA. Iron is toxic at high doses, she says, and any supplements should be in childproof containers to prevent overdoses. vitamin A comes in two forms: preformed and with beta-carotene. The latter, which can be found in carrots, has no adverse effects in large amounts, but the former, found in animal products like milk and liver, can be toxic in high doses.

Fat-soluble vitamins, such as A, D, E, and K, stay in the body longer and also pose a threat in excessive amounts. Many nutrients are water soluble, so something like Vitamin C is excreted from the body through urine, if too much is taken in. However, that solubility also means that cooking vegetables can sometimes mean losing nutrients. Boiling broccoli, which is high in vitamin B, means literally throwing away nutrients when draining. In contrast, tomatoes allow additional access to lycopene when cooked. Lycopene, a phytochemical, works as an antioxidant.

In the end, a balanced diet rich in a variety of fruits and vegetables is key. Valdez recommends following the general “MyPlate” rules provided by the USDA: half the plate with fruits and vegetables, a quarter with whole grains, a quarter with protein, and a glass of milk, which has an array of nutrients, such as calcium, phosphorous, potassium, and magnesium.

Attention to a balanced diet is a gradual process that should be built up. “Change won’t happen overnight,” Planells warns. If people want to have the recommended five to seven daily servings of fruit but are only consuming one, they won’t find much success trying to make that leap right away. Gradually taking in two a day and then increasing from there will ultimately mean a healthier overall diet and more intake of vitamins and minerals. “It may take a couple of months. Have patience, and don’t be afraid to reach out to a dietitian if you’re feeling stuck,” he says.

Nadia Malik holds a degree in journalism and is a former reporter for a Chicago-area newspaper. She has written for websites and publications and has also worked for several non-profit organizations. She is currently in a graduate program at the University of Pennsylvania, studying social work and nonprofit leadership.