Obesity and extreme obesity can reduce life expectancy by up to eight years and deprive people of as much as 19 years of good health, a new study has found.
The research - a mathematical model based on US health data - should be a useful tool for doctors advising patients who are worryingly overweight, its authors said.
The biggest area of concern is for people who become obese while they are young.
"The pattern is clear," said Steven Grover, a professor of epidemiology at McGill University in Montreal, Canada.
"The more an individual weighs and the younger their age, the greater the effect on their health.
"They have many years ahead of them, during which the increased health risks associated with obesity can negatively impact their lives."
Grover's team used data from a big US project, the National Health and Nutrition Examination Survey, which monitored thousands of people over years, to analyse the risk of early death and ill health among adults of different body weight.
They compared overweight and obese people against people of normal weight in terms of life expectancy.
They also calculated the number of years of good health that each individual could - statistically - expect.
This was defined as being free of cardiovascular disease or diabetes - two diseases that are closely linked with excessive weight.
The estimates applied to people aged between 20 and 79.
The outcome was dramatic, according to the paper, which appears in the journal Lancet Diabetes and Endocrinology.
Individuals who were in the overweight category - who had a body mass index (BMI) of 25 to 29.9 - were estimated to lose between zero and three years of expected life.
Between 0.8 and 5.9 years of life were lost for obese people, with a BMI of 30 to 34.9.
The extremely obese, with a BMI of 35 or more, lost between 0.9 and 8.4 years of life expectancy.
The greatest loss in expected lifespan was found among those aged 20-39.
On the other hand, the loss was smaller and sometimes negligible among those who were only overweight.
"Healthy life-years" lost to diabetes and cardiovascular problems ranged from 0.5 years to 19.1.
The biggest loss was among women who were extremely obese in the 20-39 age bracket.
The least loss was among men who were overweight and aged between 60 and 79.
The data came from a subset of 4,000 people in the 2003-2010 US survey, all of them white, for whom more details about their health and blood sugar were known.
The warning should be treated as conservative, as the study only factored in two obesity-related diseases, said the study.
Cancer, respiratory disease, liver and kidney disease have also been linked to chronic overweight.