Anion Gap Calculator

Calculate the serum anion gap and albumin-corrected anion gap from your blood test results. An essential tool for evaluating acid-base disorders.

Enter Your Values

Results

Anion Gap
--
mEq/L

Cation-Anion Balance

Step-by-Step Calculation

What is the Anion Gap?

The anion gap (AG) is one of the most important calculated values in clinical medicine, used to help identify the cause of metabolic acidosis and to evaluate acid-base disorders. It represents the difference between the measured cations (positively charged ions) and the measured anions (negatively charged ions) in the blood serum. While the body always maintains electrical neutrality (the total positive charges must equal the total negative charges), routine blood tests only measure some of the ions present, creating an apparent "gap."

In blood plasma, the primary measured cation is sodium (Na⁺), and sometimes potassium (K⁺). The primary measured anions are chloride (Cl⁻) and bicarbonate (HCO₃⁻). However, there are many other charged particles in the blood that are not routinely measured. These unmeasured anions include proteins (especially albumin), phosphates, sulfates, and organic acids like lactate. The unmeasured cations include calcium, magnesium, and certain immunoglobulins.

Under normal physiological conditions, the unmeasured anions exceed the unmeasured cations, resulting in a positive anion gap. When disease processes produce excess acid (such as lactic acid in sepsis or ketoacids in diabetic ketoacidosis), these additional unmeasured anions cause the anion gap to increase. Conversely, if unmeasured anions decrease (such as in hypoalbuminemia), the anion gap decreases. Understanding the anion gap gives clinicians a powerful window into the underlying metabolic processes occurring in the body.

Electrolyte Balance: The Anion Gap Concept Na⁺ 140 mEq/L + Other cations CATIONS Cl⁻ 104 mEq/L HCO₃⁻ 24 mEq/L AG = 12 ANIONS Anion Gap

The Anion Gap Formula

The standard anion gap formula is straightforward and relies on the three most commonly measured electrolytes in a basic metabolic panel:

Standard Anion Gap Formula:
AG = Na⁺ - (Cl⁻ + HCO₃⁻)

Anion Gap with Potassium:
AG = (Na⁺ + K⁺) - (Cl⁻ + HCO₃⁻)

Albumin-Corrected Anion Gap:
Corrected AG = AG + 2.5 × (4.0 - Albumin)

The standard formula (without potassium) is the most commonly used in clinical practice because potassium levels are relatively small compared to sodium and are tightly regulated within a narrow range. Including potassium increases the normal range by approximately 4 mEq/L. Some institutions prefer to include potassium for a slightly more complete picture, but consistency in approach is more important than which formula is chosen.

The albumin-corrected anion gap is particularly important in critically ill patients who often have low albumin levels. Since albumin is a negatively charged protein (an unmeasured anion), low albumin levels decrease the anion gap by approximately 2.5 mEq/L for every 1 g/dL decrease in albumin below the normal level of 4.0 g/dL. Without correction, a significant high anion gap metabolic acidosis could be masked by concurrent hypoalbuminemia.

Normal Anion Gap Values

The normal anion gap value depends on which formula is used and may vary slightly between laboratories based on the analytical methods employed for measuring electrolytes:

It is essential to know the reference range used by the specific laboratory that processed the blood sample. A result that is "normal" at one institution might be considered elevated at another. When in doubt, always compare against the lab-specific reference range provided with the test results.

Why is the Anion Gap Corrected for Albumin?

Albumin is the most abundant protein in blood plasma and carries a net negative charge at physiological pH. Because of its negative charge, albumin contributes significantly to the pool of unmeasured anions. Each gram per deciliter of albumin contributes approximately 2.5 mEq/L to the anion gap.

In clinical practice, many patients who need anion gap evaluation -- especially those in the intensive care unit, with liver disease, with nephrotic syndrome, or with malnutrition -- also have low albumin levels (hypoalbuminemia). Without correcting for albumin, the anion gap can appear falsely normal even when there is an underlying high anion gap metabolic acidosis.

Example of why albumin correction matters:

Consider a patient with:
Na⁺ = 140, Cl⁻ = 110, HCO₃⁻ = 18, Albumin = 2.0 g/dL

Standard AG = 140 - (110 + 18) = 12 mEq/L (appears normal)

Corrected AG = 12 + 2.5 × (4.0 - 2.0) = 12 + 5 = 17 mEq/L (elevated!)

The corrected AG reveals a hidden high anion gap acidosis that would have been missed without albumin correction.

