sofidexFor patientsAre you a clinician? Clinical site

Health Library  ›  Conditions  ›  Magnesium deficiency

Condition

Magnesium deficiency

Magnesium deficiency means the body has too little magnesium to support normal nerve, muscle, and heart function.

10 min readConditionReviewed 2026-08-20

PDF
What it is
Too little magnesium in the body
Body system
Muscles, nerves, heart, bones, and metabolism
Main symptoms
Weakness, muscle cramps, tremor, abnormal heartbeat
What causes it
Digestive losses, kidney losses, medicines, or low intake
How it is diagnosed
Blood magnesium test, with related blood and urine tests
Main treatment
Magnesium replacement and treatment of the cause
Can it be cured?
Sometimes — when the underlying cause is corrected
Is it an emergency?
Sometimes — seizures or a dangerous abnormal heartbeat
Long-term outlook
Usually good when the cause is found and treated

Overview

Magnesium is a mineral that helps your nerves, muscles, heart, bones, and cells work normally. It is also involved in controlling blood sugar, blood pressure, and the movement of other minerals, including potassium and calcium.

Magnesium deficiency means your body does not have enough magnesium. A low magnesium level in the blood is called hypomagnesemia. These terms are closely related, but they are not identical. Most magnesium is stored inside cells and bones, so the blood level may remain normal during early or mild deficiency.

Mild deficiency may cause no clear symptoms. When the level becomes lower, it can affect muscles and nerves. Severe deficiency can disturb the heart’s rhythm or cause seizures, although this is uncommon and usually occurs in people who are seriously unwell or have ongoing magnesium loss.

Low food intake alone does not usually cause severe deficiency in otherwise healthy people. It is more often linked to long-lasting diarrhea, poor absorption, kidney losses, certain medicines, or a combination of these factors.

Symptoms

Mild magnesium deficiency often has no symptoms. When symptoms occur, they can be vague and may have many other causes.

Possible symptoms include:

More marked deficiency can make muscles tighten or spasm. It may also cause confusion, unusual eye movements, severe tremor, seizures, or an abnormal heart rhythm.

Low magnesium often occurs with low potassium or low calcium. These problems may add symptoms such as muscle weakness, cramps, tingling around the mouth, or heartbeat changes. Potassium or calcium may remain difficult to correct until the magnesium level is also restored.

Symptoms alone cannot confirm magnesium deficiency. Weakness, cramps, and palpitations are common and can come from dehydration, thyroid conditions, medicine effects, anxiety, or other mineral imbalances.

Causes and risk factors

Magnesium deficiency usually develops because magnesium is not being absorbed, is being lost through the digestive system, or is being removed by the kidneys.

Digestive causes include long-lasting diarrhea, repeated vomiting, inflammatory bowel disease, coeliac disease, and other conditions that interfere with nutrient absorption. Surgery involving the stomach or intestines can also reduce absorption.

The kidneys normally help keep the right amount of magnesium in the body. Some kidney conditions cause too much magnesium to pass into the urine. Poorly controlled diabetes may also increase urinary losses, especially when blood sugar is high.

Heavy or long-term alcohol use can contribute through poor nutrition, diarrhea, vomiting, and increased loss through the kidneys.

Medicines that may lower magnesium include some diuretics like furosemide or hydrochlorothiazide, which are often called water tablets, and proton pump inhibitors like omeprazole or lansoprazole used to reduce stomach acid. Certain antibiotics like amoxicillin or doxycycline, chemotherapy medicines, and immune-suppressing medicines can also cause magnesium loss. The likelihood depends on the medicine, how long it is used, and your other health conditions. Do not stop a prescribed medicine without medical advice.

Risk is also higher during severe illness, pancreatitis, or refeeding after a prolonged period of poor nutrition. Rare inherited conditions can affect how the intestines or kidneys handle magnesium.

Older adults may be more vulnerable because food intake, absorption, kidney function, and medicine use often change with age.

Diagnosis

