A surprising and somewhat bemusing study out of Stanford was making the blog rounds last week, after it suggested that American weight gain over the past 30 years is linked more to exercise than to the number of calories people consumed.

The findings contradicted how most public health experts have defined and explained the country's obesity rates, which climbed robustly over the same three decades. For several years now, the bulk of the blame has fallen on calorie consumption rather than fitness.

Many experts in weight-related issues - even an author of the Stanford study - were quick to challenge the latest findings, or at least how they were interpreted. But the results reinforce at least one compelling and long-standing fact in the field of obesity research: It's complicated.

"I'm not sure we're ever going to have precise numbers and explanations - and I'm not sure that's necessary," said Dr. Uri Ladabaum, a Stanford gastroenterologist and lead author of the new study.

Latest news videos

"The messages can get confusing when one study comes out saying one thing and another comes out saying another," he said. "But if we can look at the big picture and use some common sense, we can acknowledge that both things matter."

Growing problem

More than two-thirds of Americans are considered overweight or obese as defined by their body mass index, which is a calculation of their height and weight. The negative health effects of being overweight are up for some debate, but not for obesity, which puts people at risk of diabetes and other metabolic conditions, and can cause early death.

Despite decades of study, public health officials can't say for sure what's caused Americans' enormous weight gain, but it's most likely a combination of factors - cultural and behavioral changes, the quantity and quality of calories consumed, and a declining commitment to physical activity.

No one doubts the health benefits of exercise. Regular physical activity has been proved to lower blood pressure, reduce stress, improve diabetes control and help people sleep. Exercise may protect against heart disease and Alzheimer's disease and improve bone density and joint health as people get older.

It also helps people lose and maintain weight, but its role there is somewhat controversial. In recent years especially, weight loss experts have pointed to diet, and calorie restriction in particular, as by far the most important factor in dropping pounds.

There's even a popular saying in weight-loss circles: You can't outrun a bad diet.

"You can eat a Big Mac in 15 minutes, and it takes an hour to take that off with biking," said Patricia Crawford, co-director of UC Berkeley's Center for Weight and Health. "There's just no comparison - there's no way we can exercise off a bad diet. The days aren't long enough."

But it's a mistake to de-emphasize exercise when it comes to weight loss, said Crawford. She was part of the 16-member committee that put together the Institute of Medicine's 2012 report on obesity in the United States. One of the priorities in that report: Americans need to increase physical activity.

The Stanford study backs that up.

The study, which is being published in the August issue of the American Journal of Medicine, analyzed weight data and survey results of more than 20,000 people in the United States between 1988 and 2010.

The analysis found that self-reported calorie consumption didn't change over the long time period, but the percentage of people who said they got no exercise at all increased dramatically. Meanwhile, body mass index and waist circumference climbed slowly but steadily over those years.

It's important to note that the study has limitations. Both calorie consumption and levels of activity were based on surveys of the participants, who may not have reported their data accurately.

The calorie consumption results differed from the findings of similar studies, including the Institute of Medicine's obesity report, which noted that Americans were eating about 150 to 300 calories more a day now than two or three decades ago.

The physical activity measurements from the Stanford study were particularly problematic because how the participants were surveyed changed over time, so it's not really fair to compare more recent answers to findings from earlier years.

But if there's one important lesson that stands despite the limitations, it's that exercise matters - a lot, Ladabaum said.

"The key is to be paying attention to both of these things - diet and exercise," he said. "If there's something good that could come out of this attention on our study, it's the refocusing on both of the factors."

No exercise at all

According to the Stanford study, which analyzed data from the National Health and Nutrition Examination Survey, 43 percent of men reported getting no physical activity at all in 2010, and an astounding 52 percent of women said the same.

The data are supported by similar studies that show Americans don't get nearly enough exercise and fall far short of meeting national guidelines, which call for about 150 minutes a week of moderate activity.

Still, so many people reporting a total lack of exercise was a shocking result, even to public health experts who are used to grumbling about Americans' poor exercise habits.

"What's concerning is the number of people who are totally sedentary - who aren't getting any physical activity at all," said Bibbins-Domingo. "It's really critical that whatever people are doing, whatever their goals are, that they become more physically fit, even if the weight loss doesn't come immediately."

The importance of it aside, the role of exercise in controlling weight varies somewhat depending on whether people are gaining weight, losing or trying to maintain.

Doctors have shown in multiple studies that regular exercise is critical for maintaining weight, especially after someone has lost a lot of pounds. The idea is that people who have lost 30 or more pounds have significantly lowered the number of calories they need to eat to maintain their weight - a 150-pound woman who lost 50 pounds would require about 300 fewer calories a day to maintain her new weight.

In the process of losing weight, that means the woman is consuming a few fewer calories with each incremental loss. But by the end, she's removed 300 calories from her daily diet. When she's focused on losing weight, it may be manageable to restrict food intake, but she may be less tolerant of calorie restriction when it's a permanent prospect.

That's where exercise can be critical. Someone who works out intensely every day, or most days a week, can pretty easily burn 300 calories and make up that gap.

But how much exercise helps with weight loss - or lack of exercise leads to weight gain - isn't as clear.

Some reports have suggested that the more people exercise, the better they're able to control their appetite and naturally consume the appropriate number of calories, said Dr. Wayne Smith, co-director of the Medical Weight Management Program at Kaiser Permanente in San Jose.

Physical activity can also be a mood booster, which may help people stick to a weight-loss plan, Smith said. And even if someone's only burning 100 to 200 calories on a daily walk, that may be just enough to create a calorie deficit and nudge them toward weight loss, albeit very slowly.

Common mistake

The mistake people may make is assuming that physical activity alone is enough to lose weight, or that being active gives them freedom to derail a diet. Isabelle Pazmino, who owns a Curves gym in San Francisco, said even she acknowledges that diet can trump exercise.

"People are being told 'walking, walking, just get out and walk,' so a lot of people, they think it's enough. And it's not," Pazmino said. "For someone who is extremely overweight and sedentary, walking is a great start, and it's better than doing nothing. But it's not enough."

Still, she said, whether people exercise for weight loss or health, or even just for the fun of it, there's one thing that's not up for debate.

"Exercise is not an option - it's not a luxury," Pazmino said. "It's a necessity."

Latest from the SFGATE homepage:

Click below for the top news from around the Bay Area and beyond. Sign up for our newsletters to be the first to learn about breaking news and more. Go to 'Sign In' and 'Manage Profile' at the top of the page.