The correction formula was developed by Figge and colleagues and has been widely validated. It is now considered standard practice to calculate the albumin-corrected anion gap whenever albumin levels are available, particularly in critically ill patients.

High Anion Gap Metabolic Acidosis (HAGMA)

A high anion gap metabolic acidosis (HAGMA) occurs when excess acid is added to the body, and the acid's conjugate base (anion) is not chloride. These unmeasured anions accumulate and widen the gap between measured cations and measured anions. The most commonly used mnemonic to remember the causes of HAGMA is MUDPILES:

M - Methanol

Methanol (wood alcohol) poisoning produces formic acid through metabolism by alcohol dehydrogenase and aldehyde dehydrogenase. Formic acid is a strong organic acid that causes a severe high anion gap metabolic acidosis. Patients may also present with visual disturbances (including blindness), abdominal pain, and central nervous system depression. Treatment includes fomepizole (or ethanol as an antidote), dialysis, and folinic acid.

U - Uremia

In advanced kidney failure (uremia), the kidneys cannot adequately excrete the daily acid load produced by metabolism. Organic acids, sulfates, phosphates, and hippurate accumulate, contributing to a high anion gap acidosis. The anion gap in uremia is usually mildly to moderately elevated (typically 15-25 mEq/L). Treatment focuses on managing the underlying renal failure, and dialysis may be required for severe acidosis.

D - Diabetic Ketoacidosis (DKA)

DKA is one of the most common causes of high anion gap metabolic acidosis. In the absence of adequate insulin, the body relies on fatty acid oxidation for energy, producing ketone bodies (beta-hydroxybutyrate, acetoacetate, and acetone). These ketoacids accumulate in the blood, causing a wide anion gap acidosis. Patients typically present with hyperglycemia, Kussmaul breathing, fruity breath odor, dehydration, and altered mental status. Treatment includes insulin, fluid resuscitation, and electrolyte replacement.

P - Propylene Glycol

Propylene glycol is a solvent used in many intravenous medications, including lorazepam, diazepam, phenobarbital, and nitroglycerin. When administered in large doses or over prolonged periods, it can be metabolized to lactic acid and other organic acids, causing a high anion gap metabolic acidosis. This is most commonly seen in ICU patients receiving high-dose continuous infusions of these medications.

I - Isoniazid (INH) / Iron

Isoniazid overdose can cause seizures, which produce lactic acidosis through anaerobic muscle metabolism. Iron poisoning causes direct cellular toxicity and can lead to lactic acidosis through mitochondrial dysfunction and cardiovascular collapse. Both are serious toxicological emergencies requiring immediate intervention.

L - Lactic Acidosis

Lactic acidosis is the most common cause of high anion gap metabolic acidosis in hospitalized patients. It is divided into Type A (due to tissue hypoperfusion or hypoxia, such as in septic shock, cardiogenic shock, or severe anemia) and Type B (due to impaired lactate metabolism without overt hypoperfusion, such as in liver failure, certain medications like metformin, or malignancy). Normal serum lactate is less than 2 mmol/L; levels above 4 mmol/L are associated with significant mortality.

E - Ethylene Glycol

Ethylene glycol (antifreeze) is metabolized to glycolic acid, glyoxylic acid, and oxalic acid by alcohol dehydrogenase and aldehyde dehydrogenase. These metabolites cause a severe high anion gap metabolic acidosis and can form calcium oxalate crystals in the kidneys, leading to acute kidney injury. Patients may present with an osmolar gap early on, followed by a high anion gap acidosis as the parent compound is metabolized. Treatment includes fomepizole, dialysis, and thiamine/pyridoxine supplementation.

S - Salicylates

Aspirin (salicylic acid) overdose produces a complex acid-base disturbance. Initially, direct stimulation of the respiratory center causes a respiratory alkalosis. Subsequently, uncoupling of oxidative phosphorylation and accumulation of organic acids lead to a high anion gap metabolic acidosis. The classic presentation is a mixed respiratory alkalosis and metabolic acidosis. Treatment includes alkalinization of the urine, activated charcoal (if early), and hemodialysis for severe cases.

Normal Anion Gap (Non-Gap) Metabolic Acidosis

A normal anion gap metabolic acidosis (also called hyperchloremic metabolic acidosis or non-gap metabolic acidosis) occurs when bicarbonate is lost from the body or when hydrochloric acid is added, with chloride replacing bicarbonate to maintain electroneutrality. The anion gap remains normal because the loss of bicarbonate (a measured anion) is compensated by an increase in chloride (another measured anion). The mnemonic HARDUPS is used to remember the causes:

