To be healthy, you need to have enough vitamins and minerals in your diet, but it matters how you get them. Popping a handful of dietary supplements in your mouth may seem like the easiest way to make sure you’re covered, but a new study argues against that mindset.

Nearly 70 percent of Americans take some form or combination of dietary supplements. These pills, capsules and powders account for five percent of all grocery store sales in the U.S. Nearly half of Americans take a daily multivitamin in hopes of improving their health, and many people take individual vitamin or mineral supplements in addition, but they may be doing themselves more harm and good.

Americans spend over $30 billion on dietary supplements each year in search of a quick and easy way to stay healthy.

To study the association between the use of supplements and death from all causes, cardiovascular disease or cancer, researchers at the Friedman School of Nutrition Science and Policy at Tufts University used the 24-hour diet recall information from participants in six two-year cycles of a national health survey. The diet information in the study came from over 27,000 adults in the U.S. who were at least 20 years old.

The idea was to look at whether adequate or excessive intake of any nutrients was associated with an increased risk of death, cardiovascular disease or cancer and whether food or supplement sources affected the association.

Ample intake of vitamins K and magnesium from food, not supplements, was associated with a lower risk of death overall. Eating enough of vitamins A, K and zinc from food, not supplements, was linked to a lower risk of death from cardiovascular disease. Getting too much calcium from supplements — 1000 milligrams per day or more — rather than from food, was linked to a higher risk of death from cancer.

Taking supplements was not associated with a lower risk of death, even in people with low nutrient intake; but using vitamin D supplements in the absence of any signs of vitamin D deficiency was associated with an increased risk of death from all causes.

“Our results support the idea that, while supplement use contributes to an increased level of total nutrient intake, there are beneficial associations with nutrients from foods that aren't seen with supplements,” said Fang Fang Zhang, lead author of the study, in a statement.

Americans spend over $30 billion on dietary supplements each year in search of a quick and easy way to stay healthy. Using that money to buy healthy food and learning to cook would be much more beneficial.

The study is published in Annals of Internal Medicine.