The researchers say a person loses two months for every kilogram overweight they are - and seven years for smoking a packet of cigarettes a day.
Unusually, the Edinburgh university team found their answers by analysing differences in people’s genetic code or DNA.
Ultimately they think it will reveal new ways of helping us to live longer.