Diarrhea is by far the most common cause worldwide, as intestinal secretions are rich in bicarbonate. Renal tubular acidosis is another important cause that requires further classification to guide treatment. Large-volume normal saline resuscitation is increasingly recognized as a cause of hyperchloremic acidosis in hospitalized patients, which has led to increased interest in balanced crystalloids like Lactated Ringer's solution.

Low Anion Gap

A low anion gap (less than 3-6 mEq/L, depending on the laboratory) is less commonly discussed but can be clinically significant. Causes of a low anion gap include:

A low or negative anion gap should always prompt the clinician to consider laboratory error first, followed by a systematic evaluation of the possible causes listed above. In the right clinical context, a low anion gap may be the first clue to a diagnosis of multiple myeloma.

Delta-Delta Ratio (Delta Gap)

The delta-delta ratio (also known as the delta gap or delta-delta) is an additional calculation used when a high anion gap metabolic acidosis is identified. It helps determine whether there is a concurrent non-gap metabolic acidosis or a metabolic alkalosis in addition to the primary high anion gap acidosis.

Delta-Delta Formula:
Delta-Delta Ratio = (Measured AG - 12) / (24 - Measured HCO₃⁻)

Where 12 = normal AG and 24 = normal HCO₃⁻

Interpretation of the delta-delta ratio:

The delta-delta ratio is particularly useful in the emergency department and ICU when patients may have multiple overlapping acid-base disorders. For example, a patient with diabetic ketoacidosis who has also been vomiting may have both a HAGMA (from ketoacids) and a metabolic alkalosis (from vomiting and volume contraction). The delta-delta ratio helps uncover these mixed disorders.

Clinical Applications

Emergency Medicine

In the emergency department, the anion gap is one of the first calculations reviewed when a metabolic acidosis is identified on an arterial blood gas or basic metabolic panel. It quickly narrows the differential diagnosis and guides further workup. For example, a young patient presenting with altered mental status, rapid breathing, and a high anion gap acidosis immediately raises concern for diabetic ketoacidosis, toxic ingestion, or sepsis with lactic acidosis.

ICU Monitoring

In the intensive care unit, serial anion gap measurements are used to monitor the response to treatment. In DKA, a closing anion gap indicates that ketoacid production is decreasing and that insulin therapy is effective. In lactic acidosis, a decreasing anion gap suggests improving tissue perfusion. The trend of the anion gap over time is often more informative than a single isolated measurement.

DKA Management

The anion gap is central to DKA management. Treatment protocols often use the anion gap (rather than blood glucose) to guide the transition from intravenous insulin infusion to subcutaneous insulin. The anion gap typically closes before blood glucose normalizes, and it is the closure of the anion gap that signifies resolution of ketoacidosis. Many institutions define DKA resolution as an anion gap less than 12 mEq/L in conjunction with a bicarbonate greater than 15 mEq/L.

Toxicology

In suspected poisoning, the combination of the anion gap and osmolar gap helps differentiate between different toxic ingestions. Methanol and ethylene glycol poisoning characteristically present with both an elevated osmolar gap (early) and an elevated anion gap (as the parent compound is metabolized). Salicylate poisoning produces a mixed respiratory alkalosis and high anion gap metabolic acidosis. These patterns help toxicologists and emergency physicians identify the offending agent and initiate appropriate treatment quickly.

Step-by-Step Example Calculations

Example 1: Standard Anion Gap

Patient Values:
Na⁺ = 142 mEq/L, Cl⁻ = 100 mEq/L, HCO₃⁻ = 18 mEq/L

Step 1: Sum the measured anions
Cl⁻ + HCO₃⁻ = 100 + 18 = 118 mEq/L

Step 2: Calculate the anion gap
AG = Na⁺ - (Cl⁻ + HCO₃⁻) = 142 - 118 = 24 mEq/L

Interpretation: This anion gap of 24 is significantly elevated (normal: 8-12 mEq/L), indicating a high anion gap metabolic acidosis (HAGMA). Further workup should include serum lactate, ketones, BUN/creatinine, osmolar gap, and consideration of toxic ingestion. The low bicarbonate of 18 confirms metabolic acidosis.

Example 2: Albumin-Corrected Anion Gap with Delta-Delta

Patient Values:
Na⁺ = 138 mEq/L, Cl⁻ = 108 mEq/L, HCO₃⁻ = 16 mEq/L, Albumin = 2.4 g/dL, K⁺ = 4.2 mEq/L

