provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeWell-beingSupplements and Herbs

From Antibiotics to Calcium: 8 Magnesium Interactions to Be Aware Of

Emilie White, PharmDRachel Feaster, PharmD, BCOP, BCPS
Published on December 16, 2024

Key takeaways:

  • Magnesium is a common over-the-counter (OTC) supplement. It’s also an ingredient in some OTC antacids and laxatives. Magnesium is a natural mineral, but it can still interact with other medications and supplements.

  • Magnesium can lower the absorption of bisphosphonates, some antibiotics and antiviral medications, and gabapentin (Neurontin) if they’re taken together. In some cases, separating the two products can help you avoid the interaction. But in other cases you may need to avoid the combination.

  • Some diuretics and long-term use of proton pump inhibitors can lower magnesium levels in the body. If you’re taking a magnesium supplement, let your prescriber know before starting these medications.

  • Calcium and high doses of zinc may prevent your body from absorbing magnesium. Separating these supplements can help ensure you’re getting the amount you need.

Access savings on related medications

Light-red background with three circles across the frame. In the center, on a green circle, is a brown glass vitamin bottle labeled “Magnesium.” On the left, on a red circle, is a single oblong white pill. On the right, on a red circle, is a single round white pill.
GoodRx Health

Magnesium is a mineral that’s essential to keep your body working properly. It helps regulate muscle and nerve function, control blood glucose levels, and regulate blood pressure. Magnesium even plays a role in energy production, a healthy immune system, and bone health. 

Magnesium supplements, such as magnesium oxide, are widely available over the counter (OTC). Magnesium is also a common ingredient in some antacids and constipation products, such as Milk of Magnesia (magnesium hydroxide) and Mylanta (aluminum hydroxide / magnesium hydroxide / simethicone). And magnesium citrate is an OTC laxative that’s often taken before a colonoscopy.

No matter which type of magnesium you’re taking, be aware that it can interact with other medications and supplements. Knowing about magnesium interactions can help you avoid unwanted issues while you’re taking it.

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

Magnesium interactions list

Below is a list of medications and supplements that can interact with magnesium. Keep in mind that other interactions are possible. So be sure to review your medication list with your pharmacist or prescriber before taking a magnesium product. They can make sure it’s a safe option for you.

Magnesium interactions list

  • Bisphopsphonates

  • Tetracycline antibiotics

  • Fluoroquinolone antibiotics

  • Nitrofurantoin (Macrobid, Macrodantin)

  • Gabapentin (Neurontin)

  • Diuretics

  • Zinc

  • Calcium

  • Certain antiviral HIV medications

  • Proton pump inhibitors

Let’s take a closer look at eight magnesium interactions you should be aware of.

1. Bisphosphonates (osteoporosis medications)

Bisphosphonates are medications that treat osteoporosis. They help prevent your body from breaking down bone. Common bisphosphonates include:

  • Alendronate (Fosamax)

  • Ibandronate (Boniva)

  • Risedronate (Actonel)

  • Risedronate DR (Atelvia)

GoodRx icon

Magnesium can decrease the absorption of bisphosphonates if they’re taken together. This can result in lower bisphosphonate levels in the body. As a result, your bones may not be as protected as they should be. To prevent this, avoid taking any products that contain magnesium within 2 hours of taking a bisphosphonate.

Good to know: This interaction applies only to oral bisphosphonates. If you receive an injectable bisphosphonate, such as zoledronic acid (Zometa), you don’t need to worry about taking magnesium with it.

2. Certain antibiotics

Magnesium can also bind to certain antibiotics and prevent your body from absorbing them properly. This can lower antibiotic levels and lead to an untreated or undertreated infection.

There are three main types of antibiotics affected by this interaction, including:

Fluoroquinolones

Tetracyclines

  • Tetracycline

  • Doxycycline (Oracea, Doryx)

  • Minocycline (Minocin)

Nitrofurantoins

  • Nitrofurantoin monohydrate / macrocrystals (Macrobid)

  • Nitrofurantoin macrocrystals (Macrodantin)

To avoid this interaction, take your antibiotic at least 2 hours before or 4 to 6 hours after taking a product that contains magnesium. You can also talk to your healthcare team about alternative treatments that won’t interact with your antibiotic.

3. Gabapentin

Gabapentin is a medication that treats seizures and nerve pain. Magnesium can lower gabapentin levels by about 20% to 40% if they’re taken together. This can make gabapentin less effective, which can increase your pain symptoms or risk of having a seizure.

It’s recommended to wait at least 2 hours after taking a product that contains magnesium before taking gabapentin.

4. Diuretics

Diuretics, also known as water pills, help remove excess fluid from the body. Some diuretics can also lower magnesium levels. This includes loop diuretics, such as furosemide (Lasix), as well as thiazide and thiazide-like diuretics, such as hydrochlorothiazide.

This interaction shouldn’t be an issue if you’re taking an antacid or laxative that contains magnesium. But before starting a diuretic, it’s a good idea to tell your prescriber if you’re taking a magnesium supplement. They may want to keep an eye on your magnesium levels to make sure they don’t drop below normal. And you shouldn’t start taking a magnesium supplement while taking a diuretic unless your healthcare team suggests it.

5. Zinc

