Medical Disclaimer: This calculator is for educational purposes only. It does not replace clinical judgment. Always interpret lab values in the context of a full clinical assessment.
Enter Lab Values (mEq/L)Free · No signup
mEq/L
mEq/L
mEq/L
g/dL
How to Calculate Anion Gap
The anion gap quantifies unmeasured anions in plasma. It is calculated from three values on a basic metabolic panel (BMP): sodium, chloride, and bicarbonate.
Standard formula: Anion Gap = Na - (Cl + HCO3) Normal range: 8 to 12 mEq/L (without K+)
Albumin correction (Figge formula): Corrected AG = AG + 2.5 x (4.0 - measured albumin) Use when albumin is below 4.0 g/dL
Worked example: Na 138, Cl 100, HCO3 22. Raw AG = 138 - 100 - 22 = 16 mEq/L. Albumin is 2.5 g/dL. Correction: 16 + 2.5 x (4.0 - 2.5) = 16 + 3.75 = 19.75 mEq/L. Without correction, the gap looks mildly elevated. With correction, it approaches the HAGMA threshold of 20.
The albumin correction uses the same principle as the Corrected Calcium Calculator: low albumin shifts the apparent value down from the true physiologic value, and a correction factor restores the accurate interpretation.
Anion Gap Calculator with CO2: Using Bicarbonate Correctly
The CO2 field on a basic metabolic panel refers to total CO2 (predominantly serum bicarbonate), not the CO2 partial pressure from a blood gas. When this calculator asks for bicarbonate (HCO3), enter the CO2 value from the BMP directly. The two are not interchangeable.
Value
Source
Units
Use in AG formula?
CO2 (BMP)
Blood chemistry panel
mEq/L or mmol/L
Yes (this is HCO3)
pCO2 (blood gas)
ABG or VBG
mmHg
No (wrong value)
Normal ranges: BMP CO2 (bicarbonate) is typically 22 to 29 mEq/L. pCO2 from an arterial blood gas is typically 35 to 45 mmHg. A bicarbonate of 18 on a BMP indicates metabolic acidosis; a pCO2 of 18 mmHg on a blood gas indicates severe respiratory alkalosis. Entering the wrong value produces a meaningless anion gap result.
DKA is the most common cause of a markedly elevated anion gap in hospitalized patients. Monitoring glucose alongside acid-base status is key; the A1C Calculator provides context on long-term glucose control in diabetic patients presenting with metabolic derangements.
Urine Anion Gap Calculator: Formula and Interpretation
The urine anion gap is a separate calculation used to narrow the differential in normal anion gap metabolic acidosis (NAGMA). It estimates unmeasured urinary ammonium (NH4+) excretion, which cannot be measured directly in most labs.
Urine Anion Gap = Urine Na + Urine K - Urine Cl Negative result (< -20): high NH4+ excretion (GI loss, diarrhea) Positive result (> 0): low NH4+ excretion (renal tubular acidosis)
When to use it: The urine anion gap is indicated when a patient has metabolic acidosis with a normal serum anion gap (confirmed NAGMA). A negative urine gap confirms intact renal ammonium excretion, pointing to gastrointestinal bicarbonate losses. A positive gap in the context of NAGMA suggests the kidney is failing to acidify urine, consistent with type 1 or type 4 renal tubular acidosis (RTA).
Limitation: The urine anion gap is unreliable when urine chloride is very high (above 80 mEq/L in volume-depleted states) or when urinary ketones or other unmeasured anions are significantly elevated. This calculator covers serum values only. For other aerobic and metabolic health assessments, see the VO2 Max Calculator.
Na 138, Cl 98, HCO3 12 in DKA: Anion Gap Calculation With Albumin Correction
A 52-year-old type 1 diabetic presents with nausea and vomiting. BMP shows: Na 138, Cl 98, HCO3 12, Albumin 2.0 g/dL.
Raw AG (138 - 98 - 12)28 mEq/L
Albumin correction: +2.5 x (4.0 - 2.0)+5.0
Corrected AG33 mEq/L (HAGMA)
The raw gap of 28 is already markedly elevated, confirming HAGMA and consistent with DKA. The albumin correction raises it further because hypoalbuminemia was masking some of the true gap. Without the correction, a clinician might underestimate how severely the acidosis has widened the gap.
Anion Gap Errors: Wrong CO2 Input, Skipped Albumin Correction, and Missed NAGMA
Not correcting for low albumin
A raw anion gap of 12 in a patient with albumin of 2.0 g/dL actually represents a corrected gap of 17, which is significantly elevated. Skipping the correction misses high anion gap acidosis in critically ill patients who commonly have albumin below 2.5 g/dL.
Using pCO2 from a blood gas instead of serum bicarbonate
Serum CO2 on a BMP and pCO2 from a blood gas are different values in different units. Use the bicarbonate (HCO3) field from the metabolic panel, not the CO2 partial pressure from an arterial or venous gas.
Ignoring a normal anion gap when bicarbonate is low
A normal anion gap with low bicarbonate indicates NAGMA, not the absence of acidosis. Diarrhea, renal tubular acidosis, and saline administration all cause this pattern. The anion gap identifies the type of acidosis, not whether acidosis is present.
Using potassium in the formula when the lab does not
Some older references include potassium in the formula (Na + K - Cl - HCO3), giving a normal range of 10 to 14. Most modern labs report the potassium-free version. Using the wrong formula with the wrong reference range leads to false interpretation.
Treating an elevated anion gap as a diagnosis
A high anion gap is a finding, not a diagnosis. It signals elevated unmeasured anions and prompts a MUDPILES workup. Always combine the result with the clinical picture, history, lactate, ketones, and osmolar gap.
Frequently Asked Questions
The formula for calculating anion gap is: Anion Gap = Na minus (Cl + HCO3). Subtract the sum of chloride and bicarbonate from sodium using values from a basic metabolic panel. Normal range is 8 to 12 mEq/L when potassium is excluded. For the albumin-corrected version, use the Figge formula: Corrected AG = AG + 2.5 x (4.0 minus measured albumin in g/dL). Apply the correction whenever albumin is below 4.0 g/dL, which is common in hospitalized patients.
Medicine (Baltimore). Foundational reference for anion gap interpretation, the standard formula, and the MUDPILES differential for high anion gap metabolic acidosis.
Critical Care. Reference for the normal anion gap range of 8 to 12 mEq/L when potassium is excluded from the calculation.
HR
Hassaan Rasheed
Developer and Researcher, CalculatorFlux
Researches and verifies the formulas, methodology, and source data behind each calculator on CalculatorFlux. All tools are built and checked against the cited references before publication.
Last updated: May 2026
Anion Gap Interpretation
Range
Interpretation
< 8 mEq/L
Low (hypoalbuminemia, myeloma)
8-12 mEq/L
Normal
12-20 mEq/L
Mildly elevated
20-30 mEq/L
High (HAGMA likely)
> 30 mEq/L
Severely elevated
MUDPILES (High AG Causes)
MMethanol
UUremia
DDiabetic ketoacidosis
PPropylene glycol
IIsoniazid / Iron
LLactic acidosis
EEthylene glycol
SSalicylates
Pro Tip
Always correct for albumin in ICU patients. An albumin of 2.0 g/dL reduces the baseline anion gap by 5 points, masking a true high anion gap acidosis behind a misleadingly normal raw value.