The magnesium blood test measures the amount of magnesium in the liquid portion (serum) of your blood. Magnesium is a mineral that plays a role in many body functions, including muscle and nerve activity, heart rhythm, blood pressure regulation, and bone health. Most of the body's magnesium is stored in bones and inside cells, so the blood test reflects only a small fraction of the body's total magnesium. This test is used to check magnesium levels, which can be too low or too high in certain conditions. It may be ordered to help evaluate symptoms such as muscle weakness, cramps, tremors, irregular heartbeat, or unexplained fatigue, and to monitor people with kidney problems, digestive disorders, poorly controlled diabetes, or those taking medications that affect magnesium. It is also sometimes checked when calcium or potassium levels are abnormal, since these minerals are related.