Patient Test Information

Electrolytes and Anion Gap

  • Why Get Tested?

    To detect a problem with your body's electrolyte balance

    When To Get Tested?

    As part of routine health screening or when your healthcare practitioner suspects that you have an imbalance of one of the electrolytes (usually sodium or potassium) or an acid-base imbalance

    Sample Required?

    A blood sample drawn from a vein in your arm

    Test Preparation Needed?


  • What is being tested?

    Electrolytes are minerals that are found in body tissues and blood in the form of dissolved salts. As electrically charged particles, electrolytes help move nutrients into and wastes out of the body's cells, maintain a healthy water balance, and help stabilize the body's acid/base (pH) level.

    The electrolyte panel measures the blood levels of the main electrolytes in the body:

    • Sodium—most of the body's sodium is found in the fluid outside of the body's cells, where it helps to regulate the amount of water in the body.
    • Potassium—this electrolyte is found mainly inside the body's cells. A small but vital amount of potassium is found in the plasma, the liquid portion of the blood. Potassium plays an important role in regulating muscle contraction. Monitoring potassium is important as small changes in the potassium level can affect the heart's rhythm and ability to contract.
    • Chloride—this electrolyte moves in and out of the cells to help maintain electrical neutrality (concentrations of positively charged cations and negatively charged anions must be equal) and its level usually mirrors that of sodium. Due to its close association with sodium, chloride also helps to regulate the distribution of water in the body.
    • Bicarbonate—the main job of bicarbonate (or total CO2, an estimate of bicarbonate), which is released and reabsorbed by the kidneys, is to help maintain a stable pH level (acid-base balance) and, secondarily, to help maintain electrical neutrality. Bicarbonate also plays an important role in the transport of CO2: much of the CO2 produced by the body's tissues is transported in the blood as bicarbonate to the lungs, where it is exhaled.

    The foods you eat and the fluids you drink provide the sodium, potassium, and chloride your body needs. The kidneys help maintain proper levels by reabsorption or by elimination into the urine. The lungs provide oxygen and regulate CO2. The CO2 is produced by the body and is in balance with bicarbonate. The overall balance of these chemicals is an indication of the functional well-being of several basic body functions. They are important in maintaining a wide range of body functions, including heart and skeletal muscle contraction and nerve signaling.

    Any disease or condition that affects the amount of fluid in the body, such as dehydration, or affects the lungs, kidneys, metabolism, or breathing has the potential to cause a fluid, electrolyte, or pH imbalance (acidosis or alkalosis). Normal pH must be maintained within a narrow range of 7.35-7.45 and electrolytes must be in balance to ensure the proper functioning of metabolic processes and the delivery of the right amount of oxygen to tissues. (For more on this, see the condition articles on Acidosis and Alkalosis and Dehydration.)

    A related "test" is the anion gap, which is a value calculated using the results of an electrolyte panel. It reflects the difference between the positively charged ions (called cations) and the negatively charged ions (called anions). An abnormal anion gap is non-specific—it does not diagnose a specific disease or illness—but it can suggest certain kinds of metabolic or respiratory disorders or the presence of toxic substances. For more information on anion gap, see Common Questions below.

    While sodium, potassium, chloride, and bicarbonate are commonly measured together as the electrolyte panel, they can also each be ordered individually for diagnosis/monitoring of conditions that affect specific electrolytes. The body also contains other electrolytes that are not part of the "electrolyte panel" but may also be ordered by your healthcare practitioner. These include: calcium (Ca2+), magnesium (Mg2+), and phosphate (PO43-).

  • How is the test used?

    The electrolyte panel is used to identify an electrolyte, fluid, or pH imbalance (acidosis or alkalosis). It is frequently ordered as part of a routine health exam. It may be ordered by itself or as a component of a basic metabolic panel (BMP) or a comprehensive metabolic panel (CMP). These panels can include other tests such as BUN, creatinine, and glucose.

    Electrolyte measurements may be used to help investigate conditions that cause electrolyte imbalances such as dehydration, kidney disease, lung diseases, or heart conditions. A series of electrolyte panels may also be used to monitor treatment of the condition causing the imbalance.

    Since electrolyte and acid-base imbalances can be present with a wide variety of acute and chronic illnesses, the electrolyte panel is frequently used to evaluate patients who seek medical care in the emergency room as well as hospitalized patients.

    The results for an electrolyte panel may also include a calculation for anion gap that can be used to help detect disorders or the presence of toxic substances (see below).

    If you have an imbalance of a single electrolyte, such as sodium or potassium, your healthcare practitioner may order repeat testing of that individual electrolyte, monitoring the imbalance until it resolves. If you have an acid-base imbalance, your healthcare practitioner may also order tests for blood gases, which measure the pH and oxygen and carbon dioxide levels in an arterial blood sample, to help evaluate the severity of the imbalance and monitor its response to treatment.

    When is it ordered?

    An electrolyte panel may be ordered as part of a routine health exam, as recommended by your healthcare practitioner. It may also be ordered as a diagnostic aid when you have signs and symptoms, such as:

    • Fluid accumulation (edema)
    • Nausea or vomiting
    • Weakness
    • Confusion
    • Irregular heart beat (cardiac arrhythmias)

    It is frequently ordered as part of an evaluation when you have an acute or chronic illness and at regular intervals when you have a disease or condition or is taking a medication that can cause an electrolyte imbalance. Electrolyte tests are commonly ordered at regular intervals to monitor treatment of certain conditions, including high blood pressure (hypertension), heart failure, lung diseases, liver disease and kidney disease.

    What does the test result mean?

    High or low electrolyte levels can be caused by several conditions and diseases. Generally, they are affected by how much is consumed in the diet and absorbed by the body, the amount of water in your body, and the amount eliminated by the kidneys. Electrolyte levels are also affected by some hormones such as aldosterone, which conserves sodium and promotes the elimination of potassium, and natriuretic peptides, which increase elimination of sodium by the kidneys.

    Electrolyte levels can be affected by changes in the amount of water in your body. For example:

    • If your kidneys are not functioning properly (i.e., kidney disease), you may retain excess fluid. This results in a dilution effect on sodium and chloride so that they fall below normal levels.
    • On the other hand, if you experience severe fluid loss (dehydration), you may show an increase in potassium, sodium, and chloride levels.

    Some conditions such as heart disease and diabetes may also affect the fluid and electrolytes balance in your body and cause abnormal levels of electrolytes. Several other conditions can cause electrolyte and pH imbalances. (See the condition article on Acidosis and Alkalosis for more information.)

    Knowing which electrolytes are out of balance can help your healthcare practitioner determine the underlying cause and make decisions about treatment to restore proper balance. Left untreated, an electrolyte imbalance can lead to various problems, including dizziness, cramps, irregular heartbeat, and possibly death.

    See the individual test articles for additional information on what results might mean:

    One of the results from my electrolyte panel is slightly out of range. What does this mean?

    The results of your electrolyte panel are interpreted by your healthcare practitioner within the context of other tests that you have had done as well as other factors, such as your medical history. A single result that is slightly high or low may or may not have medical significance. There are several reasons why a test result may differ on different days and why it may fall outside a designated reference range.

    • Biological variability (different results in the same person at different times): If a healthcare practitioner runs the same test on you on several different occasions, there is a good chance that one result will fall outside a reference range even though you are in good health. For biological reasons, your values can vary from day to day.
    • Individual variability (differences in results between different people): References ranges are usually established by collecting results from a large population and determining from the data an expected average (mean) result and expected differences from that average (standard deviation). There are individuals who are healthy but whose tests results, which are normal for them, do not always fall within the expected range of the overall population.

    So, a test value that falls outside of the established reference range may mean nothing significant. Generally, this is the case when the test value is only slightly higher or lower than the reference range and is why a healthcare practitioner may repeat a test on you and why the practitioner may look at results from prior times when you had the same test performed.

    However, a result outside the range may indicate a problem and warrant further investigation. Your healthcare practitioner will evaluate your test results in the context of your medical history, physical exam, and other relevant factors to determine whether a result that falls outside of the reference range means something significant for you. For more, read the article on Reference Ranges and What They Mean.

    What is anion gap?

    Anion gap (AG or AGAP) is a value calculated using the results of an electrolyte panel. It is used to help distinguish between anion-gap and non-anion-gap metabolic acidosis. Acidosis refers to an excess of acid in the body; this can disturb many cell functions and should be recognized as quickly as possible, when present. The anion gap is frequently used in the hospital and/or emergency room setting to help diagnose and monitor acutely ill patients. If anion-gap metabolic acidosis is identified, the AG may be used to help monitor the effectiveness of treatment and the underlying condition.

    Specifically, the anion gap evaluates the difference between measured and unmeasured electrical particles (ions or electrolytes) in the fluid portion of the blood. According to the principle of electrical neutrality, the number of positive ions (cations) and negative ions (anions) should be equal. However, not all ions are routinely measured. The calculated AG result represents the unmeasured ions and primarily consists of anions, hence the name "anion gap." The most commonly used formula is:

    Anion Gap (AG) = Sodium - (Chloride + Bicarbonate [total CO2])

    However, there are other AG formulas, so reference ranges are not interchangeable. Each laboratory formula will have an established normal range that should be referenced.

    The anion gap is non-specific. It is increased when the number of unmeasured anions increases, indicating a state of anion-gap metabolic acidosis, but it does not tell the healthcare practitioner what is causing the imbalance. The metabolic acidosis must be treated to restore the acid/base balance, but the underlying condition must also be identified and treated. Causes can include uncontrolled diabetes, starvation, kidney damage, and ingestion of potentially toxic substances such as antifreeze, excessive amounts of aspirin (salicylates), or methanol. A low anion gap can also occur; this is most commonly seen when albumin (an anion as well as a protein) is low, while immunoglobulins (cations as well as proteins) are increased.

    What is the treatment for an electrolyte imbalance?

    Treatment depends on which electrolyte(s) is out of balance and the extent of that change. Treatment usually involves managing the imbalance while identifying and addressing the underlying cause(s) of the imbalance and providing whatever support is necessary to the affected person.

    Is there anything else I should know?

    Certain drugs, such as anabolic steroids, corticosteroids, laxatives, cough medicines, and oral contraceptives, may cause increased levels of sodium. Other drugs, such as diuretics, carbamazepine, and tricyclic antidepressants, may cause decreased levels of sodium.

    Drugs that affect sodium blood levels will also cause changes in chloride. Taking substantially more than the recommended dosage of antacids can also cause low chloride levels.

    Some drugs may increase bicarbonate (total CO2) levels. These include, among others, fludrocortisone, barbiturates, hydrocortisone, loop diuretics, and steroids. 

