Magnesium blood test
Informed by recognized medical guidance
Overview
A magnesium blood test measures the amount of magnesium in your blood. Magnesium is a mineral that helps your muscles, nerves, and heart work properly, and it keeps your bones strong.
Key facts
- Magnesium is important for over 300 chemical reactions in your body.
- Both low and high magnesium levels can cause health problems.
- The test is a simple blood draw, similar to other routine blood tests.
Yes, magnesium blood tests are commonly ordered when doctors suspect a magnesium imbalance, especially in people with certain health conditions or taking specific medications.
Anyone can need a magnesium blood test, but it is more often done for people with kidney disease, diabetes, digestive disorders, alcohol use disorder, or those on certain diuretics or heart medications.
Symptoms
- Severe chest pain or pressure
- Sudden irregular heartbeat that does not go away
- Seizures
- Difficulty breathing
- Loss of consciousness
- ⚠Persistent muscle cramps or spasms that interfere with daily life
- ⚠Unexplained weakness or fatigue lasting more than a few days
- ⚠Nausea and vomiting that prevents you from keeping fluids down
Common symptoms
- Muscle cramps or twitches
- Fatigue or weakness
- Nausea or loss of appetite
- Numbness or tingling
- Irregular heartbeat
Symptoms in children
- Irritability
- Poor feeding
- Muscle spasms
- Lethargy
Symptoms in older adults
- Confusion or memory problems
- Muscle weakness affecting mobility
- Loss of balance
- Constipation
Causes
Main causes
- Low magnesium (hypomagnesemia) can be caused by a poor diet, chronic diarrhea, vomiting, alcohol use disorder, or certain medications like diuretics.
- High magnesium (hypermagnesemia) is usually due to kidney problems or taking too many magnesium supplements or antacids.
Risk factors
- Kidney disease
- Type 2 diabetes
- Digestive conditions (Crohn's disease, celiac disease, chronic diarrhea)
- Alcohol misuse
- Taking certain medications (diuretics, proton pump inhibitors, antibiotics)
- Being in hospital, especially in intensive care
When to see a doctor
See a doctor urgently if:
- If you have severe symptoms like chest pain, irregular heartbeat, or seizures, call emergency services immediately.
Book a routine appointment if:
- If you have ongoing mild symptoms such as muscle cramps, fatigue, or nausea, make an appointment with your doctor.
- If you have a condition that puts you at risk for magnesium imbalance, your doctor may recommend routine blood tests.
Diagnosis
A magnesium blood test is done by taking a sample of blood from a vein in your arm. It is often part of a larger panel of tests. No special preparation is usually needed, but your doctor may ask you to avoid magnesium supplements for a few hours before the test.
Tests that may be done
- Serum magnesium blood test (the main test)
- Sometimes a 24-hour urine magnesium test to see how much magnesium your kidneys are losing
What to expect at your appointment
You will have blood drawn at a doctor's office, clinic, or hospital. A small needle is used to take a sample from a vein. It feels like a quick pinch. Results usually come back within a few days. Your doctor will discuss what the results mean for your health.
Treatment
Treatment for abnormal magnesium levels depends on whether you have too little or too much, and what is causing it. The goal is to bring your magnesium back to a healthy range and address the underlying cause.
Self-care at home
- Eat a balanced diet rich in magnesium: green leafy vegetables, nuts, seeds, whole grains, and legumes.
- If your doctor recommends it, take magnesium supplements exactly as directed. Do not take extra without medical advice.
- Stay hydrated and avoid excessive alcohol.
- If you have high magnesium, avoid magnesium-containing antacids or supplements.
Medical treatments
For low magnesium that is moderate to severe, your doctor may prescribe oral magnesium supplements or give magnesium through an IV (intravenous) in a hospital. For high magnesium, treatment focuses on stopping any supplements or medications causing the problem, and addressing kidney function. In severe cases, intravenous fluids or dialysis may be needed. Your doctor will tailor treatment to your specific situation.
When is surgery considered?
Surgery is not used to treat magnesium imbalances directly. If an underlying condition (like a digestive disorder) requires surgery, that might be considered separately.
Living with this condition
If you have had a magnesium imbalance, you may need to pay attention to your diet and watch for returning symptoms. Keep follow-up appointments with your doctor to monitor your levels.
Lifestyle tips
- Eat magnesium-rich foods regularly.
- Limit alcohol and caffeine, which can affect magnesium levels.
- Manage stress with relaxation techniques like deep breathing or yoga.
- Stay active, but avoid overexertion if you feel weak.
Diet and exercise
A diet with plenty of magnesium-rich foods (spinach, almonds, pumpkin seeds, black beans, bananas) can help maintain normal levels. Gentle exercise like walking or stretching can improve overall health, but listen to your body and rest when needed.
Mental health and emotional wellbeing
Living with a chronic condition that affects your mineral levels can be stressful. You might feel anxious about symptoms or frustrated with dietary changes. It is important to talk to your doctor or a mental health professional if you feel overwhelmed.
Prevention
Many cases of magnesium imbalance can be prevented by eating a balanced diet, staying hydrated, and using supplements only as directed by a doctor. If you have a condition that puts you at risk, regular monitoring can catch problems early.
Screening programmes
There is no routine screening for the general population, but your doctor may recommend periodic magnesium testing if you have risk factors such as kidney disease or long-term use of certain medications.
Complications
If left untreated
- Severe muscle cramps or spasms
- Abnormal heart rhythms (arrhythmias)
- Seizures
- Numbness or tingling that does not go away
- In severe high magnesium: slowed heart rate, low blood pressure, confusion
Long-term outlook
With proper diagnosis and treatment, most people with magnesium imbalances recover well. Your outlook depends on the underlying cause. Many people can manage their levels with diet and lifestyle changes. Your doctor will work with you to keep your magnesium in a healthy range.
Find support
External links open third-party websites. Ruqelo Health is not responsible for external content. Listing an organisation does not imply endorsement.
Always verify with your doctor
Health guidelines vary by country and region. The information in this article is based on international clinical guidelines but may not reflect the specific guidelines, medications, or practices in your country. Always discuss your health concerns with your own doctor or healthcare provider, and refer to your local national health guidelines where available.
Important notice This information is for educational purposes only. It does not replace professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider about your specific situation. If you are experiencing a medical emergency, call your local emergency services immediately.
Related conditions
Sources and guidance
This article is educational and is prepared with reference to recognized health information and clinical guidance sources where available. Specific source links may vary by topic.
Last updated: July 16, 2026
Educational note: This information is for education only and is not a diagnosis.
Use it to support, not replace, advice from a licensed clinician.
If symptoms are severe, worsening, or urgent, call your local emergency number or seek emergency care.
Guidance may differ by country or region. Confirm local recommendations with a qualified healthcare provider.