Also Known As
Formal Name
This article was last reviewed on
This article waslast modified on
January 15, 2018.
At a Glance
Why Get Tested?

To evaluate the level of magnesium in your blood and to help determine the cause of abnormal levels of magnesium, calcium and/or potassium

When To Get Tested?

When you have symptoms such as weakness, irritability, cardiac arrhythmia, nausea, and/or diarrhea that may be due to too much or too little magnesium; when you have abnormal calcium or potassium levels

Sample Required?

A blood sample drawn from a vein in your arm; sometimes a timed urine collection that most often requires a 24-hour sample

Test Preparation Needed?

For a blood sample, overnight fasting may be required; follow any instructions that you are given.

You may be able to find your test results on your laboratory's website or patient portal. However, you are currently at Lab Tests Online. You may have been directed here by your lab's website in order to provide you with background information about the test(s) you had performed. You will need to return to your lab's website or portal, or contact your healthcare practitioner in order to obtain your test results.

Lab Tests Online is an award-winning patient education website offering information on laboratory tests. The content on the site, which has been reviewed by laboratory scientists and other medical professionals, provides general explanations of what results might mean for each test listed on the site, such as what a high or low value might suggest to your healthcare practitioner about your health or medical condition.

The reference ranges for your tests can be found on your laboratory report. They are typically found to the right of your results.

If you do not have your lab report, consult your healthcare provider or the laboratory that performed the test(s) to obtain the reference range.

Laboratory test results are not meaningful by themselves. Their meaning comes from comparison to reference ranges. Reference ranges are the values expected for a healthy person. They are sometimes called "normal" values. By comparing your test results with reference values, you and your healthcare provider can see if any of your test results fall outside the range of expected values. Values that are outside expected ranges can provide clues to help identify possible conditions or diseases.

While accuracy of laboratory testing has significantly evolved over the past few decades, some lab-to-lab variability can occur due to differences in testing equipment, chemical reagents, and techniques. This is a reason why so few reference ranges are provided on this site. It is important to know that you must use the range supplied by the laboratory that performed your test to evaluate whether your results are "within normal limits."

For more information, please read the article Reference Ranges and What They Mean.

What is being tested?

Magnesium is a mineral that is vital for energy production, muscle contraction, nerve function, and the maintenance of strong bones. It comes into the body through the diet and is absorbed by the small intestine and colon. Magnesium is stored in the bones, cells, and tissues. Normally, only about 1% of total body magnesium is present in the blood and this makes it difficult to get an accurate measurement of total magnesium content from blood tests alone. However, this test is still useful for evaluating a person's magnesium status.

A wide variety of foods contain small amounts of magnesium, especially green vegetables such as spinach, as well as whole grains and nuts. Foods that have dietary fiber are usually also sources of magnesium. The body maintains its magnesium level by regulating how much it absorbs and how much it excretes or conserves in the kidneys.

Magnesium deficiencies (hypomagnesemia) may be seen with malnutrition, conditions that cause malabsorption, and with excess loss of magnesium by the kidneys. Magnesium excess (hypermagnesemia) may be seen with the ingestion of antacids that contain magnesium and with decreased ability of the kidneys to excrete magnesium.

Someone with mild to moderate magnesium deficiency may have no or few nonspecific symptoms. Persistent or severe deficiencies can cause nausea, loss of appetite, fatigue, confusion, muscle cramps, seizures, changes in heart rate, and numbness or tingling. They can also affect calcium metabolism and exacerbate calcium deficiencies. Symptoms of excess magnesium can be similar to those of deficiency and include nausea, muscle weakness, loss of appetite, and an irregular heart rate.

How is the sample collected for testing?

A blood sample is obtained by inserting a needle into a vein in the arm. Sometimes a timed urine sample is obtained, such as a 24-hour collection.

Is any test preparation needed to ensure the quality of the sample?

Overnight fasting may be required prior to having a blood sample drawn; follow any instructions that you are given.

