(TIME.com) -- As with so many other things in life, exercise may work best if you follow the Goldilocks rule: exercise neither too little nor too much, if your goal is to shed extra weight, a new study finds.
Previous research has shown that exercise alone doesn't reliably lead to weight loss -- without accompanying restrictions in diet -- a dismaying fact that many hopeful weight-losers know firsthand.
But a recent Danish study suggests that physical activity can indeed help shrink your pants size, so long as you hit the sweet spot -- perhaps somewhere around a half-hour a day, at least for young men.
For the study, researchers at the University of Copenhagen recruited 61 sedentary and moderately overweight men, mostly in their 20s and early 30s, and randomly assigned them to one of three groups: a control group that remained sedentary with no changes to diet or activity; another group that took up a 30-minutes-a-day routine of moderate exercise like jogging or biking (each participant worked out for either half an hour or until he burned 300 calories); or a third group that exercised more vigorously, for an hour a day or until they burned 600 calories.
Before launching into the 13-week exercise regimen, all the men underwent a baseline checkup to gauge their overall health and fitness: all were overweight but not obese, and they were metabolically healthy.
During the 13 weeks, the men were instructed not to make any purposeful changes to their eating habits; they also kept food diaries that the researchers checked later, and on certain days they wore motion sensors to track how much activity they were engaging in outside of their exercise routines.
By the end of the 13 weeks, the results were both expected and unexpected, the researchers reported.
Not surprisingly, the sedentary group saw no changes in their weight. The men in the high-intensity exercise group lost an average of 5 pounds, but while weight loss was expected, the researchers said these men lost about 20% less than they would have anticipated, given how many extra calories they were burning.
Even more surprising were the results from the moderate exercise group: these men lost an average of 7 pounds each, 83% more than what the researchers would have guessed based on calorie expenditure alone.
So, what happened? It's not entirely clear from the study, but lead researcher Mads Rosenkilde had some theories, according to the New York Times.
First, the intense exercisers were probably compensating for their extra activity by eating more food. Although the added consumption noted in their food diaries wasn't enough to explain their smaller-than-expected weight loss, Rosenkilde thinks they were likely eating more food than they jotted down.
In addition, data from the motion sensors showed that the men who exercised the most were sedentary when they weren't working out; they spent most of their free time sitting, probably because they were tired, Rosenkilde said.
In contrast, the men who exercised for 30 minutes at at time became more active throughout the day, probably opting to take the stairs instead of the elevator, for instance, and moving more in general, Rosenkilde said. "It was little things, but they add up," Rosenkilde told the Times.
Overall, Rosenkilde concluded, people who exercise less may end up burning just enough calories to lose weight, but not enough to feel compelled to replace them, either by eating more or remaining sedentary otherwise. Those who exercise a lot, on the other hand, may feel more drained, which prompts them to compensate.
The findings are intriguing, but it's hard to say how generalizable they are to groups other than young, healthy men. It's also not known how exercise may impact weight loss over the long term. The Times reports:
"The study also was short-term, and the results might shift over the course of, say, a year of continued exercise, Mr. Rosenkilde says. The men working out for 60 minutes were, after all, packing on some muscle, while the 30-minute exercisers were not.
"That extra muscle offset some of the vigorous exercisers' weight loss in the short term -- they sloughed off fat but added muscle, decreasing their net loss -- but over the longer term it could amp up their metabolism, aiding in weight control."
You can read more about the study, published in the American Journal of Physiology -- Regulatory, Integrative and Comparative Physiology, in the Times article here.
This story was originally published on TIME.com.