Using a simple formula based on factors like the child's birth weight, their parents' body size and the number of people in the household, scientists can predict a baby's likelihood of becoming obese during childhood, according to a new study.

Other factors included in the formula, which is available as an online calculator, are the mother's professional status and whether or not she smoked in pregnancy.

Researchers hope that the online assessment will be used to identify infants at high risk of obesity and help families take preventative measures to stop their children from putting on too much weight.

Childhood obesity is a leading cause of early type 2 diabetes and heart disease and is becoming more prevalent in developed countries.

In the U.S., nearly 18 percent of boys and almost 16 percent of girls between the ages of two and 19 are obese, according to the American Heart Association. The UK National Health Service finds that 17 percent of boys and 15 percent of girls between the ages of two and 15 are obese.

"Once a young child becomes obese, it's difficult for them to lose weight, so prevention is the best strategy, and it has to begin as early as possible," lead study author Professor Philippe Froguel of Imperial College London said in a statement.

"Unfortunately, public prevention campaigns have been rather ineffective at preventing obesity in school-age children. Teaching parents about the dangers of over-feeding and bad nutritional habits at a young age would be much more effective," he said.

Researchers developed the formula using data from a study set up in 1986 following 4,000 Finnish children.

Researchers were initially investigating whether obesity risk could be determined using genetic profiles, but the test they developed based on common genetic variation failed to make accurate predictions.

However, they found that non-genetic information that was available at the time of birth was enough to predict which children would become obese.

Researchers said that the formula proved accurate not just in the Finnish children they studied but also in additional tests using data from studies in Italy and the United States.

"This test takes very little time, it doesn't require any lab tests and it doesn't cost anything," Froguel said.

"All the data we use are well-known risk factors for childhood obesity, but this is the first time they have been used together to predict from the time of birth the likelihood of a child becoming obese," he said, adding that the 20 percent of children the test predicted to have the highest risk at birth make up 80 percent of obese children.

Researchers noted that while the latest study failed to show that common genetic variants were helpful for predicting childhood obesity, they said that about one in 10 cases of obesity are caused by rare mutations that seriously affect appetite regulation.

They said that tests for these types of mutations that affect appetite could become available to health care professionals in the next few years as the cost of DNA sequencing technology falls.

The latest study was published Nov. 28 in the open access journal PLOS ONE.