You’ve kicked the soda habit, tossed the junk food and you’re making regular appearances at your local gym. But the number on the scale just won’t budge – or worse, it keeps creeping up.

What gives?

The following might be some of the unexpected factors that are sabotaging your weight-loss efforts.

Prescription medications. If you take medication for a mood disorder, seizures, migraines or diabetes, they could be interfering with your ability to lose weight and keep it off.

It’s important to remember, though, that you should never abruptly stop taking something you’ve been prescribed by a doctor. Instead, speak with your doctor about your prescriptions and the possible side effects. He or she can usually offer alternatives that won’t work against your weight loss.

Certain medical conditions. Some medical conditions, such as a sluggish thyroid or polycystic ovarian syndrome, can also cause you to hold on to or gain weight, despite your best efforts. If you think a medical condition could be to blame for your weight woes, schedule an appointment with your doctor for an evaluation.

Menopause. Studies have shown that changes in hormone levels cause the body to store more fat cells in the abdomen, leading to that unwanted belly fat. Metabolism also slows during menopause, causing some women to gain around 10 pounds on average.

To help encourage weight loss after menopause and keep your metabolism up, do something physically active for around 20 minutes every day, and try cutting back on sugar, processed snacks and junk food.

Your friends. Researchers from Harvard found that if a friend becomes obese, then your chance of becoming obese goes up by 57 percent (if it’s a close friend, your risk increases 171 percent!). Why? Researchers seem to think it has to do with social norms: being overweight is more acceptable if your friends are overweight.

To stay on track, surround yourself with people who encourage healthy habits.

Stress. Stress not only raises your cortisol levels, leading to an increase in appetite, but it can also lead to emotional eating, often causing us to reach for high-fat, carb-heavy comfort foods like pizza, sweets and chips.

Exercise is a great way to keep both your stress and weight in check. Try calming yoga moves, a short walk on your lunch break, or some stress-busting cardio kickboxing.

Bad habits. If you’re not happy with the number on the scale, take stock of any habits that might be working against you – like skipping breakfast, not getting enough sleep or losing track of what you’re eating and drinking throughout the day – and then adjust accordingly.

Dr. Robert J. Kelly Jr. is an obesity medicine specialist and bariatric surgeon. He sees patients in Savannah and Bluffton. MemorialHealthDoctors.com.