Nearly half of cancers diagnosed in the UK each year - over 130,000 in total - are caused by avoidable life choices including smoking, drinking and eating the wrong things, a review reveals.
Tobacco is the biggest culprit, causing 23% of cases in men and 15.6% in women, says the Cancer Research UK report.
Next comes a lack of fresh fruit and vegetables in men's diets, while for women it is being overweight.
The report is published in the British Journal of Cancer.
Its authors claim it is the most comprehensive analysis to date on the subject.
Lead author Prof Max Parkin said: "Many people believe cancer is down to fate or 'in the genes' and that it is the luck of the draw whether they get it.
"Looking at all the evidence, it's clear that around 40% of all cancers are caused by things we mostly have the power to change."
For men, the best advice appears to be: stop smoking, eat more fruit and veg and cut down on how much alcohol you drink.
For women, again, the reviews says the best advice is to stop smoking, but also watch your weight.
Prof Parkin said: "We didn't expect to find that eating fruit and vegetables would prove to be so important in protecting men against cancer. And among women we didn't expect being overweight to be more of a risk factor than alcohol."
In total, 14 lifestyle and environmental factors, such as where you live and the job you do, combine to cause 134,000 cancers in the UK each year.
About 100,000 (34%) of the cancers are linked to smoking, diet, alcohol and excess weight.
One in 25 of cancers is linked to a person's job, such as being exposed to chemicals or asbestos.
Some risk factors are well established, such as smoking's link with lung cancer.
But others are less recognised.
For example, for breast cancer, nearly a 10th of the risk comes from being overweight or obese, far outweighing the impact of whether or not the woman breastfeeds or drinks alcohol.
And for oesophageal or gullet cancer, half of the risk comes from eating too little fruit and veg, while only a fifth of the risk is from alcohol, the report shows.
For stomach cancer, a fifth of the risk comes from having too much salt in the diet, data suggests.
Some cancers, like mouth and throat cancer, are caused almost entirely by lifestyle choices.