Acid–Base Disorder

Diabetic Ketoacidosis & the Anion Gap

Diabetic ketoacidosis is the prototypical high anion gap metabolic acidosis. The gap is central to its diagnosis, its monitoring, and its resolution — and tracking its closure is how clinicians know insulin is working.

What is diabetic ketoacidosis?

Diabetic ketoacidosis (DKA) is a life-threatening complication of absolute or relative insulin deficiency, marked by hyperglycemia, ketonemia, and a high anion gap metabolic acidosis. It is the leading cause of death in children with type 1 diabetes and remains common in adults with both type 1 and type 2 diabetes, particularly during intercurrent illness, infection, or non-adherence with insulin therapy.

DKA is a textbook example of high anion gap metabolic acidosis (HAGMA). The offending anions are the ketoacids β-hydroxybutyrate and acetoacetate — small organic anions that accumulate in blood when insulin is absent and counter-regulatory hormones (glucagon, cortisol, catecholamines, growth hormone) are unchecked. As they accumulate, they consume bicarbonate and widen the gap; the magnitude of this value directly reflects the ketone burden.

Pathophysiology — insulin deficiency and lipolysis

In normal metabolism, insulin suppresses lipolysis in adipose tissue and glucose production in the liver. When insulin falls — or when its action is overwhelmed by stress hormones — two processes accelerate simultaneously:

  1. Lipolysis in adipose tissue. Hormone-sensitive lipase, no longer inhibited by insulin, hydrolyzes triglycerides into free fatty acids, which flood the liver.
  2. Hepatic ketogenesis. Free fatty acids enter hepatic mitochondria (via the carnitine shuttle, derepressed by glucagon), undergo β-oxidation to acetyl-CoA, and are diverted away from the tricarboxylic acid cycle into ketogenesis. The ketone bodies β-hydroxybutyrate and acetoacetate are produced and exported into the blood.

Both ketones are organic acids. They dissociate at physiological pH into H⁺ and the corresponding anion (β-hydroxybutyrate⁻, acetoacetate⁻). The hydrogen ion is buffered by bicarbonate — consuming it — while the anion accumulates as an "unmeasured anion" that widens the calculated gap. Hyperglycemia produces an osmotic diuresis, driving fluid and electrolyte loss (sodium, potassium, chloride) and concentrating the ketoacids further. The result is the classic DKA picture: a markedly high anion gap, a profoundly low bicarbonate, a high glucose, and ketonuria.

The β-hydroxybutyrate / acetoacetate ratio

In severe DKA the ratio of β-hydroxybutyrate to acetoacetate shifts toward β-hydroxybutyrate (sometimes 10:1 or higher) as the cellular redox state becomes more reduced. The nitroprusside urine ketone test detects only acetoacetate and acetone — not β-hydroxybutyrate — so the bedside ketone dip can underestimate ketone burden in profound DKA. A direct serum β-hydroxybutyrate assay is more reliable and correlates closely with the result.

The anion gap in DKA diagnosis

The diagnostic triad of DKA is hyperglycemia, ketonemia, and metabolic acidosis, with the anion gap quantifying the metabolic component. A calculated anion gap above 12 mEq/L in the setting of hyperglycemia and ketones confirms the diagnosis; values above 20 mEq/L indicate moderate-to-severe DKA. The American Diabetes Association classifies DKA severity by the combination of pH, bicarbonate, and mental status — but this value is the practical bedside marker clinicians track hour by hour (Kitabchi et al., ADA Consensus).

Two pitfalls deserve mention. First, euglycemic DKA — DKA with a near-normal glucose — is increasingly recognized, especially with sodium–glucose cotransporter-2 (SGLT2) inhibitors, pregnancy, or prolonged fasting. The gap remains the key diagnostic clue when the glucose is misleadingly reassuring. Second, the concomitant metabolic alkalosis of vomiting (common in DKA) can partially offset the acidosis and produce a bicarbonate that looks less depressed than the result would predict — a delta ratio above 2 in DKA should prompt consideration of concurrent vomiting or volume contraction.

Anion gap closure during treatment

The single most useful serial marker during DKA treatment is the anion gap, not the glucose. As insulin is infused, ketogenesis halts and existing ketones are metabolized to bicarbonate; the value falls toward normal — a process called gap closure. The bicarbonate rises in parallel. Closure of the gap signals that the underlying ketoacidosis has resolved, even if hyperglycemia was corrected earlier (glucose frequently normalizes before the ketones clear, which is why dextrose is added to the IV fluids once glucose drops below ~200 mg/dL while insulin continues — Kitabchi et al., ADA Consensus).

Tracking the gap is the rationale for serial metabolic panels every 2–4 hours during treatment. The insulin infusion is continued until the gap closes — typically defined as AG ≤ 12 mEq/L — at which point subcutaneous insulin can be transitioned. This is covered in detail on the DKA management page, including the practical use of the bicarbonate deficit calculator to estimate the total acid load at presentation.

Why hyperchloremic acidosis develops during resuscitation

A recurring confusion in DKA is the patient whose gap closes but whose bicarbonate remains depressed. This is usually a hyperchloremic (normal anion gap) metabolic acidosis that develops during saline resuscitation — and it explains why the bicarbonate often lags behind the value during recovery.

The mechanism is straightforward. Normal saline contains 154 mEq/L of chloride, far higher than plasma. Large-volume saline resuscitation expands the extracellular volume, diluting the remaining bicarbonate and loading the patient with chloride. As the ketoanions (β-hydroxybutyrate, acetoacetate) are metabolized back to bicarbonate inside cells, much of that bicarbonate is then excreted in the urine along with sodium — while the chloride from the saline stays behind. The net effect is a relative chloride excess and a hyperchloremic, normal-gap acidosis that becomes apparent once the original HAGMA has closed.

This is also why the delta ratio falls during DKA recovery. A patient who presented with a delta ratio of 1.4 (pure HAGMA) may shift into the 0.4–0.8 band (mixed HAGMA + NAGMA) as saline accumulates, then end up below 0.4 (pure hyperchloremic acidosis) once the gap closes. This is expected and not by itself a sign of treatment failure — but it can be misread if the clinician expects the bicarbonate to normalize in lockstep with the gap. Balanced crystalloids (lactated Ringer's, Plasma-Lyte) reduce but do not eliminate this phenomenon.

Putting it together — the DKA anion gap timeline

  • Presentation: anion gap markedly elevated (often 25–35+ mEq/L), bicarbonate depressed, glucose high, ketones positive.
  • Hours 2–8: with fluids and insulin, glucose falls first; anion gap begins to close; bicarbonate rises slowly; potassium is aggressively repleted.
  • Hours 8–18: anion gap closes (≤ 12 mEq/L); bicarbonate often still depressed due to hyperchloremic acidosis from saline; insulin transitioned to subcutaneous.
  • Hours 18–48: chloride excess clears; bicarbonate normalizes as the kidney excretes the chloride load and regenerates bicarbonate.

The gap is therefore both the diagnostic anchor at presentation and the principal marker of biochemical resolution. A worked example of this timeline, including insulin dosing and fluid transitions, is in the DKA case study.