Oh, those holiday pitfalls: a martini and a handful of Chex mix at the office party, Grandma's fruitcake, the plate of gingerbread cookies from your neighbor. Eating all those goodies will definitely cost you.

To burn off the calories in one gingerbread cookie, you will have to swim 18 minutes. The martini and party mix will take 47 minutes on the bike.

And the fruitcake? Take an 84-minute walk.

Those are the calculations in a new book that lists the calorie content of 7,500 foods and tells you just how long it will take to work it off.

"Most of us have no idea what a calorie is worth," said Charles Stuart Platkin, author of "The Diet Detective's Count Down" and other books.

Platkin, a Miami-based public health advocate, spent nearly a year compiling the list, which includes fast-food dishes, popular restaurant menu fare and most grocery items. The exercise calculations are for a 155-pound person; add time if you're lighter, subtract time if you're heavier.

Some of the numbers are downright depressing.

A half-pound of prime rib will cost you 230 minutes of yoga. A Starbucks Caramel Macchiato is 38 minutes on the bike — add 81 minutes if you grab a piece of coffee cake. You'll have to walk 173 minutes to burn off a Whopper from Burger King.

Platkin, 44, said it is like money: Once diners know a food's caloric value, they can weigh in their mind whether it is "splurge worthy."

Some of the biggest food rip-offs include crackers, at 12 to 20 calories apiece, and premium ice creams, Platkin said. It will take 72 minutes to walk off a half-cup of Ben and Jerry's Butter Pecan, versus 31 minutes for Edy's Slow Churned Light version of the same flavor. Predictably, fruits and veggies provided the best bargains.

The holidays are one of the trickiest seasons for dieters. Research shows people tend to gain just under a pound during the holidays. It only takes an extra hundred calories a day (five Ritz crackers) over the holiday season to gain a pound. And they don't typically lose it by spring.

"People tend to relax their guard and let themselves go during the holidays. And there's also more food around so we also consume more," said Platkin, who became his own diet detective after losing 50 pounds 14 years ago.

The book could come in especially handy for nibblers.

"Nibblers tend to be worse estimators because they feel like they're not eating anything — a few fries, a bit of cookie. But they add up to be significant calories," said Platkin, a certified trainer who is finishing up his Ph.D. in public health.

Most Americans underestimate how much they're actually eating by as much as 40 percent, he said.

Experts said the book's premise could encourage or discourage dieters, depending on the reader.

"For some people that's really a helpful thing. It really shows them it takes a fair amount of physical activity," said Jeanne Goldberg of the Friedman School of Nutrition at Tufts University.

On the flip side, she said, the numbers might seem so daunting that others skip exercising altogether.

Platkin said the book is not designed for people to look up every morsel they consume in a day. But it does provide a frame of reference.

Even if dieters don't end up doing the exercises, they will probably think twice before eating that slice of pumpkin pie. (An 81-minute walk).