A blood test is the usual first test. It measures magnesium in the liquid part of your blood. Laboratories may use slightly different reference ranges, so the result should be interpreted using the range shown on your report.

A low blood magnesium result supports the diagnosis. However, a normal result does not always rule out reduced body stores because very little of the body’s magnesium is found in the blood.

Other blood tests may check potassium, calcium, phosphate, kidney function, blood sugar, and sometimes vitamin D. These tests can identify related problems or suggest a cause.

A urine magnesium test may help show whether magnesium is being lost through the kidneys. This may involve a urine sample or urine collected over a longer period. The result needs to be considered alongside the blood magnesium level and kidney function.

You may also be asked about diarrhea, vomiting, alcohol use, eating patterns, previous digestive surgery, and all medicines or supplements you take. An electrocardiogram, or ECG, may be used if you have palpitations, severe deficiency, or symptoms that could involve the heart.

Treatment and management

Treatment has two aims: replace magnesium and address why it became low.

Mild deficiency without serious symptoms is often managed with magnesium taken by mouth. Different forms are available. They vary in how well they are absorbed and how likely they are to cause diarrhea. The appropriate product and amount are based on the blood result, symptoms, kidney function, and likely cause.

Food can help rebuild and maintain magnesium stores. Useful sources include nuts, seeds, beans, lentils, whole grains, leafy green vegetables, and some fortified foods. Food may not be enough when there are continued digestive or kidney losses.

Magnesium may be given into a vein when deficiency is severe, symptoms are significant, the heart rhythm is affected, or the digestive system cannot absorb treatment. This is usually done in a healthcare setting because the level and response may need monitoring.

The underlying cause also matters. Diarrhea or vomiting may need treatment. Diabetes management may need review. If a medicine is contributing, a clinician may consider whether it can be changed, reduced, or monitored more closely. It should not be stopped on your own.

Potassium and calcium may need treatment at the same time. Follow-up blood tests may be needed because the blood level can improve before the body’s stored magnesium has been fully replaced.

Too much magnesium from supplements can cause diarrhea and stomach upset. In people with reduced kidney function, magnesium can build up because the kidneys may not remove it effectively. This can lead to weakness, low blood pressure, slowed breathing, or heartbeat problems. People with kidney disease should seek advice before using magnesium supplements or magnesium-containing laxatives and antacids.

Complications

Untreated severe magnesium deficiency can disrupt the electrical signals that control the heartbeat. This may cause a fast or irregular rhythm. Some rhythm problems can be serious, especially in people with heart disease or other mineral abnormalities.

Severe deficiency can also cause seizures, pronounced muscle spasms, confusion, or reduced consciousness.

Low potassium and low calcium are common related complications. These levels may not respond fully to treatment until magnesium is corrected.

Long-lasting deficiency may affect bone health because magnesium helps regulate bone formation, vitamin D, and calcium balance. The effect on an individual person depends on the degree and duration of deficiency and other health factors.

Most complications are preventable when the cause is identified and magnesium is restored. Mild deficiency usually does not cause permanent harm.

Prevention

Magnesium deficiency cannot always be prevented. It may result from an inherited condition, necessary medicine, kidney losses, or a digestive illness that limits absorption.

Eating a varied diet can reduce the risk of deficiency caused by low intake. Regular sources include legumes, nuts, seeds, whole grains, green vegetables, and magnesium-fortified foods.

If you have ongoing diarrhea, repeated vomiting, malabsorption, poorly controlled diabetes, or a history of digestive surgery, managing that condition can help reduce further losses. People taking medicines known to lower magnesium may sometimes need blood tests, particularly when treatment is prolonged or other risk factors are present.

Routine magnesium supplements are not necessary for everyone. They can cause side effects and may be unsafe when kidney function is reduced. A supplement should not replace assessment of continuing symptoms or an underlying cause.

Living with it and what to expect

Many people recover once magnesium is replaced and the cause is corrected. Symptoms such as cramps, tremor, or weakness may improve as the magnesium and related mineral levels return toward normal. The timing is influenced by how low the level was and whether losses are continuing.