Drugs that may decrease bicarbonate (total CO2) levels include methicillin, nitrofurantoin, tetracycline, thiazide diuretics, and triamterene.

    Some diuretics, which may be used for people with disorders such as high blood pressure or kidney disease, tend to lower potassium levels to dangerously low levels. To avoid this problem, a healthcare practitioner may prescribe a potassium-sparing diuretic.

    A non-physiological cause of a high potassium level in a patient sample is leakage from the blood cells if the sample is not handled carefully or is delayed in transport to the lab. If a significant amount of potassium leaks from cells, it can contribute to a falsely high test result. When a healthcare practitioner suspects that a potassium result is not consistent with a patient's condition, the test for potassium may be repeated.

  • View Sources

    Sources Used in Current Review

    2019 review performed by Kenneth A. Wong, BSc (MLS), MLT, Instructor, NAIT and the Editorial Review Board.

    Rifai, N. Tietz Textbook of Clinical Chemistry and Molecular Diagnostics. [Pageburstls]. Retrieved from

    Larson, D. Clinical Chemistry: Fundamentals and Laboratory Techniques. [Pageburstls]. Retrieved from

    Lewis J, Water and Sodium Balance, Merck Manual. Available online at Accessed 7/17/19.

    Electrolyte Disorders. Merck Manual. Available online at Accessed 7/17/19.

    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.

    Carlson, R. and Abbas, A. (2001). Use Of Anion Gap In Acid-Base Defects In The Acutely Ill. Medical Online Review and Database, Snow Tiger Medical Systems [On-line information]. Available online at

    Martin, L. (1999 February). 2. Anion and bicarbonate gaps for diagnosing mixed acid-base disorders. All You Really Need to Know to Interpret Arterial Blood Gases [On-line, Ch 2 of book published by Lippincott Williams & Wilkins]. Available online at

    Fall, P. (2000 March). A stepwise approach to acid-base disorders, Practical patient evaluation for metabolic acidosis and other conditions. Postgraduate Medicine online, 107 (3) [On-line journal]. Available online at

    Brandis, K. (2002 August 14) 3.2 The Anion Gap. Acid-Base Physiology [On-line textbook]. Available online at

    Brandis, K. (2002 August 14) 3.4 The Urinary Anion Gap. Acid-Base Physiology [On-line textbook]. Available online at

    Harrison, J. (1997 January 5, Modified). Metabolic (including renal) Acid-Base Imbalance. Tulane Medical Pathology Course [On-line information]. Available online at

    (2003) Anion Gap. Michigan State Univ, Dept of Physiology [On-line information for class 442]. Available online: at

    (1995-2004). Chapter 59. Disorders of Acid-Base Metabolism. The Merck Manual of Geriatrics [On-line information]. Available online at

    (1995-2004). Acid-Base Metabolism. The Merck Manual of Diagnosis and Therapy, Section 2. Endocrine And Metabolic Disorders, Chapter 12. Water, Electrolyte, Mineral, And Acid-Base Metabolism [On-line information]. Available online at

    Hornick, D., Editor (2003, Revised). An Approach to the Analysis of Arterial Blood Gases and Acid-Base Disorders. Virtual Hospital, University of Iowa Health Care [On-line information]. Available online at

    Priestley, M. and Lieh-Lai, M. (2004 March 8, Updated). Excerpt from Acidosis, Metabolic. EMedicine [On-line information]. Available online at

    Jones, J. and Bosker, G. (2002 December 16) Diagnostic Aids in Emergency Medicine. The Emergency Medicine Reports Textbook of Adult and Pediatric Emergency Medicine [Excerpt from On-line Clinical Textbook]. Available online at and

    Beaven, A. (2002 July 12). Ethylene Glycol and Methanol Toxicity. Univ of NC at Chapel Hill, Department of Internal Medicine [On-line information]. PDF available for download at

    (2002). Acid-Base Emergencies, Part 1. Texas Society for Respiratory Care [On-line information]. Available online at

    Welch, J. (1998 April 30, Modified). Increased Anion Gap Metabolic Acidosis. Georgetown University, NetScut [On-line information]. Available online at

    Welch, J. (1998 April 30, Modified). Normal Anion Gap Metabolic Acidosis. Georgetown University, NetScut [On-line information]. Available online at

    (1995-2004). Minerals and Electrolytes. The Merck Manual of Medical Information – Second Home Edition [On-line information]. Available online at

    Ben-Joseph, E., Reviewed (2004 July). Dehydration. Information for Parents [On-line information]. Available online at

    Webner, D., Updated (2003 August 18). CO2. MedlinePlus Medical Encyclopedia [On-line information]. Available online at

    A.D.A.M. editorial, Updated (2003 October 15). Electrolytes. MedlinePlus Medical Encyclopedia [On-line information]. Available online at

    Clarke, W. and Dufour, D. R., Editors (2006). Contemporary Practice in Clinical Chemistry. AACC Press, Washington, DC. Pp 333-337.

    Henry's Clinical Diagnosis and Management by Laboratory Methods. 21st ed. McPherson R, Pincus M, eds. Philadelphia, PA: Saunders Elsevier: 2007.

    (August 14, 2007). MedlinePlus Medical Encyclopedia, Electrolytes. Available online at Accessed May 2008.

    ARUP Lab Tests. Electrolyte Panel. Available online at Accessed September 2011. 

    Mayo Medical Laboratories. 87972 Overview: Electrolyte Panel, Serum. Available online at Accessed September 2011.

    Ambalavanan, N. (2014 February 28, Updated). Fluid, Electrolyte, and Nutrition Management of the Newborn. Medscape Drugs & Diseases [On-line information]. Available online at Accessed October 2015.

    Genzen, J. and Lehman, C. (2015 April, Updated). Electrolyte Abnormalities, Life Threatening. ARUP Consult [On-line information]. Available online at Accessed October 2015.

    Byrd, R. and Roy, T. (2015 July 31, Updated). Respiratory Acidosis. Medscape Drugs & Diseases [On-line information]. Available online at Accessed October 2015.

    Dugdale, D. (2013 August 3, Updated). Electrolytes. MedlinePlus Medical Encyclopedia [On-line information]. Available online at Accessed October 2015.

    Wisse, B. (2013 November 7, Updated). Alkalosis. MedlinePlus Medical Encyclopedia [On-line information]. Available online at Accessed October 2015.

    Dugdale, D. (2013 October 29, Updated). Metabolic acidosis. MedlinePlus Medical Encyclopedia [On-line information]. Available online at Accessed October 2015.

    (© 1995–2015). Electrolyte Panel, Serum. Mayo Clinic Mayo Medical Laboratories [On-line information]. Available online at Accessed October 2015.