Every year, we resolve to hit the gym more often and get fit. And by the end of January, many of us have missed workouts or given up altogether.

According to Yifan Zhang, a 2010 graduate of Harvard College, part of the problem is that customers see gym membership fees as money spent, or “a sunk cost, especially if you pay at the beginning of the year.’’ That prompted the idea for Gym-Pact in Boston, which she created with Harvard classmate Geoff Oberhofer.

Gym-Pact offers what Zhang calls motivational fees — customers agree to pay more if they miss their scheduled workouts, literally buying into a financial penalty if they don’t stick to their fitness plans. The concept arose from Zhang’s behavioral economics class at Harvard, where professor Sendhil Mullainathan taught that people are more motivated by immediate consequences than by future possibilities.

Zhang and Oberhofer translated that principle to workout motivation. If missing a workout cost people money, they’d be more motivated to stick with it, they thought.

“If you have a toothache, you go to the dentist. If there’s a cavity, you know it needs to get filled in, but if it doesn’t hurt right now, you may not bother,’’ Mullainathan said. “In traditional gym memberships, not going is not very costly. In this one, you actually might feel the pain of not going immediately.’’

Gym-Pact launched a pilot program in October with a small group of participants, including some first-time gym members, at Bally Total Fitness in Boston. A second group of about 20 customers kicked off 2011 at Planet Fitness locations in Government Center in Boston and Porter Square in Cambridge.

Gym-Pact negotiated a group rate with Planet Fitness, then paid the membership fees for participants, who in return for a free membership agreed to work out at least four times per week. If they fail to follow the schedule in any one week, the participants pay $25. If they leave the program for any reason other than injury or illness, they will pay $75. For now the fees will be used to pay for the gym memberships and to build a financial aid fund.

“We don’t want to profit off of people’s failures,’’ said Oberhofer, adding that the company will eventually make money from referral fees and revenue-sharing affiliate programs with gyms.

Gym-Pact is somewhat experimental. Based on feedback from the two groups, Zhang and Oberhofer plan to tweak the fee structure to allow it to be customized to a customer’s goals. Future iterations may include a combination of discounted gym memberships and smaller penalties that apply daily rather than weekly.

“The lowest would be $5 or $10 for each day that you miss,’’ Zhang said. “That way, you don’t stop exercising the rest of the week.’’

Amanda Deutsch, a student at Harvard, joined Gym-Pact in January because she “thought it’d be a good way to get myself to go to the gym a bit more often.’’

So far, it has worked.

“I can’t imagine that people want to pay,’’ she said.

Real accountability was critical, but collecting attendance data from gyms proved problematic, so the partners created a text-messaging system. E-tokens are kept at the gym’s front desk, with a digital password that changes every 60 seconds. Participants text the password on their way in and out of the gym.

Bill Aulet, managing director of the MIT Entrepreneurship Center, said motivational strategies have proven effective elsewhere.

“The most amazing story of 2010, to me, was Groupon,’’ the online coupon service that offers discounts for limited periods of time, and only if enough customers sign up for the deal. “That’s a motivational technique in a different way.’’

Aulet warned that if Gym-Pact is too effective, it could stretch resources at participating gyms, a dynamic he has observed at some popular Groupon merchants.

“The interesting thing about these kinds of companies is that they could not have happened in Silicon Valley,’’ he said. “There, they think you solve problems with technology. But these companies that have innovative business models and are based off behavioral economics have proven to be extraordinarily successful.’’

© Copyright 2011 Globe Newspaper Company.