The foods that do a body good may also do our planet the least harm.

A major new study, published this week in the Proceedings of the National Academy of Sciences, offers a comprehensive look at the health and environmental impacts of 15 food groups, from fruits to red meat to dairy to fish.

To come up with their findings, researchers took a deep dive into the resources needed to produce each food — looking at factors like land and water use, greenhouse gas emissions and how much pollution its production generated.

Then they looked at the food's impact on human health.

The food that earned top marks from both an environmental and health perspective?

The humble nut.

Eating a handful of nuts every day can have long-term benefits for your heart and weight. (Photo: Krzysztof Slusarczyk/Shutterstock)

And yes, nuts demand an enormous amount of water to produce — a particular issue in places like Southern California, where drought too often leads to catastrophic wildfires. But as precious as water is, it's just one factor that goes into nut production. And, on the whole, growing almonds, pecans, walnuts and pistachios — California's chief nut crops — takes a considerably lower toll on the environment than something like red meat production.

"If water is going to be used to irrigate crops, it would seem better for it to be used to grow healthy crops," study co-author David Tilman of the University of Minnesota explains to NPR.

Indeed, the study found red meat to be chief among environmental villains with a single serving dishing out about 40 times the negative impact on our planet as vegetables — while upping the relative risk of overall mortality by 40 percent.

"That doesn't mean you're going to die with a 40 percent chance in a given year," Tilman adds. "It just means whatever your chance was of dying that year for your age, [the relative risk is] about 40 percent larger."

And meat's environmental footprint may be even more dramatic. A quarter pound of hamburger, for example, requires about 450 gallons of water to produce. That's to say nothing of the dent it makes in our air and water quality, which helps make it one the least sustainable farming practices on the planet. When you factor in the toll red meat takes on the body — a litany of issues from type 2 diabetes, to cardiovascular disease to certain types of cancer — it's easy to understand why meat is a costly indulgence.

Processed meats have been linked to as increased risk of some cancers, as well as obesity, diabetes and cardiovascular diseases. FotoKulinaria/Shutterstock

Nuts, on the other hand, unequivocally do us a world of good. And, by eating them. we also do the world, well, a little less bad. But nut production isn't perfect. With growing vegetables as the baseline, researchers found nut production to have about five times the negative impact as greens.

There were, of course, a few notable exceptions to the general rule that what's good for us is less harmful for the planet. No one is going to argue that sugar does a body good. In fact, it may even impair our ability to think. But sugar cane goes down easy on the environment, with researchers claiming it isn't much more taxing on the environment than growing vegetables.

Refined sugar isn't your friend. It isn't that hard to live life without it. (Photo: Handmade Pictures/Shutterstock)

Then there's the slippery issue of fish. Some research suggests fish — specifically fish oil — is a healthy staple that could dramatically curb our risk of heart disease. But the researchers caution that sourcing is critical in mitigating at least some of the damage fish production causes to the environment. As Tilman notes in NPR, open ocean fishing packs a lot of baggage due to all the diesel fuel needed for a relatively small catch.

It all adds up to more informed dietary choices. We're never eating for just one, but rather for the entire planet.

"Such information could help consumers, food corporations, and policy makers make better decisions about food choices, food products, and food policies, potentially increasing the likelihood of meeting international sustainability targets such as the United Nations' Sustainable Development Goals or the Paris Climate Agreement," the authors note in the study abstract.