Image copyright Getty Images Image caption Exercising for 30 minutes a day and eating well are part of a healthy lifestyle

Women can gain 10 and men seven years of life free of cancer, heart problems and type-2 diabetes from a healthy lifestyle, a study in the BMJ suggests.

They must exercise regularly, drink in moderation only, have a healthy weight and good diet and not smoke.

The US research is based on 111,000 people tracked for more than 20 years.

Lead author Dr Frank Hu, of Harvard School of Public Health, in Boston, said the study had "a positive message for the public".

"They gain not just more years of life but good years through improved lifestyle choices."

What is a healthy lifestyle?

At the age of 50, study participants were asked if they met at least four of these five criteria:

never smoking

a healthy, balanced diet

30 minutes of moderate or vigorous activity every day

a body mass index (BMI) between 18.5 and 24.9

no more alcohol than a small glass of wine a day for women and a pint of beer for men

Image copyright Getty Images Image caption Fruit and vegetables are important in a healthy diet

Women who said they met four out of five lived an average of another 34 years free of cancer, cardiovascular disease (such as heart attack and stroke) and type-2 diabetes - more than 10 years longer than those who did not.

For healthy men, it meant another 31 years of disease-free life - more than seven years extra than unhealthy men could expect.

Why the difference between women and men?

It may be linked to the fact women live longer than men on average.

Image copyright Getty Images Image caption The healthiest men and women in the study had never smoked

Men who smoked more than 15 cigarettes a day and obese men and women (with a BMI of more than 30) had the lowest disease-free life expectancy, the study found.

But some things were true for both sexes - not only did a healthy lifestyle reduce the risk of cancer, cardiovascular disease and type-2 diabetes, it also improved survival if men and women were diagnosed with any of the diseases.

"The benefits add up for men and women," Dr Hu said.

Why focus on these diseases?

Cancer, cardiovascular disease and type-2 diabetes are three of the most common diseases in old age. They are also closely linked to people's lifestyles.

Being obese or overweight, for example, is thought to be linked to 13 different types of cancers, including breast, bowel, kidney, liver and oesophagus.

Image copyright Getty Images Image caption Some cancers are closely linked to lifestyle factors, such as obesity

Cancer Research UK has calculated that four in 10 cancers can be prevented by people changing aspects of their lifestyle, such as cutting down on processed meat, eating more fibre in their diet and protecting their skin in the sun.

Could other factors play a role?

This was a large, observational study, so it can't conclude these lifestyle factors were directly responsible for extending life free of disease.

It did try to account for other factors, however, such as family medical history, ethnic background and age, which could have had an impact on the results.

The research team also had to rely on people giving them information on their food intake, their exercise habits and even their height and weight, which is not always accurate.

Most of the participants in the study, involving more than 73,000 women and 38,000 men, were white health professionals.