Zinc and magnesium are generally safe to take together. But very high doses of zinc (142 mg per day or more) can prevent your body from absorbing magnesium. That being said, it’s recommended to take no more than 40 mg of zinc per day. So the chance of this interaction is low if you stay within the recommended daily dose of zinc.

If you’re taking a magnesium supplement, ask your healthcare team about the appropriate zinc dosage for your needs. Keep in mind that zinc is often included in OTC multivitamins and immunity support products, such as Airborne or Emergen-C. So be sure to look at the combined amount of zinc in all the products you’re taking to ensure you don’t exceed the recommended daily dose.

6. Calcium

Calcium and magnesium are both essential minerals for keeping your bones healthy. But there’s some evidence that if you take them at the same time, they may compete for absorption in your gut. This means it may be harder for your body to absorb both minerals effectively.

If you take calcium and magnesium supplements, it’s best to take them at separate times. There isn’t a set period of time, but at least 2 to 4 hours apart is generally enough to make sure you’re absorbing each supplement properly.

Good to know: This interaction doesn’t seem to apply to magnesium and vitamin D. In most cases, these supplements are safe to take together.

7. Some antiviral HIV medications

Magnesium can affect your body’s absorption of integrase strand transfer inhibitors (INSTIs), a class of HIV antiviral medication. Examples include:

  • Bictegravir (Biktarvy)

  • Cabotegravir (Vocabria, Apretude)

  • Dolutegravir (Tivicay)

  • Raltegravir (Isentress)

When taken together, magnesium products can lower the absorption of these medications. This can make them less effective and leave your condition undertreated. Lower levels of these HIV medications can also contribute to the development of resistance. This can make HIV harder to treat over time.

It’s best to avoid taking any magnesium-containing products with these HIV medications. Ask your healthcare team about alternatives that won’t interact with your antiviral regimen.

8. Proton pump inhibitors

Proton pump inhibitors (PPIs) help relieve symptoms of gastroesophageal reflux disease and  chronic heartburn. They’re available OTC and with a prescription. Examples include:

  • Pantoprazole (Protonix)

  • Omeprazole (Prilosec)

  • Esomeprazole (Nexium)

  • Lansoprazole (Prevacid)

PPIs can lower magnesium levels if you take them long term (more than 1 year). And sometimes, a magnesium supplement isn’t enough to keep your levels within a healthy range. If you’re taking a magnesium supplement to treat low magnesium levels, your risk for this side effect may be higher.

If you’re taking a magnesium supplement and need a PPI short term, it’s not likely to cause a problem. But check with your healthcare team before taking a PPI long term to make sure it’s  safe for you.

The bottom line

Magnesium is widely available as an over-the-counter (OTC) supplement. It’s also a common ingredient in OTC antacids and laxatives. Even though it’s a natural mineral, magnesium can interact with other medications and supplements.

Magnesium can lower the absorption of certain antibiotics and antiviral medications, bisphosphonates, and gabapentin (Neurontin). Certain diuretics, long-term use of proton pump inhibitors, and high doses of zinc can lower magnesium levels in the body. Calcium can also interfere with magnesium absorption if they’re taken at the same time.

In some cases, you can avoid a magnesium interaction by separating the two products by several hours. But in other cases, you should avoid magnesium products altogether. Talk to your healthcare team for guidance.

why trust our exports reliability shield

Why trust our experts?

Emilie White, PharmD
Emilie White is a clinical pharmacist with over a decade of hospital pharmacy experience. Her professional areas of interest include critical care as well as infectious and autoimmune diseases.
Stacia Woodcock, PharmD
Stacia Woodcock, PharmD, is a pharmacy editor for GoodRx. She earned her Doctor of Pharmacy degree from the University of Kentucky and is licensed in New York and Massachusetts.
Rachel Feaster, PharmD, BCOP, BCPS
Rachel Feaster has over 10 years of professional experience in ambulatory, inpatient, pharmacogenomics, and oncology care. She is board certified in oncology and pharmacotherapy.

References

Adomako, E. A., et al. (2024). Magnesium disorders: Core curriculum 2024. American Journal of Kidney Diseases.

ClinicalInfo.HIV.org. (n.d.). Guidelines for the use of antiretroviral agents in adults and adolescents with HIV.

View All References (7)

Dai, Q., et al. (2007). The relation of magnesium and calcium intakes and a genetic polymorphism in the magnesium transporter to colorectal neoplasia risk. The American Journal of Clinical Nutrition.

Gröber, U. (2019). Magnesium and drugs. International Journal of Molecular Sciences.

Marchbanks, C. R. (1993). Drug-drug interactions with fluoroquinolones. Pharmacotherapy.

National Institutes of Health. (2022). Magnesium. Office of Dietary Supplements.

National Institutes of Health. (2022). Zinc. Office of Dietary Supplements.

Shutter, M. C., et al. (2023). Tetracycline. StatPearls.

U.S. Food and Drug Administration. (2017). FDA drug safety communication: Low magnesium levels can be associated with long-term use of proton pump inhibitor drugs (PPIs).

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Simple Tips to Eat Healthier

Sign up for our GoodRx Diet and Nutrition Newsletter to receive the latest healthy eating advice, recipes, and savings that are most relevant to you.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.