Acid–Base Balance and the Anion Gap: Reading the Gas
The body defends its pH with almost religious devotion: every enzyme, every ion channel, every drug receptor is tuned to a narrow band around 7.4, and drifting far outside it is lethal within hours. A blood gas is the bedside window onto that defence — four numbers that tell you whether the lungs or the kidneys are failing, whether a poison is loose in the blood, and whether the patient in front of you is compensating or crashing. Learning to read it is less about arithmetic than about a way of thinking: pH first, then who caused it, then who is trying to fix it. And the moment you find a high anion gap, the question stops being "how acidotic?" and becomes "what unmeasured acid is in there?"
A 22-year-old is brought in drowsy, breathing deeply and rapidly — great sighing breaths that the nurse can hear from the door. She is a known type 1 diabetic who stopped her insulin. Her blood gas comes back: pH 7.05, low bicarbonate, low CO2. The maths is quick and damning — her anion gap is 28. Those deep breaths are not panic; they are her lungs frantically blowing off CO2 to buy back some pH against a flood of ketoacids. Two beds over lies a different story: an elderly man, vomiting for four days, lethargic, with a pH of 7.55 and a bicarbonate that has climbed instead of fallen. Same organ system, opposite direction. One gas tells you where a patient is on the map of acid and base — and, if you read it properly, what is driving them there and what to reach for.
The buffer that holds the line
pH is defended by a partnership between the lungs and the kidneys. The dominant defence is the bicarbonate buffer system, and it is best understood as an equation the body can push in either direction: CO2 + water ⇌ carbonic acid ⇌ H+ + bicarbonate. Add acid and the reaction runs left, mopping up H+ into CO2 that the lungs can exhale. The elegance is that the two ends of the buffer are controlled by two different organs on two different timescales. The lungs control CO2 — the respiratory, or fast, arm: within minutes, deeper and faster breathing blows off CO2 to raise pH, or shallow breathing retains it to lower pH. The kidneys control bicarbonate — the metabolic, or slow, arm: over hours to days they reabsorb, regenerate or excrete bicarbonate and pump out acid. This division is the whole framework. Name the disorder by which arm is primarily deranged — respiratory (a CO2 problem) or metabolic (a bicarbonate problem) — and by direction — acidosis or alkalosis.
Think of pH as the water level in a sink defended by two valves. The lungs are the fast tap — open them (breathe hard) and CO2 pours out in seconds, raising pH; throttle them and it backs up. The kidneys are the slow drain — over hours they let bicarbonate out or hold it back. When one valve is stuck wrong (the primary disorder), the other opens or closes to compensate and steady the level. Compensation never fully overshoots to the wrong side: a patient acidotic from the drain will breathe hard, but their lungs will not blow off so much CO2 that they turn frankly alkalotic. If the pH has crossed all the way over, there are two disorders, not one.
Reading the gas in four steps
A blood gas overwhelms students because they try to read every number at once. Read them in order instead. Step one: look at the pH — is the patient acidaemic (<7.35) or alkalaemic (>7.45)? That names the direction of the primary problem, regardless of any compensation. Step two: look at the CO2 and the bicarbonate and ask which one explains the pH. If the pH is low and the CO2 is high, it is respiratory acidosis; if the pH is low and the bicarbonate is low, it is metabolic acidosis. The number that moves in the direction that would cause the observed pH is the primary culprit. Step three: check compensation — the other arm should have shifted to blunt the change (a metabolic acidosis should show a low CO2 from increased breathing). Step four, and never skip it in an acidosis: calculate the anion gap. Do that arithmetic and the differential diagnosis splits cleanly in two.
The anion gap: the acid you can't see
The gap is a bookkeeping trick that reveals unmeasured acids. Blood is electrically neutral, so all its positive and negative charges must balance. The anion gap is a deliberately incomplete tally: sodium minus (chloride plus bicarbonate). Because the lab does not measure every anion, a small gap (normally ~8–12) always exists, made up of albumin and other unmeasured anions. Its power is in what happens when an acid floods the blood. Every acid is an H+ paired with an anion (lactate, a ketoacid, a metabolite of a poison). The H+ consumes bicarbonate — that is the acidosis — while its partner anion is one the lab does not measure. So the gap widens. A high anion gap therefore means an unmeasured acid is present, and it drives the single most useful split in acid–base medicine: metabolic acidosis divides into HIGH anion gap and NORMAL anion gap, and the two lists of causes barely overlap. Correct the gap for a low albumin (a common trap in sick, malnourished patients — see the Malnutrition chapter) or you will falsely call a high gap normal.
High anion gap: an acid has been added. The classic mnemonic is MUDPILES (a newer version is GOLD-MARK): Methanol, Uraemia (the retained acids of kidney failure), Diabetic and other Ketoacidosis, Propylene glycol (a solvent in some IV drugs), Isoniazid and Iron, Lactic acidosis, Ethylene glycol (antifreeze), and Salicylates (aspirin). Lactic acidosis is by far the commonest — the shocked, septic or hypoxic patient makes lactate faster than the liver can clear it, and metformin can add to it in renal impairment. The toxic alcohols (methanol, ethylene glycol) and salicylate belong equally to the Toxicology section, because their management is antidotal — fomepizole and dialysis for the alcohols, alkalinisation and dialysis for salicylate. Crucially, in a suspected toxic-alcohol poisoning you pair the anion gap with the osmolar gap: the parent alcohol raises serum osmolality before it is metabolised to acid, so early on the osmolar gap is high and the anion gap still normal, and later the reverse. Reading them together, covered in the Toxicology chapter, is how you catch the poisoning before it blinds or kills.
Normal anion gap: bicarbonate has been lost, and chloride took its place. Here no new acid is added — the body simply loses bicarbonate, and to keep the charges balanced the kidney retains chloride in its place. The gap stays normal because chloride is measured, so this is also called hyperchloraemic acidosis. There are three archetypes. The first is gastrointestinal bicarbonate loss — profuse diarrhoea strips litres of bicarbonate-rich fluid from the gut (a link to the Diarrhoea and rehydration chapter). The second is renal tubular acidosis (RTA), a family of tubular defects in which the kidney either fails to reclaim bicarbonate or fails to excrete acid. The third is iatrogenic, and it matters more than students expect: pouring in large volumes of 0.9% "normal" saline delivers a supraphysiological chloride load that itself generates a hyperchloraemic metabolic acidosis. This is a direct cross-link to the Intravenous fluids chapter and a major reason balanced crystalloids (Hartmann's, Plasma-Lyte) are now preferred for large-volume resuscitation — you can create an acidosis with the very fluid you meant to resuscitate with.
- pH is defended by the bicarbonate buffer: lungs control CO2 (respiratory/fast), kidneys control bicarbonate (metabolic/slow).
- Read the gas in order: pH → respiratory or metabolic → compensation → anion gap.
- Anion gap = Na+ − (Cl− + bicarbonate); a wide gap signals an unmeasured acid.
- High-gap metabolic acidosis (MUDPILES): methanol, uraemia, ketoacidosis, propylene glycol, isoniazid/iron, lactate, ethylene glycol, salicylates.
- Normal-gap (hyperchloraemic) acidosis: GI bicarbonate loss (diarrhoea), renal tubular acidosis, and 0.9% saline.
- Correct the anion gap for low albumin, or you will miss a genuine high-gap acidosis.
The other three disorders
Metabolic alkalosis is a high bicarbonate with an alkalaemic pH, and the recurring theme is loss of acid or loss of chloride and potassium. Vomiting or nasogastric suction strips hydrochloric acid straight from the stomach. Loop and thiazide diuretics generate a "contraction" alkalosis and drive potassium loss. Hypokalaemia itself sustains an alkalosis, and mineralocorticoid excess (primary hyperaldosteronism, Cushing's, liquorice) drives acid and potassium out through the kidney. Most of these are chloride-responsive and correct with saline and potassium repletion — a cross-link to the Potassium and the Diuretics chapters. On the respiratory side the logic is simple ventilation. Respiratory acidosis is hypoventilation retaining CO2 — the opioid-overdosed patient with a depressed respiratory drive, or the patient with severe COPD or neuromuscular weakness who cannot clear CO2 (see the Respiratory section). Respiratory alkalosis is hyperventilation blowing off CO2 — pain, anxiety, fever, hypoxia, and, importantly, the early phase of salicylate poisoning, which directly stimulates the respiratory centre before its metabolic acidosis takes over.
The drugs that shift acid–base
Sodium bicarbonate is the obvious antidote — and the most over-given. The instinct in an acidosis is to pour in base, but intravenous sodium bicarbonate is one of the most debated drugs in acute care, and the mature answer is that it is reserved, not routine. In lactic acidosis and diabetic ketoacidosis the evidence does not support giving it for the number alone — the acidosis resolves when you treat the cause, and bicarbonate carries real harms. It is a large sodium and volume load; it can cause hypokalaemia and hypocalcaemia (by shifting the ions); and there is the classic paradox — because it is metabolised to CO2, giving it can worsen intracellular and cerebrospinal-fluid acidosis if the patient cannot ventilate that CO2 away. So it is kept for specific indications: severe acidaemia (roughly pH below 7.1), certain poisonings where alkalinisation is the treatment (sodium bicarbonate for tricyclic-antidepressant cardiotoxicity and to alkalinise the urine in salicylate poisoning — both detailed in the Toxicology chapter), the shift and cardioprotection of severe hyperkalaemia, and the bicarbonate-wasting forms of renal tubular acidosis. THAM (tromethamine) is an alternative buffer that mops up H+ without generating CO2, occasionally used when CO2 retention is the problem.
The mirror-image drug is acetazolamide, a carbonic anhydrase inhibitor that makes the kidney waste bicarbonate — it deliberately causes a mild metabolic acidosis. That looks like a side effect until you realise it is sometimes exactly what you want: acetazolamide is used to correct a metabolic alkalosis (for instance the diuretic-induced, chloride-depleted alkalosis of a fluid-overloaded cardiac patient who cannot tolerate a saline load), and to pre-acidify the blood in altitude sickness so the drive to breathe is not blunted. It appears again in the Diuretics chapter for the same mechanism. The overarching principle across all of this is the one the whole topic keeps returning to: treat the cause, not the number. The deep, dangerous ketoacidosis of the young woman in our scene is not fixed by bicarbonate — it is fixed by insulin and fluids that switch off ketone production (the Diabetic emergencies chapter), whereupon her own kidneys and lungs restore the pH. Uraemic and toxic-alcohol acidoses are fixed by dialysis. The gas tells you how sick the patient is and points at the culprit; the treatment is almost always aimed upstream at the disease, not downstream at the pH.
The most useful single reflex in acid–base medicine: in any metabolic acidosis, calculate the anion gap before you do anything else — it silently reorganises your whole differential. A wide gap says "an acid has been added: think lactate, ketones, kidney failure, or a poison," and it should make you reach for the osmolar gap and the toxicology screen. A normal gap says "bicarbonate has been lost: think the gut, the renal tubule, or the saline you just infused." One subtraction changes what you look for, what you order, and what you treat.
Sodium bicarbonate — raises bicarbonate; reserved for severe acidaemia, TCA cardiotoxicity, salicylate/urine alkalinisation, severe hyperkalaemia, bicarbonate-wasting RTA. THAM — a CO2-free buffer. Acetazolamide — lowers bicarbonate (causes a mild acidosis) to treat metabolic alkalosis and altitude sickness. Insulin + fluids — the real treatment of diabetic ketoacidosis. Fomepizole + dialysis — toxic alcohols. Balanced crystalloids over 0.9% saline — to avoid iatrogenic hyperchloraemic acidosis. Naloxone / ventilation — reverse opioid-driven respiratory acidosis.
- Metabolic alkalosis: vomiting/NG loss, diuretics, hypokalaemia, mineralocorticoid excess — most are chloride-responsive.
- Respiratory acidosis = hypoventilation (opioids, COPD); respiratory alkalosis = hyperventilation (pain, hypoxia, early salicylate).
- Sodium bicarbonate is reserved, not routine — sodium load, hypokalaemia/hypocalcaemia, and paradoxical intracellular acidosis are real risks.
- Acetazolamide deliberately induces a mild acidosis — used for metabolic alkalosis and altitude sickness.
- Pair the osmolar gap with the anion gap when a toxic alcohol is possible.
- Treat the cause — insulin/fluids for DKA, dialysis for uraemia and toxic alcohols — not the pH number.
- Reflexively giving IV sodium bicarbonate to "fix the number" in lactic acidosis or DKA — it doesn't treat the cause and risks a sodium load, hypokalaemia, hypocalcaemia and paradoxical intracellular acidosis.
- Forgetting to calculate the anion gap — and not correcting it for a low albumin, so a genuine high-gap acidosis is read as normal.
- Resuscitating with large volumes of 0.9% saline and then puzzling over the hyperchloraemic acidosis you created — reach for a balanced crystalloid instead.
A shocked, septic patient has pH 7.18, low bicarbonate, a low CO2, and an anion gap of 24. Serum lactate is markedly raised. What is the single best next step?
- pH is defended by the bicarbonate buffer — lungs (CO2, fast) and kidneys (bicarbonate, slow); read a gas as pH → respiratory/metabolic → compensation → anion gap.
- Metabolic acidosis splits by the anion gap: high (MUDPILES — lactate, ketones, uraemia, toxic alcohols, salicylate) versus normal/hyperchloraemic (diarrhoea, RTA, 0.9% saline).
- The other three: metabolic alkalosis (vomiting, diuretics, hypokalaemia, mineralocorticoid excess), respiratory acidosis (hypoventilation), respiratory alkalosis (hyperventilation).
- Bicarbonate is reserved (severe acidaemia, TCA/salicylate, hyperkalaemia, some RTA), acetazolamide lowers bicarbonate on purpose — but the rule is treat the cause, not the number.
- Rang & Dale's Pharmacology — Drugs affecting the kidney and body fluids; the carbonic anhydrase inhibitors.
- Katzung, Basic & Clinical Pharmacology — Diuretic agents (acetazolamide) and agents used in acid–base disturbances.
- British National Formulary (BNF) — Sodium bicarbonate, acetazolamide, and fluids and electrolytes.
- Ganong's Review of Medical Physiology — Regulation of hydrogen ion concentration and acid–base balance.
- Kraut JA, Madias NE. Serum anion gap: its uses and limitations in clinical medicine. Clinical Journal of the American Society of Nephrology.
- NICE Clinical Guideline CG174 — Intravenous fluid therapy in adults in hospital (balanced crystalloids and hyperchloraemic acidosis).

