Updated

You’ve been working out for months—so why is the number on the scale going in the wrong direction? Many people actually gain weight despite going to the gym, according to a recent survey by Forza Supplements.

The U.K.-based company polled 1,000 people on their diet and exercise habits and found that 26 percent of the people surveyed actually packed on pounds after they started going to the gym—although, to be fair, some people included in this group only went to the gym once a week, while others went daily.

More: Which Impacts Your Weight More: Diet or Exercise?

While the irregularity of exercise may be a factor in why many of the gym-goers struggled to maintain their weight (let alone drop a few pounds), Forza reps say there’s likely another factor at work, as well: People who work out tend to overindulge in foods before and after their sweat sessions, according to the company’s press release.

“People think working out harder can make up for eating unhealthy foods,” says J.J. Virgin, nutritionist and author of The Virgin Diet: Drop 7 Foods, Lose 7 Pounds, Just 7 Days. “But you can’t compensate for bad eating with exercise.” Think about it: One milkshake can clock in at 780 calories, which would take 72 minutes of jumping rope—a pretty vigorous exercise—to burn off (see more junk food to exercise conversions.)

Of course, eating well (and enough) is key to burning fat and building muscle, says Virgin. But working out doesn’t grant you permission to gorge on whatever you’re craving, either.
If you’re watching your waistline, make sure to eat pre- and post-workout foods that will boost your overall performance and help your muscles recharge, says Virgin. But you should also be wary of how much you eat—even if it’s a healthy snack—since consuming too much of any food makes it harder for your body to burn it off later, she says. Once you’ve cleaned up your diet and learned healthy portion sizes, exercise will help you maintain or decrease your weight.

More: The 5 Best Pre-Workout Foods