Step 1: Standard AG
AG = 138 - (108 + 16) = 138 - 124 = 14 mEq/L

Step 2: AG with Potassium
AG (with K⁺) = (138 + 4.2) - (108 + 16) = 142.2 - 124 = 18.2 mEq/L

Step 3: Albumin-Corrected AG
Corrected AG = 14 + 2.5 × (4.0 - 2.4) = 14 + 2.5 × 1.6 = 14 + 4.0 = 18 mEq/L

Step 4: Delta-Delta Ratio
Delta-Delta = (14 - 12) / (24 - 16) = 2 / 8 = 0.25

Interpretation: The standard AG of 14 appears mildly elevated. The corrected AG of 18 reveals a more significant HAGMA hidden by low albumin. The delta-delta ratio of 0.25 (less than 1) indicates a concurrent normal anion gap (hyperchloremic) metabolic acidosis. This patient has a mixed acid-base disorder: high AG metabolic acidosis PLUS non-gap metabolic acidosis.

Limitations and Considerations

While the anion gap is an invaluable clinical tool, it has several important limitations that clinicians should be aware of:

Frequently Asked Questions

1. What is a dangerous anion gap level?

An anion gap greater than 20 mEq/L is generally considered significantly elevated and warrants urgent investigation. An AG greater than 30 mEq/L almost always indicates a serious underlying cause such as diabetic ketoacidosis, lactic acidosis, or toxic ingestion. However, even moderately elevated anion gaps (12-20 mEq/L) can be clinically significant, especially when corrected for albumin. The clinical context and the patient's overall condition are just as important as the absolute number.

2. Can the anion gap be negative?

Yes, though it is rare. A negative anion gap can occur in cases of severe hypoalbuminemia, bromide intoxication (where bromide is falsely measured as chloride by some analyzers), lithium overdose, or laboratory error. IgG myeloma can also produce a very low or negative anion gap. A negative anion gap should always prompt the clinician to repeat the measurement and investigate potential causes.

3. Why do some formulas include potassium and others do not?

Potassium is a cation, and technically including it gives a more complete picture of cation-anion balance. However, potassium levels are tightly regulated (normal range 3.5-5.0 mEq/L) and relatively small compared to sodium (normal ~140 mEq/L), so its inclusion or exclusion does not dramatically change the clinical utility of the AG. The most important thing is consistency: if your institution uses the formula with potassium, always use that formula. The normal reference range differs depending on which formula is used (8-12 without K⁺, 10-20 with K⁺).

4. How often should the anion gap be monitored?

The frequency depends on the clinical situation. In acute DKA management, the anion gap should be checked every 2-4 hours to monitor response to insulin therapy. In the ICU, it is commonly checked every 6-12 hours depending on the severity of the acid-base disorder. For outpatient monitoring, it is typically checked as part of routine metabolic panels. In suspected poisoning cases, the AG may be checked every 1-2 hours initially.

5. What is the difference between the anion gap and the osmolar gap?

The anion gap measures the difference between measured cations and measured anions in the blood, helping identify the cause of metabolic acidosis. The osmolar gap measures the difference between measured serum osmolality and calculated osmolality, helping identify unmeasured osmotically active substances (like methanol, ethylene glycol, ethanol, or isopropanol). In toxicology, the two are often used together: an elevated osmolar gap suggests the presence of an unmeasured osmol (parent compound), while an elevated anion gap suggests the presence of the compound's acidic metabolites. In methanol and ethylene glycol poisoning, the osmolar gap is high early (before metabolism) and the anion gap rises later (after metabolism).

6. Can medications affect the anion gap?

Yes, several medications can affect the anion gap. Metformin can cause lactic acidosis and an elevated AG. Acetazolamide causes a normal AG metabolic acidosis by inducing renal bicarbonate wasting. Large doses of penicillin or carbenicillin can raise the AG because these drugs are negatively charged. Propylene glycol-containing IV formulations (lorazepam, diazepam) can cause a high AG acidosis. Even normal saline infusion in large volumes causes a non-gap (hyperchloremic) acidosis. Understanding medication effects on the AG is important for accurate clinical interpretation.

7. Is the anion gap useful in children?

Yes, the anion gap is used in pediatric medicine with the same formulas and similar interpretation. However, normal ranges may differ slightly in neonates and young infants due to different normal electrolyte ranges and higher albumin levels. In pediatric emergencies, the anion gap is particularly important for identifying DKA (the most common cause of HAGMA in children), inborn errors of metabolism (especially in neonates presenting with metabolic acidosis), and accidental toxic ingestions.