Losing weight may be tricky when you have a challenging career. Consider the many potential saboteurs: having little time to exercise, eating out frequently for business events, and facing the constant temptation of cookie trays.

Your weight is controlled by the number of calories you eat balanced against the number of calories you use. To lose weight, you must use more calories than you eat. The first step? Keep a food and exercise diary for about two weeks. Record when, what, and how much you eat throughout the day, and also record when and for how long you’re physically active. Then, evaluate the information you’ve gathered.

What kinds of situations, thoughts, or emotions trigger you to eat or not eat, exercise or not exercise? Do you snack under deadline pressure? Do you save most of your eating for when you get home from work? Are you grabbing a piece of candy every time you pass the receptionist’s desk?

Once you have a firm idea of your eating and activity patterns, tailor your weight-loss plan to address those problem areas.

The following strategies can help you troubleshoot and personalize your weight-loss plan to manage common workplace weight-loss roadblocks.

Plan ahead

The number of calories you need to eat each day and not gain weight depends on your activity level, age, and gender. To lose weight, eat fewer calories than you require and use more calories by increasing your physical activity. To help you discover the number of calories and the amounts of healthy foods you should eat each, go to the U.S. Department of Agriculture’s Choose My Plate website at choosemyplate.gov.

Your daily calorie allowance should come from foods that supply the vitamins and other nutrients your body needs. Your eating plan should include a variety of vegetables and fruits, whole grains, lean meats, poultry, beans and low-fat or fat-free milk.

Try to avoid foods that provide calories without nutrition. From the office goodie jar and impromptu birthday parties to vending-machine fare and leftover office-meeting food trays, workplaces typically offer a cornucopia of opportunities for unplanned eating and, thus, extra calories.

To reduce the temptation to indulge, have your weight-loss plan include three average-sized meals and at least two small healthy snacks, or five small mini-meals. By fueling yourself well throughout the day, you won’t be as hungry and vulnerable to nibbling.

It also can protect you from overeating at night.

Many people don’t eat that much at work because they’re distracted. But once they get home, they consume a full day’s worth of calories and then some because they’re so hungry.

Breakfast is an especially important meal to include in your plan. It jump-starts your metabolism, which actually helps you burn more calories throughout the day.

Dining out

If your job requires frequent eating out, you can still stick to your weight-loss goal by taking control of the situation.

If possible, plan ahead. Research the restaurant and check out the menu before you arrive. Many restaurants now provide their menus online, or you can have it faxed to your office. If you don’t have time to plan, ask at the restaurant to see the heart healthy or lower fat dishes on the menu, which most restaurants do provide.

Most restaurants also serve portion sizes that are too large. Consider eating half or less of the portion you are served; take the rest home for another meal.

Don’t deprive yourself

If you really want the birthday cake at the office party or the steak and potatoes with sour cream at the restaurant meeting, go ahead and have some, but limit the portion size.

Don’t deprive yourself of enjoying foods that you are craving. If you do, you can run the risk of overeating. Portion control is key.

So, have a small piece of cake or the petite filet and factor it into your daily plan.

Meanwhile, team up with others who share your healthy goals and spur each other on.