There's good news and bad news from an analysis of nearly 100 studies of the way exercise effects the brain. The good news is that nearly any type of exercise can improve your mental abilities. The bad news is that you have to keep at it — being fit in your 30s won’t prevent decline in your 50s if you stop exercising.

The idea that exercise is good for the mind is well-established. After all, the brain is part of the body. But it’s been hard to pin down specifics, such as how much exercise and what type.

So researchers at the University of Miami reviewed 98 randomized controlled trials that had had over 11,000 older adults start an exercise program for at least four weeks and had compared skills their thinking and memory to other older adults who had not started an exercise program.

“Not everyone has the endurance or motivation to start a moderately intense exercise program, but everyone can benefit even from a less intense plan.”

The mental performance of people who exercised improved more compared to their non-exercising peers. The type of exercise did not seem to matter — aerobic, strength training, tai chi or yoga — all worked. Walking was the most common type of exercise among the older adults in the studies.

The brain's processing speed improved in those who exercised both in healthy older people and seniors with cognitive impairment. Improvements were also seen in executive function, a person's ability to manage time, pay attention and set and achieve goals. But the researchers did not find a link between exercise and improvements in memory.

Estimating how much exercise was needed was a little trickier. The team found that people who exercised about 52 hours over a period of about six months had the biggest improvements in scores on thinking and speed tests. The benefits applied to both people without cognitive decline as well as those with mild cognitive impairment.

Fifty-two hours of exercise over six months is roughly two hours a week, not all that different from guidelines recommending two and a half hours of weekly exercise. And the fact that the researchers found no link between the amount of weekly exercise and cognitive benefit may just mean that more than a few weeks of exercise are needed. You need to be in it for the long haul.

“These results suggest that a longer-term exercise program may be necessary to gain the benefits in thinking skills,” said study author, Joyce Gomes-Osman, PT, PhD, of the University of Miami Miller School of Medicine in Florida. “We were excited to see that even people who participated in lower intensity exercise programs showed a benefit to their thinking skills. Not everyone has the endurance or motivation to start a moderately intense exercise program, but everyone can benefit even from a less intense plan.”

The study results are published in Neurology.