Scientists found the chances of reaching a ripe old age are increased by building up our leg muscles as we go from middle to old age.
Keeping joints flexible and having an exercise strategy also helped.
This, in turn, enables us to keep walking and stay active longer, helping stave off killers such as heart disease and cancer.
Researchers used computer simulations of walking behaviours in order to predict how changes in strength and flexibility affected how people walked.
The findings tally with previous research which suggested that moving at more than a yard a second improved the chances of elderly people making it well into their 80s or 90s.
Those who reached a speed of 4ft a second were more likely to live to 100.
An NHS spokesman said: “Adults aged 65 or older who are generally fit and have no health conditions that limit their mobility should try to be active daily and should do at least 150 minutes of moderate aerobic activity such as cycling or walking every week.
“In addition, they should do strength exercises on two or more days a week that work all the major muscles (legs, hips, back, abdomen, chest, shoulders and arms).
Older adults at risk of falls, such as people with weak legs, poor balance and some medical conditions, should do exercises to improve balance and co-ordination on at least two days a week. Examples include yoga, tai chi and dancing.”
Experts in preventing heart disease, Britain’s biggest killer of around 160,000 people a year, also emphasised regular exercise.
The British Heart Foundation said: “It can help you control your weight, reduce blood pressure and cholesterol and improve your mental health.”
And a spokesman for Cancer Research UK said: “About 3,400 cases of cancer in Britain each year could be prevented by keeping active.”
The new study used computer simulation to show decline in performance as the musculoskeletal system aged.
It looked at changes in body mass distribution, range of motion and delays in nerve transmissions.
Only age-related changes in muscles led to a decline in walking performance.
The analysis, published in The Journal Of Physiology, concluded that elderly people walk more slowly and tire more quickly because of loss of strength and mass in leg muscles.
Dr Seungmoon Song, of Carnegie Mellon University in Pennsylvania, said: “We plan to extend the predictive capability of our simulation to analyse pathological gaits after stroke or spinal injury and to prescribe treatment.”