Health Topics
What is a magnesium blood test?
A magnesium blood test measures the amount of magnesium in a sample of your blood. Magnesium is a mineral that you get from many kinds of foods you eat. Some examples include nuts, seeds, beans, fortified breakfast cereals, green leafy vegetables, and milk.
Your body needs magnesium to help your muscles, nerves, and heart work properly. Magnesium also helps control blood pressure and blood glucose, also called blood sugar. It's important for building strong bones, and it supports your immune system.
Magnesium is a type of electrolyte. Electrolytes are electrically charged minerals. They help control the amount of fluid and the balance of acids and bases (pH balance) in your body.
Most of your body's magnesium is stored in your bones, organs, and other body tissue. Only a small amount is found in your blood. Your body tightly controls the amount of magnesium in your blood mainly through your:
- Kidneys. They filter extra magnesium from your blood and get rid of it through urine (pee). If your magnesium level is low, your kidneys limit the amount lost through urine.
- Intestines. They control how much magnesium you absorb from the foods you eat.
Abnormal levels of blood magnesium can be caused by many different conditions. So, a magnesium test may be used to help diagnose a variety of disorders.
Other names: Mg, Mag, Magnesium-Serum
What is it used for?
A magnesium blood test is used to check the level of magnesium in your blood. It's done if your health care provider thinks your levels may not be normal:
- A low magnesium level is also called magnesium deficiency or hypomagnesemia. This condition is more common than levels that are too high.
- A high magnesium level is also called hypermagnesemia. This condition is uncommon. Most cases happen in people who have kidney failure.
A magnesium blood test may also be used to help find the cause of abnormal levels of other minerals, including calcium, potassium, and phosphorus. That's because magnesium plays a role in how your body absorbs these minerals.
Why do I need a magnesium blood test?
You may need a magnesium blood test if you have symptoms that could be caused by abnormal magnesium levels.
Symptoms of low magnesium include:
- Loss of appetite
- Nausea and vomiting
- Fatigue and weakness
- Muscle cramps
- Numbness and/or tingling
- Irregular heartbeat (arrhythmia)
- Seizures (if magnesium levels are extremely low)
Symptoms of high magnesium are much the same as symptoms of low magnesium. They may also include:
- Diarrhea
- Abdominal (belly) cramping
- Cardiac arrest from extremely high levels of magnesium
You may also need to have your magnesium levels checked to monitor your health if you:
- Have a condition that's linked to abnormal magnesium levels, such as:
- Chronic kidney disease
- Diabetes that's not well controlled
- Alcohol use disorder
- Malabsorption syndrome
- Malnutrition
- Chronic (long-lasting) diarrhea
- Low levels of potassium and/or calcium
- Take medicine that can decrease magnesium levels, for example:
- Diuretics ("water pills")
- Certain antibiotics
- Proton pump inhibitors to reduce stomach acid
- Take medicine that can increase magnesium levels, for example:
- Aspirin
- Medicines that contain magnesium, such as laxatives for constipation and certain antacids for heartburn or gastroesophageal reflux disease (GERD)
- Lithium
- Are being treated with magnesium and/or calcium.
What happens during a magnesium blood test?
A health care professional will take a blood sample from a vein in your arm, using a small needle. After the needle is inserted, a small amount of blood will be collected into a test tube or vial. You may feel a little sting when the needle goes in or out. This usually takes less than five minutes.
Will I need to do anything to prepare for the test?
There's usually no preparation for a magnesium blood test. If you're having other blood tests at the same time, you may need to fast (not eat or drink) for several hours before your test.
Your provider will let you know if you need to prepare for your test. Be sure to tell your provider about any prescription and over-the-counter medicines and/or supplements that you are taking.
Are there any risks to the test?
There is very little risk to having a blood test. You may have slight pain or bruising at the spot where the needle was put in, but most symptoms go away quickly.
What do the results mean?
If the results of your magnesium blood test are abnormal, your provider will use your medical history and the results of other tests to diagnose the cause. Many different conditions can affect magnesium levels, so ask your provider to explain what your test results mean.
In general, low magnesium levels may mean that:
- You're not getting enough magnesium in your diet. Older adults and people with alcohol use disorder or malnutrition are more likely to have this problem.
- Your body isn't able absorb magnesium, even if you eat the right amount. Causes of this problem include digestive disorders, such as Crohn's disease, or taking certain medicines.
- Your body is getting rid of too much magnesium. Causes include kidney problems, long-term diarrhea, and diabetes, which can cause frequent urination (peeing) if blood glucose levels are too high.
Other health conditions linked to low magnesium include underactive parathyroid glands and pregnancy, which increases the need for magnesium.
Higher than normal magnesium levels may mean that:
- You're getting too much magnesium from dietary supplements, laxatives, antacids, or certain prescription medicines. It's rare to get too much magnesium from food alone.
- Your body has a problem getting rid of magnesium. The most common cause is kidney failure.
Other health conditions linked to high magnesium include dehydration, hypothyroidism, Addison disease, and overactive parathyroid glands.
Treatment for abnormal magnesium levels will depend on your condition.
Learn more about laboratory tests, reference ranges, and understanding results.
Is there anything else I need to know about a magnesium blood test?
The amount of magnesium in your blood may be normal even though the amount of magnesium stored in your body is low. That's because your body will take magnesium from your bones to keep blood levels stable.
To get more information about your magnesium levels, your provider may also order a magnesium in urine test or a magnesium red blood cell (RBC) test. A magnesium RBC test measures the amount of magnesium inside your red blood cells. This test may be better at finding low magnesium levels than a regular magnesium blood test.
References
- Allen MJ, Sharma S. Magnesium. [Updated 2023 Feb 20; cited 2023 Mar 20]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2023 Jan-. Available from: https://www.ncbi.nlm.nih.gov/books/NBK519036/#_NBK519036_pubdet_
- Cleveland Clinic: Health Library: Diagnostics & Testing [Internet]. Cleveland (OH): Cleveland Clinic; c2023.Hypomagnesemia; [reviewed 2022 Jun 14; cited 2023 Mar 20]; [about 10 screens]. Available from: https://my.clevelandclinic.org/health/diseases/23264-hypomagnesemia#diagnosis-and-tests
- Harvard T.H. Chan School of Public Health [Internet]. Boston: The President and Fellows of Harvard College; c2023. The Nutrition Source: Magnesium; [reviewed 2023 Mar; cited 2023 Mar 22]; [about 8 screens]. Available from: https://www.hsph.harvard.edu/nutritionsource/magnesium/
- Hinkle J, Cheever K. Brunner & Suddarth's Handbook of Laboratory and Diagnostic Tests. 2nd Ed, Kindle. Philadelphia: Wolters Kluwer Health, Lippincott Williams & Wilkins; c2014. Magnesium, Serum; p. 372.
- Merck Manual Consumer Version [Internet]. Kenilworth (NJ): Merck & Co., Inc.; c2023. Hypermagnesemia (High Level of Magnesium in the Blood); [modified 2022 Sep; cited 2023 Mar 14]; [about 3 screens]. Available from: https://www.merckmanuals.com/home/hormonal-and-metabolic-disorders/electrolyte-balance/hypermagnesemia-high-level-of-magnesium-in-the-blood
- Merck Manual Consumer Version [Internet]. Kenilworth (NJ): Merck & Co., Inc.; c2023. Hypomagnesemia (Low Level of Magnesium in the Blood); [modified 2022 Sep; cited 2023 Mar 14]; [about 3 screens]. Available from: https://www.merckmanuals.com/home/hormonal-and-metabolic-disorders/electrolyte-balance/hypomagnesemia-low-level-of-magnesium-in-the-blood
- Merck Manual Consumer Version [Internet]. Kenilworth (NJ): Merck & Co., Inc.; c2023. Overview of Magnesium's Role in the Body; [modified 2022 Sep; cited 2023 Mar 14]; [about 1 screen]. Available from: https://www.merckmanuals.com/home/hormonal-and-metabolic-disorders/electrolyte-balance/overview-of-magnesium-s-role-in-the-body
- National Institutes of Health: Office of Dietary Supplements [Internet]. Bethesda (MD): U.S. Department of Health and Human Services; Magnesium: Fact Sheet for Consumers [updated 2022 Jun 2; cited 2023 Mar 20]; [about 27 screens]. Available from: https://ods.od.nih.gov/factsheets/Magnesium-Consumer/
- National Institutes of Health: Office of Dietary Supplements [Internet]. Bethesda (MD): U.S. Department of Health and Human Services; Magnesium: Fact Sheet for Health Professionals [updated 2021 Mar 22; cited 2023 Mar 20]; [about 9 screens]. Available from: https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
- Testing.com [Internet]. Seattle (WA): OneCare Media; c2023. Electrolytes and Anion Gap Test; [modified 2022 Nov 29; cited 2023 Mar 14]; [about 10 screens]. Available from: https://www.testing.com/tests/electrolytes-and-anion-gap/
- Testing.com [Internet]. Seattle (WA): OneCare Media; c2023. Magnesium Test; [modified 2023 Jan 20; cited 2023 Mar 14]; [about 11 screens]. Available from: https://www.testing.com/tests/magnesium/
- UF Health: University of Florida Health [Internet]. Gainesville (FL): University of Florida Health; c2023. Magnesium blood test: Overview; [reviewed 2021 Jan 24; cited 2023 Mar 14]; [about 3 screens]. Available from: https://ufhealth.org/magnesium-blood-test
- University of Rochester Medical Center [Internet]. Rochester (NY): University of Rochester Medical Center; c2023. Health Encyclopedia: Magnesium (Blood); [cited 2023 Mar 14]; [about 4 screens]. Available from: https://www.urmc.rochester.edu/encyclopedia/content.aspx?contenttypeid=167&contentid=magnesium_blood
- UW Health [Internet]. Madison (WI): University of Wisconsin Hospitals and Clinics Authority; c2023. Health Information: Magnesium (Mg)Test;[updated 2022 Sep 8; cited 2022 Mar 14]; [about 3 screens]. Available from: https://patient.uwhealth.org/healthwise/article/en-us/aa11636
The information on this site should not be used as a substitute for professional medical care or advice. Contact a health care provider if you have questions about your health.