Everyone knows that people who chow down on french fries, chug soda and go heavy on red meat tend to pile on more pounds than those who stick to salads, fruits and grains.

But is a serving of boiled potatoes worse than a helping of nuts? Is some white bread as bad as a candy bar? Could yogurt be a key to staying slim?

The answer to all those questions is yes, according to the provocative revelations produced by a big Harvard University project that for the first time details how much weight individual foods make people put on or keep off.

The federally funded analysis of data collected over 20 years from more than 120,000 U.S. men and women in their 30s, 40s and 50s found sharp differences in how foods and drinks — as well as exercise, sleep patterns and other lifestyle factors — affect whether people gradually get fatter.

The findings add to the growing body of evidence that getting heavier is not just a matter of “calories-in, calories out,” and that the mantra “eat less and exercise more” is far too simplistic.

Although calories remain crucial, some foods clearly cause people to put on more weight than others, perhaps because of their chemical makeup and how our bodies process them. This understanding may help explain the dizzying, often apparently contradictory nutritional advice from one dietary study to the next.

“The conventional wisdom is simply, ‘Eat everything in moderation and just reduce total calories’ without paying attention to what those calories are made of,” said Dariush Mozaffarian of the Harvard School of Public Health, who led the study in today’s edition of the New England Journal of Medicine. “All foods are not equal, and just eating in moderation is not enough.”

The findings help explain why many people put on weight little by little over the years without even realizing it.

Just by picking the wrong combinations and portions of foods, and making unhealthy lifestyle choices, people imperceptibly pile on the pounds as the years go by, eventually becoming overweight or even obese, the study indicates.

Among all the foods studied, potatoes stood out. Every additional serving of potatoes people added to their regular diet each day made them gain about a pound over four years. It was no surprise that french fries and potato chips are especially fattening.

But even mashed, baked or boiled potatoes were unexpectedly plumping, perhaps because of their effect on the hormone insulin.

Helpful foods

While it was no shock that every added serving of fruits and vegetables prevented a gain of between a quarter-pound and a half-pound, other foods were strikingly good at helping people stay slim. Every extra serving of nuts, for example, prevented more than a half-pound of weight gain. And perhaps the big surprise was yogurt, every serving of which kept off nearly a pound over four years.

“The big picture of what’s new and unique here is we looked at multiple things simultaneously. Most studies just focused on one thing or a few things at a time. I wanted to see if you took the whole picture together. That hasn’t been done before,” Mozaffarian said.

The findings could have significant political, economic and policy implications, supporting, for example, growing pressure to levy taxes and take other steps to discourage certain menu options, such as sugary soda for kids.

“I think it’s an important study,” said Kelly Brownell, director of Yale University’s Rudd Center for Food Policy and Obesity, who co-wrote an accompanying article. “It’s based on a large number of people followed over time, and it shows there are particular types of food that are contributing more than others to the obesity problem — and that some are protective against weight gain.”

For the study, Mozaffarian and colleagues analyzed data from 120,877 healthy American men and women. The volunteers detailed their eating, exercise and other habits for the Nurses Health Study, the Nurses Health Study II and the Health Professionals Follow-up Study — large, highly respected Harvard studies examining a host of health issues. The researchers followed the participants for four-year intervals to see how changes in what they ate, drank and did affected their weight.

Within each period, the subjects gained an average of 3.35 pounds. Every additional daily serving of potatoes pushed up the scale by more than a pound every four years.

As expected, the type of potato, however, was important. Every order of french fries put on 3.35 pounds; a snack of potato chips added 1.69. But even each helping of boiled, baked or mashed potatoes contributed a little more than a half-pound.

Although the study did not evaluate why potatoes would be particularly fattening, other research shows that starches and refined carbohydrates such as potatoes cause blood sugar and insulin to surge, which makes people feel less satisfied and eat more as a result, Mozaffarian said.

Many people might also be surprised that every extra serving of refined grains, such as white bread, added 0.39 pound — almost as much as indulging in some sweets or desserts.

Researchers will surely scramble to try to explain why yogurt appears so helpful. It may be because of subtle shifts of microbes in the digestive tract or perhaps because people who eat more yogurt also tend to do other healthy things, the researchers said.

Lifestyle factors were clearly important. Those who exercised more gained nearly 2 pounds less than those who increased their physical activity the least. People who slept less than six hours a night — or more than eight hours — were more likely to gain weight, possibly by unbalancing hunger hormones such as ghrelin. Every extra hour per day of television watching added about a third of a pound, perhaps by encouraging snacking.

Others urge caution

But some researchers expressed caution. The precise “serving size” varied among foods and relied on participants’ memory and honesty, for example.

“To attempt to isolate the effect of specific foods on weight changes is fraught with problems,” said Lawrence Cheskin, head of Johns Hopkins Weight Management Center. “One is that people may conclude that if they simply stop eating X, they will reduce the chance of weight gain. This is unlikely, and a false conclusion.”

Nevertheless, the consistency across all three data sets made the researchers confident that the findings are generally accurate for sketching an outline of which food choices encourage overeating and which are associated with maintaining a healthier weight.