That hot dog could take 36 minutes of high-quality, disease-free living from your life. We all know that what we eat has consequences to our health, but it’s hard to pin down the exact effect of each of our daily food choices. A new study has done that for you. It breaks down the impact over 5,800 different foods have on your longevity and rates the environmental impact of various foods.

The Health Nutritional Index (HENI) of foods was developed as a way to quantify the health effects of foods that are commonly part of the U.S. diet. University of Michigan researchers used data from the 2016 Global Burden of Disease study to determine the health impact, in terms of minutes of healthy life gained or lost, of certain foods, calculating the effect of eating a gram of food associated with each of 15 dietary risk factors — such as the intake of sugary beverages, fiber and sodium.

Substituting a small amount, just 10 percent, of your daily calorie intake from beef and processed meat with nuts, fruits, vegetables, whole grains and seafood improves your health, adds 48 healthy minutes to your life and improves the health of the planet.

The researchers determined the minutes of quality, disease-free life lost or gained due to each food consumed by analyzing foods based on their composition to determine its benefits or negative impacts. Each food was then color-coded as red, yellow or green. Green-coded foods are beneficial to health; yellow-coded foods should be eaten with caution; and red-coded foods should be seldom eaten. The end result was some of the first concrete, though far from precise, data on the health effects of our food choices.

Generally speaking, beef, pork, lamb, processed meat, cheese and sugar-based beverages have low HENI scores, are rated negatively and are responsible for the most minutes of life lost, while whole grains, fruits, vegetables and nuts have high HENI scores and account for the greatest number of healthy minutes gained.

Here’s how HENI works: Using the common hot dog as an example, researchers estimated that about 0.45 minutes of life were lost per gram of any type of processed meat eaten. Using the food profiles developed in the Health Nutritional Index, it was determined that eating a hot dog, which contains 61 grams of processed meat, results in 27 minutes of life lost, but when the adverse effects of sodium and trans fatty acids are added and counterbalanced by the positive effects of polyunsaturated fat and fiber, the final calculation is 36 minutes of high-quality, disease-free life lost for every hot dog eaten.

Over 5,800 foods were analyzed in the same manner. Other interesting findings included:

  • Each ounce of nuts and seeds eaten increases life expectancy by 25 minutes.
  • A 3-ounce serving of chicken wings takes off about three minutes off your life.
  • Every peanut butter and jelly sandwich eaten increases life expectancy by 33 minutes (due to the presence of nuts).

Burgers and sugary drinks also resulted in minutes of healthy living lost, while legumes, seafood, fruits, non-starchy, vegetables and ready-to-eat cereals added minutes to life.

Choosing foods with higher HENI scores generally reduces each person’s dietary carbon footprint by a third.

Making small positive changes to your diet can add length and quality to your life. The greatest benefits to health occur when you eliminate processed meats from your diet and cut down your consumption of salt.

The Health Nutritional Index also classified foods by their environmental impact, and the study found that choosing foods with higher HENI scores generally reduces each person’s dietary carbon footprint by a third.

By substituting a small amount, just 10 percent, of your daily calorie intake from beef and processed meat with legumes, nuts, fruits, vegetables, whole grains, fish and seafood, you could greatly improve your health, add 48 minutes per day to your life and help improve the health of the planet.

The study is published in Nature Food.