Accordion Title
Common Questions
  • How is it used?

    A magnesium test is used to measure the level of magnesium in the blood (or sometimes urine). Abnormal levels of magnesium are most frequently seen in conditions or diseases that cause impaired or excessive excretion of magnesium by the kidneys or that cause impaired absorption in the intestines. Magnesium levels may be checked as part of an evaluation of the severity of kidney problems and/or of uncontrolled diabetes and may help in the diagnosis of gastrointestinal disorders.

    Since a low magnesium blood level can, over time, cause persistently low calcium and potassium levels, it may be checked to help diagnose problems with calcium, potassium, phosphorus, and/or parathyroid hormone – another component of calcium regulation.

    Magnesium levels may be measured frequently to monitor the response to oral or intravenous (IV) magnesium supplements and may be ordered, along with calcium and phosphorus testing, to monitor calcium supplementation.

  • When is it ordered?

    Magnesium testing may be ordered as a follow up to chronically low blood levels of calcium and potassium. It also may be ordered when a person has symptoms that may be due to a magnesium deficiency, such as muscle weakness, twitching, cramping, confusion, cardiac arrhythmias, and seizures.

    A health practitioner may order a magnesium level to check for a deficiency as part of an evaluation of malabsorption, malnutrition, diarrhea, or alcoholism. When someone is taking medications that can cause the kidneys to excrete magnesium, testing may be performed as well. When magnesium and/or calcium supplementation is necessary, the level of magnesium in the blood may be checked at intervals to monitor the effectiveness of treatment.

    When someone has a kidney disorder or uncontrolled diabetes, a magnesium test may be ordered periodically, along with kidney function tests such as a BUN and creatinine, to help monitor kidney function and to make sure that the person is not excreting or retaining excessive amounts of magnesium.

  • What does the test result mean?

    Low blood levels of magnesium may indicate that a person is not consuming or absorbing enough magnesium or is excreting too much. Deficiencies are typically seen with:

    Increased blood levels of magnesium are rarely due to dietary sources but are usually the result of an excretion problem or excessive supplementation. Increased levels are seen in: 

  • Is there anything else I should know?

    Since magnesium is an electrolyte, a magnesium test may be ordered along with other electrolytes such as sodium, potassium, chloride, bicarbonate (or total CO2), calcium, and phosphorus to evaluate a person's electrolyte balance. If magnesium is low, it is not unusual for potassium also to be low.

    Magnesium blood levels tend to be decreased in the second and third trimesters of pregnancy.

    Normal levels of magnesium do not necessarily reflect total body stores of magnesium. The body attempts to keep blood magnesium levels relatively stable and will release magnesium from bone and tissues to accomplish this. So, the blood level may be normal with early magnesium deficiencies.

    Drugs that can increase magnesium levels include lithium, aspirin, thyroid medication, some antibiotics, and products that contain magnesium. Drugs that can decrease magnesium levels include digoxin, cyclosporine, diuretics, insulin, some antibiotics, laxatives, and phenytoin.

  • Is everyone tested for magnesium?
    Magnesium is not monitored as frequently as some other minerals. It tends to be ordered primarily when a person has an abnormal calcium level and when a person has symptoms that may be due to a magnesium deficiency or excess.
  • Should I take magnesium supplements? And if so, how much?

    People will absorb, use, and excrete magnesium at different rates and may be taking drugs that affect magnesium levels. You should talk to your health care provider about what is appropriate for your situation.

View Sources

Sources Used in Current Review

Magnesium, 24 Hour, Urine. Mayo Clinic. Available online at through Accessed October 2013.

Elin, R.J. Assessment of magnesium status for diagnosis and therapy. National Center for Biotechnology Information PubMed Database. Available online at through Accessed October 2013.

Dietary Supplement Fact Sheet: Magnesium. National Institutes of Health, Office of Dietary Supplements. Available online at through Accessed October 2013.

Serum magnesium. MedlinePlus Medical Encyclopedia. Available online at Accessed December 2013.

Magnesium measurement, urine. MUSC Health. Available online at through Accessed December 2013.

Sources Used in Previous Reviews

Thomas, Clayton L., Editor (1997). Taber's Cyclopedic Medical Dictionary. F.A. Davis Company, Philadelphia, PA [18th Edition].

Pagana, Kathleen D. & Pagana, Timothy J. (2001). Mosby's Diagnostic and Laboratory Test Reference 5th Edition: Mosby, Inc., Saint Louis, MO.

NIH (2001 August 7, Updated). Magnesium. NIH Clinical Center, National Institutes of Health, Facts About Dietary Supplements [On-line information]. Available online at through

Rude, R. [Reviewed] (2001 February 05, Updated). Magnesium. Linus Pauling Institute [On-line information]. Available online at through

Zangwill, M. [Updated] (2001 February 01, Updated). Magnesium in diet. MEDLINEplus Health Information [On-line information]. Available online at

Angelo, S. [Updated] (2001 November 05, Updated). Serum magnesium test. MEDLINEplus Health Information [On-line information]. Available online at

Merck. Magnesium Metabolism. The Merck Manual of Diagnosis and Therapy [On-line information]. Available online at through

Spengler, R. (2001 June 25, Updated). Magnesium (Mg). WebMDHealth [On-line information]. Available online at through

(Updated 2009 July 13). Magnesium. NIH, Office of Dietary Supplements [On-line information]. Available online at through Accessed March 2010.

Vorvick, L. (Updated 2009 March 9). Magnesium in Diet. MedlinePlus Medical Encyclopedia [On-line information]. Available online at Accessed March 2010.

(2005 January). U.S. Department of Health and Human Services and U.S. Department of Agriculture. Dietary Guidelines for Americans, 2005. 6th Edition, Washington, DC: U.S. Government Printing Office. Chapter 2 Adequate Nutrients Within Calorie Needs [On-line information]. Available online at through Accessed March 2010.

Novello, N. and Blumstein, H. (Updated 2009 August 18). Hypomagnesemia. eMedicine [On-line information]. Available online at through Accessed March 2010.

Ferry, R. (Updated 2010 January 8). Hypermagnesemia. eMedicine [On-line information]. Available online at through Accessed March 2010.

Pagana, K. D. & Pagana, T. J. (© 2007). Mosby's Diagnostic and Laboratory Test Reference 8th Edition: Mosby, Inc., Saint Louis, MO. Pp 640-641.

Wu, A. (© 2006). Tietz Clinical Guide to Laboratory Tests, 4th Edition: Saunders Elsevier, St. Louis, MO. Pp 706-709.

Ask a Laboratory Scientist

lab scientist

Your questions will be answered by a laboratory scientist as part of a voluntary service provided by one of our partners, the American Society for Clinical Laboratory Science (ASCLS). Click on the Contact a Scientist button below to be re-directed to the ASCLS site to complete a request form. If your question relates to this web site and not to a specific lab test, please submit it via our Contact Us page instead. Thank you.

Contact a Scientist