What you put in your belly every day can have an impact beyond your health. Now, the latest analysis suggests that, as a general rule of thumb, what's good for you is almost always better for the planet as well.

It's the first time researchers have weighed up both the health and environmental impacts of various foods, and it's something to keep in mind the next time you're strolling down the grocery store aisle.

With very few exceptions, their findings reveal that healthy foods, such as fruits, vegetables, nuts, legumes and cereals, have a lower environmental impact from the perspective of agriculture and mass food production.

"This study shows that eating healthier also means eating more sustainably," says ecologist David Tilman from the University of Minnesota.

"Normally, if a food product is good for one aspect of a person's health, it's better for other health outcomes, as well. The same holds for environmental outcomes."

What's right for humans isn't always right for the planet as a whole, but at least in this case, our needs align.

To compare the health and environmental impacts of certain diets, the authors examined 15 well-researched food groups, including chicken, dairy, eggs, fish, fruits, legumes, nuts, olive oil, potatoes, red meat, cereals, sugary beverages, and vegetables.

Each of these groups was then analysed in terms of five environmental impacts and five health impacts. For the agricultural costs, the authors focused on greenhouse gas emissions, land use, water use and pollution; whereas for dietary downsides, they looked specifically at type II diabetes, stroke, coronary heart disease, colorectal cancer, and mortality.

The risk of these diseases was calculated by adding an additional serving of each food item to a person's average daily intake, and each of these servings was then analysed in terms of production, manufacturing, agricultural inputs, seed, equipment, and cropland. Transport, processing, retail, and food preparation were left out of the equation.

Every food that was linked to improved health had a markedly lower impact than red and processed meats, except for fish. While fish has a lower environmental impact than red meat and seems to have the best outcomes for disease risk, it's environmental footprint was larger than a plant-based diet.

Still, not all meat was necessarily bad. Even dairy, eggs, and chicken appear to be better choices than red meat when it comes to both the environment and your health.

Sugar, on the other hand, was an outlier. We all know processed foods are not good for you health-wise, but it turns out, they aren't nearly as hard on the planet as other options in the grand scheme of things.

"Thus," the authors write, "dietary transitions toward greater consumption of healthier foods would generally improve environmental sustainability, although processed foods high in sugars harm health but can have relatively low environmental impacts."

But while we might not want to hear it, food systems researcher Michael Clark from the University of Oxford told The Guardian that replacing any meat with plant-based food appears to make the biggest difference.

"How and where a food is produced affects its environmental impact, but to a much smaller extent than food choice," he said.

Unfortunately, global diets are heading in the opposite direction, even though the United Nations and other organisations are recommending that individuals eat more plant-based foods to help us stop the worst that climate change can bring.

"It's important that all of us think about the health impacts of the foods we eat," says biosystems engineer Jason Hill at the University of Minnesota.

"We now know that making our nutrition a priority will pay dividends for the Earth, as well."

The study was published in PNAS.