Every office has at least one: a giant bowl of bite-size candy bars, peppermints, chocolate Kisses and other high-sugar treats. It’s hard to resist its gravitational pull, especially when you’re suffering from a post-lunch blood-sugar dip in the late afternoon.

Some say the bowls of free sweets help lift office spirits. Problem is, they also hike the needle on the scale. Research confirms that office snacking is a measurable phenomenon. According to Sue Shellenbarger at the Wall Street Journal:

A four-week study of 40 secretaries found that when candy was visible in a clear, covered dish, participants ate 2.5 pieces of chocolate on top of the 3.1 candies they would have eaten had the chocolates been in an opaque container, according to the 2006 study in the International Journal of Obesity. Moving the dish closer, so the subjects could reach the candy while seated at their desks, added another 2.1 candies a day to their intake.

“The proximity and visibility of a food can consistently increase an adult’s consumption,” says the study, led by Brian Wansink, a professor of marketing and human behavior at Cornell University, Ithaca, N.Y., and author of “Mindless Eating.” He adds, “Even for a person with the greatest resolve, every time they look at a candy dish they say, ‘Do I want that Hershey’s Kiss, or don’t I?’ At the 24th time, maybe I’m kind of hungry, and I just got this terrible email, and my boss is complaining — and gradually my resolve is worn down.”

And while a tiny morsel of chocolate might seem harmless, consider the cumulative effects of habitual snacking. Eating just two pieces of candy a day at work adds about 480 calories to your weekly total intake, the WSJ calculates — that’s a whopping 1,920 extra calories per month. So is it any wonder that you’ve gained 5 or 7 lbs. in the last year?

What can you do to keep yourself out of the candy bowl, and away from the pastries, cakes, doughnuts and other fattening foods in the break room? One strategy is always to have your own snacks on hand. If you’ve got fruit, nuts or sugar-free gum within easy reach, that doughnut will seem far less alluring. Or you can try to get the whole office to participate in a diet makeover: encourage coworkers to bring fresh fruit and salads to meetings and potlucks, instead of high-fat foods like brownies and mac-and-cheese.

Maybe someday, the workplace candy culture will go the way of the three-martini lunch and Mad Men-era office smoke breaks. But until then, you may have to take it upon yourself to watch your diet. As Shellenbarger reports, Melanie Meek, an employee of a Canton, Ohio, real-estate firm, has lost 80 lbs. since 2009, in part by asking her co-workers keep their unhealthy snacks out of sight. She told them: “If I have to smell it, I will move it.”