For better brain function, have a healthy diet starting young. But don't worry, it's never too late to start.

Healthy foods
Having a healthy diet, with foods like blueberries, avocado and nuts, is linked with better brain function, research finds. (Getty)

Here’s some food for thought: How you eat is linked to better brain function. New research finds that people who eat healthily throughout their lives are mentally sharper than their peers, starting at age 4 through their 60s. Of the study’s subjects, those with the poorest diets remained consistently in the lowest ranks for cognitive function.

The findings

Researchers followed 3,000 people in the United Kingdom for over 70 years. Participants submitted food diaries and took cognitive tests several times over the course of the study. Scientists then compared their dining habits to the United States Department of Agriculture Healthy Eating Index.

Studies like this aren’t necessarily designed to prove that eating well causes cognitive function to be better, but the link was clear. Forty-eight percent of those who ate high-quality diets — rich in fruits and vegetables and low in ultra-processed foods and red meat — and whose nutrition tended to improve over time were on the “highest cognitive trajectory.” That means their mental clarity was better than most of their peers, and stayed that way or improved over time. Conversely, 47% of those with the lowest quality diets were on the “lowest cognitive trajectory,” seeing mental sharpness decline over time, compared to their peers.

It’s never too late to eat healthy

There are two key takeaways, Kelly Cara, lead author of the study and a PhD candidate in the Tufts Friedman School of Nutrition Science and Policy program, tells Yahoo Life.

  1. Eating healthily in adolescence seemed to set people on a course for a life of high cognitive function.

  2. You’re not “doomed” if you don’t have a high-quality diet from childhood, she says. People’s eating patterns before age 50 showed up as a risk factor for how mentally sharp they would stay with age. That suggests that middle age is a “good window of opportunity” to make some positive dietary changes, says Cara. This is likely “due to neuroplasticity,” says Dr. Uma Naidoo, director of Nutritional and Lifestyle Psychiatry at Massachusetts General Hospital. “If we try to tweak our current less-healthy diets toward eating more brain healthy foods that support cognitive health, reduce neuroinflammation and help neurotrophic factors, [then] we are very likely to fend off cognitive decline by lowering neuroinflammation in the brain.”

Brain food diet

Cara’s study didn’t look at specific foods, but the results offer insights into the dos and don’ts for eating with your mind in mind. People whose eating habits scored highly on the Healthy Eating Index tended to have consistently better cognitive function. For this reason, Cara suggests using the recommendations laid out in the U.S. Dietary Guidelines and, a free educational tool designed to help you learn to eat a well-balanced diet that includes plenty of fruits, vegetables, whole grains and lean or plant-based proteins.

When making changes, Cara advises “adding healthy foods rather than taking what we think of as unhealthy foods away,” she says. For example, rather than no longer eating your favorite breakfast foods, you could add a serving of blueberries — which are packed with antioxidants, making them especially good for maintaining brain health — to your morning plate. Naidoo advises upping your intake of similarly antioxidant-rich snacks, as well as other brain healthy foods that are high in omega-3 fatty acids and other nutrients that help to reduce inflammation and promote good cerebral blood flow, including:

  • Green tea

  • Leafy greens such as spinach, kale, and broccoli.

  • Wild-caught fatty fish, including salmon, sardines and anchovies

  • Strawberries, blackberries and blueberries

  • Olive oil

  • Avocado

  • Nuts and seeds

  • Eggs

  • Dark chocolate

  • Spices like turmeric that contain curcumin, which has anti-inflammatory and antioxidant benefits for the brain

However, there are some specific types of food that both Cara and Naidoo say you should limit your consumption of to keep them from wreaking inflammatory havoc on your brain, including:

  • Refined carbohydrates from foods like packaged bread and pastries

  • Trans fats from processed items such as margarine and fast food

  • Ultra-processed foods including store-bought chips and cookies

  • Artificial sweeteners

  • Alcohol

  • Fried foods

  • High sodium foods