In this article
It is associated with cramps, tiredness and recovery, and many people take supplements without ever having a test. The important question, however, is not just "how much magnesium do I have?", but "when does it make sense to test magnesium, and what can and cannot the result tell us?". The answer is less straightforward than it seems, because the level in the blood reflects only a small proportion of the body's magnesium.
This article explains what magnesium does, when a doctor will usually request the test, what factors affect the result and why a normal level does not always rule out a deficiency. Reference ranges vary between laboratories and methods. You should use those shown on your report, and each result should be interpreted by the doctor who requested the tests.
What magnesium does in the body
Magnesium is a cofactor for many enzymes. It is involved in the production and use of energy (ATP), protein synthesis, muscle contraction and relaxation, nerve conduction and the regulation of heart rhythm. It is also linked to calcium and potassium metabolism, which explains why changes in magnesium levels rarely occur in isolation.
Most of the body's magnesium is in the bones and inside cells, particularly muscle cells. A review of how magnesium status is diagnosed notes that the blood contains only around 0.8% of the total, making a serum test a limited indicator of stores (Workinger et al., 2018). The body keeps blood levels relatively stable by drawing on stores in the bones and adjusting excretion through the kidneys. Serum magnesium may therefore remain normal while stores fall.
| Where magnesium is found | Approximate proportion | Implication |
|---|---|---|
| Bone | More than half | Acts as a store |
| Muscle and other tissues | Much of the remainder | Not measured in a routine test |
| Blood | Less than 1% | What the usual test measures |
When to test magnesium: situations in which a doctor requests the test
Routine magnesium testing is not recommended for everyone who is healthy. The test is useful when there is a specific clinical question. The most common situations are persistent neuromuscular symptoms (tremors, frequent cramps, spasms or weakness), changes in heart rhythm, or abnormal results in other tests, particularly low potassium or calcium.
It is also tested in people who take medicines that affect magnesium, and in those with chronic diarrhoea or repeated vomiting, intestinal conditions that affect absorption, poorly controlled diabetes, excessive alcohol consumption or kidney disease. In athletes, it may be considered when frequent cramps cannot be explained by training, when there is heavy sweating in hot conditions, or when the diet is very restrictive.
| Situation | Why it is tested |
|---|---|
| Persistent cramps, tremors or spasms | Check for deficiency as a possible cause |
| Palpitations or arrhythmias | Magnesium affects heart rhythm |
| Low potassium or calcium | Magnesium deficiency makes these harder to correct |
| Chronic diarrhoea or intestinal disease | Losses or poor absorption |
| Medicines that reduce magnesium | Monitor for an adverse effect |
| Kidney disease | Risk of low or high levels |
| Excessive alcohol use | Increased losses and low intake |
Medicines and conditions that affect magnesium
Several commonly used medicines can lower magnesium. Proton pump inhibitors (used for stomach acid), when taken for a long time, are associated with hypomagnesaemia in some people. Certain diuretics increase losses in the urine. Some antibiotics, immunosuppressants and medicines used to treat cancer also affect magnesium.
Conversely, high magnesium is less common and occurs mainly in people with kidney failure who take laxatives or antacids containing magnesium, or who receive magnesium in hospital. In people with healthy kidneys, excess magnesium from food is easily eliminated.
If you take any of these medicines and have concerns, speak to your doctor. Do not stop prescribed medication on your own or start supplements without advice, particularly if you have kidney disease.
| Factor | Usual effect on magnesium |
|---|---|
| Proton pump inhibitors (long-term use) | May fall |
| Some diuretics | May fall |
| Chronic diarrhoea, vomiting | Low |
| Excess alcohol | Low |
| Poorly controlled diabetes | May lower it (loss in urine) |
| Kidney failure with magnesium-containing laxatives or antacids | May rise |
What the test measures and its limitations
The routine test measures total magnesium in the serum. Many laboratories use approximate adult ranges of around 0.7 to 1.0 mmol/L, but the exact limits vary. Some authors argue that levels at the lower end of the range may already indicate deficiency in people with risk factors. You should therefore always use the range shown on your report.
The main limitation is the one already mentioned: serum contains only a tiny fraction of the body's total magnesium. Other methods include measuring magnesium in red blood cells, magnesium in a 24-hour urine sample and loading tests, but none is perfect or universally standardised. The review by Workinger and colleagues describes this very lack of a standardised laboratory test that accurately reflects magnesium status (Workinger et al., 2018). In practice, the doctor considers the serum level alongside symptoms, diet, medicines and other test results.
There are also technical factors. Haemolysis (the rupture of red blood cells in the sample, for example after a difficult blood draw) can falsely raise the magnesium level because these cells contain more magnesium than plasma. The laboratory will usually flag a haemolysed sample.
| Method | What it reflects | Limitations |
|---|---|---|
| Total serum magnesium | Circulating fraction | May be normal despite low stores |
| Red blood cell magnesium | Magnesium inside red blood cells | Poorly standardised |
| Magnesium in a 24-hour urine sample | Kidney excretion | Depends on intake and kidney function |
| Loading test | Retention after administration | Complex and rarely used routinely |
Magnesium, exercise and cramps: what the evidence says
Exercise increases magnesium requirements and some is lost through sweat, particularly during long periods of exertion in hot conditions. Athletes whose diet is low in magnesium may therefore be at greater risk of deficiency. CK and other markers of muscle damage also rise after intense training (Baird et al., 2012), which can make test results harder to interpret when samples are taken soon after exercise.
However, the link between magnesium and cramps is often overstated. Exercise-associated cramps appear to be caused mainly by neuromuscular fatigue, and evidence that magnesium supplements prevent them in people without a deficiency is weak and inconsistent. This does not mean that magnesium is never relevant, but taking supplements "just in case" is not a proven solution.
For most people, a varied diet provides the magnesium they need. Pulses, nuts, seeds, wholegrains and leafy green vegetables are good sources. Supplements may be appropriate in cases of confirmed deficiency or high risk and should be decided on with a doctor.
Preparing for a magnesium test
A magnesium test generally requires no special preparation beyond the laboratory's instructions for the other tests requested. However, it is best not to have the test immediately after a very intense workout if other muscle markers are being assessed, and to mention any supplements, laxatives, antacids and regular medication.
If you take magnesium supplements, the doctor may want to know how long you have taken them and in what form, as this affects interpretation. Do not stop or start supplements before the test without advice.
| Before sample collection | Why |
|---|---|
| Follow the laboratory's instructions | Fasting and timing depend on the full set of tests requested |
| Mention supplements and laxatives | They may affect the level |
| Mention regular medication | Several medicines affect magnesium |
| Avoid extreme exertion in the preceding days | Makes other test results easier to interpret |
Groups in whom doctors pay closer attention to magnesium
Some people are more likely to have abnormal magnesium levels, so a doctor may consider testing it more often. Older people tend to consume less magnesium, absorb it less effectively and take more medicines that affect it. People with poorly controlled type 2 diabetes lose more magnesium in their urine. Those with inflammatory bowel disease, coeliac disease or previous intestinal surgery may absorb less.
During pregnancy, magnesium has a specific role in certain obstetric situations managed in hospital. Outside these situations, any supplement should be discussed with a doctor or the maternity team. Athletes on very restrictive diets, or those in sports involving weight control, are at greater risk of multiple nutritional deficiencies, of which magnesium is only one.
In all these groups, a magnesium test is rarely decisive on its own. It is most useful as part of an assessment that includes potassium, calcium, kidney function and a complete list of medicines and supplements.
Signs requiring prompt medical attention
Severe magnesium deficiency can cause marked muscle weakness, tremors, spasms, changes in heart rhythm and, in extreme cases, seizures. It is usually accompanied by low potassium and calcium. Severe excess, which is rarer, can cause drowsiness, weakness, low blood pressure and a slow heart rate.
Palpitations with dizziness, fainting, seizures or sudden, severe weakness warrant calling 112. If the laboratory or your doctor contacts you about a very abnormal result, follow their instructions that day. For advice, SNS 24 (808 24 24 24) can help.
At Clínica Alegre in Setúbal and Seixal, you can have laboratory tests and ask our team any questions about the results.
Frequently asked questions
Does a normal magnesium result rule out deficiency?
Not completely. Blood contains less than 1% of the body's magnesium; the doctor interprets the level alongside symptoms and context.
Should I have my magnesium tested if I get cramps?
It may be appropriate if they are frequent, persistent or accompanied by other symptoms. Your doctor will decide.
Do magnesium supplements prevent cramps during sport?
The evidence in people without a deficiency is weak and inconsistent.
Do stomach medicines lower magnesium?
Long-term use of proton pump inhibitors is associated with low magnesium in some people. Speak to your doctor before changing any medication.
Can I have too much magnesium?
It is rare with healthy kidneys. The risk is higher in people with kidney failure who take products containing magnesium.
Do I need to fast for a magnesium test?
It depends on the full set of tests requested. Follow the laboratory's instructions.
Did you enjoy this article?
Scientific references2
- Workinger JL, Doyle RP, Bortz J. Challenges in assessing magnesium levels. Nutrients. 2018;10(9):1202.
- Baird MF, Graham SM, Baker JS, Bickerstaff GF. Creatine kinase- and exercise-related muscle damage: implications for muscle performance and recovery. J Nutr Metab. 2012;2012:960363.