A short-term problem, such as a period of vomiting or diarrhea, may require treatment only until eating and digestion return to normal. If a medicine or long-term digestive condition is responsible, magnesium may fall again. Ongoing monitoring or replacement may then be needed.

People with inherited kidney or intestinal conditions may need long-term specialist follow-up. Treatment can reduce symptoms and complications, but it may not remove the underlying tendency to lose magnesium.

Follow-up commonly involves blood tests and a review of symptoms, medicines, food intake, and kidney function. Some people also need potassium or calcium monitoring.

Most people can continue their usual activities once symptoms settle. If deficiency caused fainting, seizures, or a heart rhythm problem, return to driving, strenuous exercise, or safety-sensitive work should be discussed with the healthcare team managing the episode.

When to get medical help

Arrange a routine medical appointment if you have persistent muscle cramps, tremor, weakness, tingling, or palpitations, especially if you also have ongoing diarrhea, repeated vomiting, poor food intake, diabetes, digestive disease, or a medicine that can lower magnesium.

You should also seek routine follow-up if a previous blood test showed low magnesium. Repeat testing may be needed even if you feel well.

Seek urgent medical advice if palpitations are new, prolonged, or accompanied by light-headedness. Urgent assessment is also appropriate for worsening muscle spasms, marked weakness, confusion, or an inability to keep fluids down.

Call emergency services for:

These symptoms do not always mean magnesium deficiency, but they need prompt assessment.

Go through these one question at a time →

Common questions

Can magnesium deficiency cause heart palpitations?

It can. Magnesium helps control the heart’s electrical activity, and a low level may contribute to an irregular heartbeat. Palpitations have many other causes, so new or persistent symptoms should not be assumed to come from magnesium alone.

Can magnesium deficiency cause anxiety?

Low magnesium can cause symptoms such as tremor, palpitations, weakness, or sleep disturbance that may feel similar to anxiety. Research has not established magnesium deficiency as the cause of most anxiety. A blood test and broader assessment may be needed when symptoms persist.

How quickly can magnesium levels recover?

Blood levels may improve relatively quickly after treatment, but restoring the body’s stores can take longer. Recovery may be delayed if diarrhea, poor absorption, kidney loss, or a contributing medicine continues.

What foods contain the most magnesium?

Good sources include pumpkin and other seeds, almonds and other nuts, beans, lentils, whole grains, and leafy green vegetables. Fortified cereals may also contain magnesium. The amount differs between foods and products.

Does a normal blood test rule out magnesium deficiency?

Not completely. Most magnesium is stored in bones and cells, so early depletion may not lower the blood result. However, blood testing remains the standard starting point and is especially useful for identifying clinically important hypomagnesemia.

Should I take magnesium without a blood test?

A normal food intake is generally the safest way to obtain magnesium. Supplements may cause diarrhea, interact with some medicines, or build up when kidney function is reduced. Persistent symptoms are better assessed than treated by guessing the cause.

Sources

  1. 1Magnesium — Fact Sheet for Health ProfessionalsNational Institutes of Health Office of Dietary Supplements
  2. 2HypomagnesemiaMerck Manual Professional Edition
  3. 3U.S. Food and Drug Administration: Low magnesium levels associated with long-term use of proton pump inhibitor drugs
  4. 4Magnesium Blood TestMedlinePlus

Cite this page

NLM

sofidex [Internet]. Daloreum; c2026. Magnesium deficiency; [reviewed 2026 Aug 20; cited 2026 Nov 10]. Available from: https://sofidex.com/patients/conditions/magnesium-deficiency

APA 7th

sofidex. (2026, August 20). Magnesium deficiency. Daloreum. Retrieved November 10, 2026, from https://sofidex.com/patients/conditions/magnesium-deficiency

AMA 11th

Magnesium deficiency. sofidex. Reviewed August 20, 2026. Accessed November 10, 2026. https://sofidex.com/patients/conditions/magnesium-deficiency

The cited date is today’s, because a citation records when you read the page. The reviewed date is when a clinician last checked it.