Medications that you take to improve your health—including, paradoxically, some of the same drugs that are used to treat obesity-related illnesses—could be adding inches to your waistline.

Shocking fact: It’s estimated that more than 500 widely used medications have weight gain as a possible side effect. It doesn’t happen to everyone, but be suspicious if you notice that you’ve gained a few pounds (or more) soon after starting a new medication. In some cases, the extra pounds drop off if the drug is stopped—but not always.

Take action: If the scales start creeping upward, tell your doctor. In many cases, switching to a different type of medication—or even another drug in the same class—can help. If the medication is working well, you can instead ask your doctor about taking a lower dose. In some cases, this may stem the weight gain but still have a therapeutic effect. Among the common suspects…*

• SSRI antidepressants. The emotional and physical tolls of depression are widely recognized. But most people don’t realize that the risk for obesity could jump by as much as 58% if you’re depressed…and, in a cruel twist, the most popular drugs for treating depression can cause even more weight gain.

Up to 25% of patients who take antidepressants, including the selective serotonin reuptake inhibitors (SSRIs), notice that they’ve gained weight. It’s common for drugs such as paroxetine (Paxil) and sertraline (Zoloft) to trigger weight gain that totals 10 pounds or more.

It is possible that the drugs’ effects on serotonin, a neurotransmitter involved in mood, changes both appetite and the body’s ability to metabolize nutrients. People who feel better after treating depression also may find that they’re enjoying life (and food!) more than they did before. Weight gain mainly occurs in patients who have taken the drugs for more than six months.

My advice: Ask your doctor about switching to venlafaxine (Effexor XR) or nefazodone (Serzone). These antidepressants are effective but unlikely to cause weight gain. Another popular antidepressant, bupropion (Wellbutrin), can cause some people to lose weight.

• Antihistamines. You’re unlikely to gain weight by taking an occasional antihistamine (for example, during allergy seasons—spring, summer and/or fall), but people who regularly take drugs such as fexofenadine (Allegra) or cetirizine (Zyrtec) often gain weight. It’s believed that drugs used to block the effects of histamine may trigger brain changes that boost appetite.

Important finding: In a 2010 study published in Obesity, patients who took antihistamines daily to treat allergies had larger waist circumferences and higher insulin levels than those who didn’t take these drugs.

My advice: If you think an antihistamine is affecting your weight, ask your doctor about switching to a nonsedating antihistamine, such as loratadine (Claritin). You won’t have the drowsiness that can occur with older antihistamines (such as Benadryl). You’ll likely have more energy and might burn more calories.

• Diabetes drugs. If you’ve been diagnosed with type 2 diabetes, there’s a good chance that you’re taking one of the sulfonylureas, a class of drugs that includes chlorpropamide (Diabinese) and glyburide (such as Micronase). They’re useful drugs because they stimulate the pancreas to secrete more insulin, but they may cause weight gain.

Patients who take these drugs, which also can change how the body metabolizes carbohydrates and sugar, gain, on average, a total of about four pounds.

My advice: Talk to your doctor about metformin, a biguanide medication that helps improve the body’s sensitivity to insulin and lowers the amount of sugar produced by the liver. This drug is less likely to cause weight gain and even could help obese people lose extra weight.

As an alternative, consider one of the newer, self-injectable drugs that have similar effects. Liraglutide (Victoza) is taken once daily…another injectable drug, dulaglutide (Trulicity), is taken once a week. The drugs closely mimic the body’s natural insulin responses—and make weight gain less likely.

Tamoxifen (Nolvadex, Emblon, others). It blocks the effects of estrogen on breast cells and is used for the treatment and prevention of breast cancer. Some studies have found that women who take it can gain a total of 20 pounds or more within one to three years.

When you’re dealing with cancer, weight is probably not your greatest concern—but the extra pounds can increase your risk for diabetes and other health problems. Important: It’s not entirely clear if tamoxifen directly causes weight gain. Women with cancer often deal with depression, which could negatively affect their eating habits and activity levels. Other drugs that are used in cancer treatments, such as steroids, also can lead to weight gain.

My advice: As much as you can, try to make a healthy lifestyle—wholesome foods, regular exercise, etc.—part of your cancer care. If you’re doing well on a brand-name version of tamoxifen, keep taking it. The drug has a narrow therapeutic index, which means that even slight variations in blood levels—which can occur when you switch to a generic—can decrease the effectiveness and/or cause weight gain or other side effects.

Tamoxifen usually is taken for five years, but some patients may be able to stop it after two to three years and use an aromatase inhibitor drug instead. Two of these drugs anastrozole (Arimidex) and exemestane (Aromasin) are associated with less weight gain.

Divalproex sodium (Depakote). This drug, also known as valproic acid, is commonly prescribed for seizures, bipolar disorder and migraine prevention. It often increases appetite as well as cravings for fast-food fats and carbohydrates.

Important finding: A 2007 study published in Seizure found that about 24% of men and 44% of women gained significant amounts of weight (14 pounds, on average) after taking the drug for a year or more.

Other antiseizure drugs may also be used as mood stabilizers. Two of these medications, carbamazepine (Tegretol) and oxcarbazepine (Trileptal), may lead to weight gain, but a third drug, lamotrigine (Lamictal), is less likely to have this side effect. In fact, it may result in weight loss.

Lithium, another drug used to treat bipolar disorder, might (or might not) cause less weight gain than Depakote.

My advice: If you’re taking Depakote, ask your doctor if other mood-stabilizing medications will work for you. If there is no viable substitute, exercise and a healthy diet are essential while taking this drug.

• Atypical antipsychotics. They can be lifesaving medications for patients with schizophrenia or other psychiatric disorders, but they’re known for causing serious weight gain. The drugs affect dopamine and leptin, substances in the body that impact both food cravings and appetite.

The older drugs for treating psychiatric conditions are known to cause dystonic reactions, such as involuntary muscle movements. The newer atypical drugs, including clozapine (Clozaril) and olanzapine (Zyprexa), don’t generally have this unpleasant side effect, but about one-third of patients gain 10 to 30 pounds within the first year.

My advice: Never stop taking an antipsychotic drug without your doctor’s advice—the mental health consequences can be severe. Helpful: Talk to your doctor about how to control weight gain when you first start taking the drug. Research has shown that patients who talk to their doctors about their weight concerns when starting any new medication—and who follow up with healthier eating and other lifestyle changes—often can lose weight and/or keep it off during treatment.

However, with any drug that causes weight gain, you may need the medication to treat a specific medical condition. Once the condition is under control, you then can focus on weight loss if needed.

*Always check with your doctor before stopping a prescribed medication or changing the dose. Making such changes without a physician’s advice can cause serious side effects.