(CNN) Changing what you eat could add up to 13 years to your life, according to a newly published study, especially if you start when you are young.
The study created a model of what might happen to a man or woman's longevity if they replaced a "typical Western diet" focused on red meat and processed foods with an "optimized diet" focused on eating less red and processed meat and more fruits and vegetables, legumes, whole grains and nuts.
If a woman began eating optimally at age 20, she could increase her lifespan by just over 10 years, according to the study published Tuesday in the journal PLOS Medicine. A man eating the healthier diet from age 20 could add 13 years to his life.
Focusing on a healthier diet could also lengthen the lives of older adults, the study said. By starting at age 60, a woman could still increase her lifespan by eight years. Men starting a healthier diet at age 60 might add nearly nine years to their lives.
A plant-based eating style could even benefit 80-year-olds, the study said: Men and women could gain about 3.5 years of extra life from dietary changes.
"The notion that improving diet quality would reduce the risk of chronic disease and premature death is long established, and it only stands to reason that less chronic disease and premature death means more life expectancy," said Dr. David Katz, a specialist in preventive and lifestyle medicine and nutrition, who was not involved in the study.
Katz, the president and founder of the nonprofit True Health Initiative, a global coalition of experts dedicated to evidence-based lifestyle medicine, has published research on how to use food as preventive medicine.
"What they define as an 'optimal' diet is not quite optimal; it's just a whole lot better than 'typical,'" Katz said, adding that he felt diet could be "further improved, conferring even greater benefits."
"My impression is that their 'much improved' diet still allowed for considerable doses of meat and dairy," Katz said, adding that when his team scores diet quality objectively, "these elements are at quite low levels in the top tier."
To model the future impact of a person's change of diet, researchers from Norway used existing meta-analyses and data from the Global Burden of Disease study, a database that tracks 286 causes of death, 369 diseases and injuries, and 87 risk factors in 204 countries and territories around the world.
The largest gains in longevity were found from eating more legumes, which include beans, peas and lentils; whole grains, which are the entire seed of a plant; and nuts such as walnuts, almonds, pecans and pistachios, the study found.
It may sound simple to add more plants and grains to your diet, but statistics show that Americans struggle to do so. A new report from the US Centers for Disease Control and Prevention found few Americans eat close to their daily recommendations of fruits and vegetables.
The CDC study found that only 12% of adults consume 1½ to 2 cups of fruit each day, which is the amount recommended by the federal Dietary Guidelines for Americans. Only 10% of Americans eat the recommended 2 to 3 cups of vegetables each day, including legumes.
About 50% of grain consumption should be whole grains, yet over 95% of Americans fail to meet that goal, according to the latest Dietary Guidelines for Americans, instead eating processed grains, which have been milled to remove the grain, bran and many nutrients, including fiber.
Over 50% of Americans fail to eat the 5 grams (about a teaspoon) of recommended nuts and seeds each day, the guidelines said.
Nuts, seeds, legumes and whole grains contain more than just protein. They include healthy fats, vitamins, minerals and antioxidant "phytochemicals" that have been associated with lower risk of chronic diseases.
Eating less red and processed meat such as bacon, sausage and preserved deli meats was also linked to longer life.
That makes good sense: Red and processed meats have been linked to significant health risks, including coronary heart disease and bowel cancer.
"There's substantial evidence that processed meat can cause bowel cancer -- so much so that the World Health Organization has classified it as carcinogenic since 2015," Oxford University epidemiologist Tim Key, a member of the UK Department of Health's Scientific Advisory Committee on Nutrition, told CNN in a prior interview.
Replacing red and processed meats with lean poultry, fish and plant proteins is one way to improve a diet quickly, experts say.
Plant proteins include soybeans (edamame), chickpeas, lentils and other legumes, tofu, tempeh, nuts, seeds, and whole grains like quinoa. Some vegetables, like broccoli, also contain higher levels of protein.
A 2020 study which tracked more than 37,000 middle-aged Americans found those who ate the most plant protein were 27% less likely to die of any cause and 29% less likely to die of coronary heart disease than people who ate the least amount of plant protein.
"The benefit is more pronounced when red and processed meats are replaced by plant protein sources," study coauthor Dr. Frank Hu, chair of the department of nutrition at Harvard University's T.H. Chan School of Public Health, told CNN in a prior interview.
Tied for silver was the DASH diet, which stands for dietary approaches to stop hypertension, and the Flexitarian diet, which encourages being a vegetarian most of the time. All of these diets focus on meals full of fruits, vegetables, beans, lentils, whole grains, nuts and seeds.
An easy way to start eating the Mediterranean way is to cook one meal each week based on beans, whole grains and vegetables, using herbs and spices to add punch. When one night a week is a breeze, add two, and build from there.