📄 Methodology & Validation
Acid-Base Clinical Calculator — Methodology & Validation
TheraCALC is a web-based clinical decision support platform. The acid-base calculator applies a stepwise, algorithm-based approach to interpret arterial blood gas (ABG) and basic metabolic panel (BMP) values — identifying primary acid-base disorders, verifying compensation, detecting mixed disorders, and generating pattern-based management guidance for licensed clinicians. Results should be interpreted in the context of the patient's clinical status, comorbidities, and institutional protocols.
Runtime independence
Recommendations are generated using the proprietary TheraIQ engine developed and maintained in-house. TheraCALC does not rely on any third-party clinical decision-support service.
1 — Acid-Base Interpretation Framework
- The calculator follows a five-step algorithm modeled on approaches commonly used in internal medicine and critical care education. Each major step is surfaced in the "How We Got Here" tab with the formula applied, the computed value, and a brief clinical interpretation.
| Step | Focus | What the calculator evaluates |
|---|---|---|
| 1 | pH | Determine acidemia (pH < 7.35), alkalemia (pH > 7.45), or near-normal pH |
| 2 | Primary process | Compare HCO₃ and PaCO₂ to identify the primary driver as metabolic (HCO₃ change) or respiratory (PaCO₂ change) |
| 3 | Anion gap | Calculate AG = Na − Cl − HCO₃. Correct for albumin (+2.5 mEq/L per 1 g/dL below 4.0). Assess delta-delta ratio |
| 4 | Compensation | Apply the appropriate bedside compensation formula. Values outside the expected range may suggest a concurrent process |
| 5 | Mixed-process screening | Integrate delta-delta ratio, urine indices (Cl, Na, K, UAG, TTKG), osmol gap, and Henderson-Hasselbalch cross-check |
2 — Primary Disorder Classification
- When pH is available it is the primary driver of classification. BMP-only interpretation uses the HCO₃ pattern alone and is labeled as estimated throughout the interface.
- Near-normal pH (7.35–7.45) with opposing HCO₃ and PaCO₂ abnormalities is handled by identifying the dominant driver based on its relative deviation from normal.
| Condition | Classification |
|---|---|
| pH < 7.35, HCO₃ < 22 | Metabolic acidosis |
| pH < 7.35, PaCO₂ > 45 | Respiratory acidosis |
| pH > 7.45, HCO₃ > 26 | Metabolic alkalosis |
| pH > 7.45, PaCO₂ < 35 | Respiratory alkalosis |
| pH 7.35–7.45 with PaCO₂ < 35 and HCO₃ < 22 | Mixed pattern: respiratory alkalosis + metabolic acidosis (e.g., salicylate toxicity, early sepsis) |
| pH 7.35–7.45 with PaCO₂ > 45 and HCO₃ > 26 | Mixed pattern: respiratory acidosis + metabolic alkalosis |
| BMP only: HCO₃ < 22 | Metabolic acidosis (estimated — ABG required to confirm) |
| BMP only: HCO₃ > 26 | Metabolic alkalosis (estimated — ABG required to confirm) |
3 — Anion Gap, Albumin Correction & Delta-Delta Ratio
3.1 Anion gap and albumin correction
| Formula / concept | Detail |
|---|---|
| Anion gap formula | AG = Na⁺ − Cl⁻ − HCO₃⁻ (normal range: approximately 8–12 mEq/L) |
| Albumin correction | Corrected AG = raw AG + 2.5 × (4.0 − albumin in g/dL). Each 1 g/dL of albumin below 4.0 can mask about 2.5 mEq/L of true AG elevation |
| Thresholds | Raw AG > 12 mEq/L or corrected AG > 14 mEq/L is flagged as elevated. Corrected AG is used whenever albumin has been entered |
| Prompts | If AG > 6 without albumin entered, the disclosure strip prompts for albumin. If corrected AG > 14 without serum osmolality, osmol gap entry is prompted |
3.2 Delta-delta ratio
- In a pure elevated-AG process, each mEq/L rise in AG corresponds to a 1 mEq/L fall in HCO₃. The delta-delta ratio detects when these do not match, indicating a concurrent metabolic process.
| Delta-delta value | Interpretation |
|---|---|
| < 0.4 | Pattern consistent with pure normal-AG (hyperchloremic) metabolic acidosis |
| 0.4 – 1.0 | Pattern suggests elevated-AG acidosis with concurrent normal-AG acidosis |
| 1.0 – 2.0 | Pattern consistent with a predominantly elevated-AG process — HCO₃ drop matches AG rise |
| > 2.0 | Pattern suggests elevated-AG acidosis with concurrent metabolic alkalosis |
4 — Compensation Formulas
- Expected compensation is calculated from commonly used bedside formulas and displayed as a range rather than a single point. An observed value outside the expected range may suggest a concurrent process; the tool uses "may suggest" language, not "confirms."
| Primary disorder | Expected compensation | Tolerance / notes |
|---|---|---|
| Metabolic acidosis | PaCO₂ ≈ 1.5 × HCO₃ + 8 (Winters formula) | ±2 mmHg around the calculated value |
| Metabolic alkalosis | PaCO₂ ≈ 0.7 × (HCO₃ − 24) + 40 | ±2 mmHg; capped at approximately 55 mmHg |
| Acute respiratory acidosis | HCO₃ rises by about (PaCO₂ − 40) / 10 | ±2 mEq/L; onset < 24 hours |
| Chronic respiratory acidosis | HCO₃ rises by about 3.5 × (PaCO₂ − 40) / 10 | ±3 mEq/L; onset over days–weeks |
| Acute respiratory alkalosis | HCO₃ falls by about 2 × (40 − PaCO₂) / 10 | ±3 mEq/L |
| Chronic respiratory alkalosis | HCO₃ falls by about 5 × (40 − PaCO₂) / 10 | ±3 mEq/L |
Respiratory acidosis annotation
For respiratory acidosis, the "How We Got Here" tab annotates whether HCO₃ falls within the acute range, the chronic range, or between them — displayed as "consistent with acute event," "consistent with chronic hypercapnia," or "acute-on-chronic pattern." This distinction is directly relevant to COPD management decisions.
5 — Mixed Disorder Detection
- Mixed disorders are identified from five pattern triggers. Each detected pattern is displayed with the specific findings that triggered it, a confidence label reflecting available data, and any limitations such as albumin not being entered.
| Pattern | Trigger | Examples |
|---|---|---|
| Elevated-AG acidosis + metabolic alkalosis | Corrected AG > 14 and HCO₃ > 26 (or delta-delta > 2) | DKA with vomiting; uremia with contraction alkalosis |
| Elevated-AG acidosis + normal-AG acidosis | Corrected AG > 14 and delta-delta < 1.0 | Lactic acidosis with concurrent diarrhea; sepsis with large-volume normal saline |
| Respiratory acidosis + metabolic alkalosis | PaCO₂ > 45, HCO₃ > 30, and pH near-normal | COPD with diuretics; post-hypercapnic alkalosis |
| Respiratory alkalosis + metabolic acidosis | PaCO₂ < 35, HCO₃ < 20, and pH 7.38–7.45 | Salicylate toxicity; early sepsis |
| Triple disorder (rare) | Elevated AG, delta-delta < 1.0, and HCO₃ higher than normal-AG acidosis alone would predict | DKA with concurrent GI loss and vomiting |
6 — Clinical Cutoffs & Action Thresholds
- Key clinical values used as thresholds throughout the calculator are defined centrally so changes propagate consistently to every output that depends on them.
| Parameter | Threshold | Purpose |
|---|---|---|
| Anion gap (raw) | > 12 mEq/L | Flags as elevated; prompts albumin entry |
| Anion gap (albumin-corrected) | > 14 mEq/L | Elevated corrected AG; triggers AGMA workup |
| pH — critical low | < 7.10 | Critical urgency trigger; bicarbonate consideration threshold |
| pH — urgent low | < 7.20 | Urgent intervention range |
| pH — urgent high | > 7.60 | Emergent alkalemia; HCl therapy consideration in selected ICU cases |
| pH — critical high | > 7.65 | Critical urgency trigger |
| Potassium — critical low | < 2.5 mEq/L | Critical hypokalemia; arrhythmia risk |
| Potassium — high | > 5.5 mEq/L | Hyperkalemia intervention trigger |
| Potassium — urgent high | > 6.5 mEq/L | Critical urgency escalation; EKG prompt |
| Lactate — elevated | > 2.0 mmol/L | Perfusion concern |
| Lactate — critical | > 4.0 mmol/L | Perfusion emergency; urgent action |
| Osmolal gap — borderline | > 10 mOsm/kg | Borderline elevation; limited specificity alone |
| Osmolal gap — significant | > 20 mOsm/kg | High concern for toxic alcohol or mannitol |
| Urine chloride — responsive | < 25 mEq/L | Chloride-responsive metabolic alkalosis pattern |
| Urine chloride — resistant | > 40 mEq/L | Chloride-resistant (mineralocorticoid-mediated) alkalosis pattern |
| CrCl — acetazolamide gate | < 30 mL/min | Acetazolamide considered contraindicated below this threshold |
| CrCl — arginine HCl gate | < 50 mL/min | Arginine HCl considered contraindicated below this threshold |
7 — Derived Calculations
7.1 Osmolal gap
- Calculated osmolality = (2 × Na⁺) + (BUN / 2.8) + (glucose / 18). Gap = measured serum osmolality − calculated osmolality.
| Gap value | Interpretation |
|---|---|
| < 10 mOsm/kg | Normal |
| 10–20 mOsm/kg | Borderline — consider ethanol or early toxic alcohol ingestion |
| > 20 mOsm/kg | Significant — high concern for toxic alcohol (methanol, ethylene glycol), mannitol, or ethanol |
7.2 Transtubular Potassium Gradient (TTKG)
- Valid only when urine osmolality exceeds serum osmolality (concentrated urine). Suppressed automatically when urine is dilute.
| Scenario | TTKG | Interpretation |
|---|---|---|
| Hypokalemia | > 4 | Renal potassium wasting (aldosterone, diuretics, RTA) |
| Hypokalemia | < 2 | Extrarenal loss (GI, skin) |
| Hyperkalemia | < 7 | Impaired aldosterone; consider Type 4 RTA or adrenal insufficiency |
| Hyperkalemia | > 11 | Appropriate kaliuresis |
7.3 Urine Anion Gap (UAG)
- UAG = urine Na⁺ + urine K⁺ − urine Cl⁻. It is a rough surrogate for urinary ammonium only when evaluating confirmed normal-anion-gap metabolic acidosis. Direct urine ammonium measurement is preferred when available.
- The UAG is not interpreted as evidence for or against renal tubular acidosis in elevated-anion-gap acidosis. Excretion of unmeasured anions, including ketoanions and hippurate after toluene exposure, can make the UAG misleading; bicarbonaturia and other unusual urinary ions can also limit interpretation.
| UAG | Interpretation |
|---|---|
| Strongly negative (< −20 mEq/L) | High ammonium excretion — consistent with GI bicarbonate loss (diarrhea, ileostomy) |
| Positive (> 0 mEq/L) | Low ammonium excretion — consistent with RTA; subtype by urine pH and potassium |
7.4 A-a Oxygen Gradient
- Formula: A-a = [(FiO₂/100) × 713 − PaCO₂/0.8] − PaO₂. On room air at sea level, the estimated age-adjusted upper limit of normal is approximately 4 + (age/4) mmHg. If FiO₂ is blank, the calculator visibly identifies its 21% room-air assumption. If age is blank, it shows the calculated gradient but withholds normal/elevated classification. The room-air age threshold is not applied to entered FiO₂ above 21%, because the expected gradient rises with increasing FiO₂. FiO₂ outside 21–100% is flagged and A-a suppressed. Requires PaO₂ from ABG. Merck Manual Professional — Measurement of Gas Exchange ↗
7.5 Corrected Sodium for Hyperglycemia
- Corrected Na⁺ = Measured Na⁺ + 1.6 × (glucose − 100) / 100 mg/dL. Shown when glucose > 200 mg/dL. Glucose > 600 mg/dL prompts DKA vs HHS differentiation.
8 — Renal Function & Drug Dosing Gates
- Cockcroft-Gault CrCl is used for three drug-specific safety gates: acetazolamide (CrCl < 30 mL/min: considered contraindicated), arginine HCl (CrCl < 50 mL/min: considered contraindicated), and potassium replacement rate adjustment.
- Formula: CrCl = [(140 − age) × weight × (0.85 if female)] / (72 × SCr).
Cockcroft-Gault limitation
This equation may overestimate GFR in frail or sarcopenic patients. Cystatin C-based eGFR is preferred in those populations where available. This is disclosed in the caveats section when creatinine is elevated.
9 — Input Plausibility Checks
- The calculator cross-checks entered values for internal consistency. Warnings appear in the caveats section and do not block calculation.
| Check | Trigger | What the clinician sees |
|---|---|---|
| Henderson-Hasselbalch cross-check | Calculated pH differs from entered pH by more than 0.08 units | Amber caveat: pH inconsistent with HCO₃ and PaCO₂ — verify the entered values |
| Physiologic pH range | pH below 6.5 or above 8.0 | Amber caveat: outside the survivable range — verify entry |
| PaCO₂ range | PaCO₂ below 10 or above 120 mmHg | Amber caveat: outside plausible range — verify entry |
| FiO₂ validity | FiO₂ below 21% or above 100% | A-a gradient suppressed; amber caveat displayed |
| TTKG validity | Urine osmolality at or below serum osmolality | TTKG suppressed; dilute urine renders result unreliable |
| CrCl availability | Creatinine entered but age or weight missing | Caveat names the specific missing field and lists affected drug dosing gates |
10 — Data Confidence & Urgency Indicators
10.1 Data confidence badge
| Badge | When it appears |
|---|---|
| BMP ONLY | No pH or PaCO₂ entered; banner shows "(BMP-estimated)" after the disorder label |
| PARTIAL ABG | Exactly one of pH or PaCO₂ is present; interpretation remains provisional and actionable bicarbonate dosing is withheld |
| ABG CONFIRMED | pH and PaCO₂ present |
| ABG + ALBUMIN | pH, PaCO₂, and albumin all present |
| URINE-INFORMED | pH, PaCO₂, and urine electrolytes present |
| MULTI-SOURCE | pH, PaCO₂, albumin, and urine data all present |
10.2 Action urgency indicator
| Urgency level | Triggered by |
|---|---|
| Urgent action (red bar) | pH below 7.10, pH above 7.65, potassium above 6.5 mEq/L, or lactate above 4.0 mmol/L |
| Urgent (orange bar) | pH below 7.20, potassium below 2.5 or above 6.0 mEq/L, mixed disorder, or creatinine above 4.0 mg/dL |
| Routine | None of the above applies |
10.3 Fluids and lactate
- Acid-base values and lactate do not independently establish volume status, fluid responsiveness, sepsis, shock, or an intravenous-fluid rate. The calculator therefore provides selection considerations rather than an automatic rate, except when a separately derived calculation such as free-water deficit supplies the displayed rate range.
- For confirmed sepsis-induced hypoperfusion or septic shock, the 2026 Surviving Sepsis Campaign suggests at least 30 mL/kg of intravenous crystalloid in the first 3 hours, individualized to patient characteristics and response; balanced crystalloids are generally preferred over 0.9% saline.
- Serial lactate can help assess trajectory, but no single clearance target applies to every cause or care setting. Lactate is interpreted with perfusion, source control, medications or toxins, regional ischemia, and hepatic clearance; fluids should not be continued solely to normalize lactate.
11 — Clinical Presets
- The calculator includes 18 clinical teaching presets covering major acid-base patterns encountered in inpatient practice. Demographics and laboratory inputs vary according to the teaching objective; a preset may intentionally omit a value to demonstrate provisional interpretation.
| Category | Presets |
|---|---|
| Reference | Normal reference pattern |
| Elevated-AG metabolic acidosis | DKA / HAGMA ketoacidosis, lactic acidosis (shock), ethylene glycol, methanol, starvation ketosis, and early toluene exposure |
| Osmol gap without primary acidosis | Isopropanol ingestion |
| Normal-AG metabolic acidosis | Diarrheal NAGMA, RTA Type 1 (distal; urine pH 6.5), RTA Type 4 (hyperkalemic), chronic diarrhea on CKD, and late toluene exposure |
| Metabolic alkalosis | Vomiting-induced alkalosis (urine Cl⁻ 15 mEq/L; chloride-responsive) |
| Mixed disorders | Salicylate toxicity, sepsis (respiratory alkalosis + metabolic acidosis), and post-cardiac arrest (lactic acidosis + hyperkalemia) |
| Respiratory | COPD acute-on-chronic respiratory acidosis |
12 — Internal Validation Summary
- The regression suite pins the expected primary classification for all 18 teaching presets and includes targeted rendered-output checks for the safety-sensitive behaviors listed below.
- These tests represent internal unit testing and do not replace prospective clinical validation. External validation against patient-level data is a future goal.
| Category verified |
|---|
| Primary classification — all four disorder types and normal patterns |
| Near-normal pH mixed classification (salicylate and early sepsis patterns) |
| BMP-only inference and confidence badge assignment |
| Partial-ABG labeling and withholding of actionable bicarbonate dosing until both pH and PaCO₂ are present |
| Anion gap calculation and albumin correction |
| Raw versus albumin-corrected anion-gap labeling |
| Delta-delta ratio calculation and interpretation thresholds |
| Targeted compensation formula and range checks, including exact Winters formula rendering |
| Acute vs chronic respiratory acidosis annotation |
| Mixed-disorder pattern detection, including rare triple-disorder patterns |
| Action urgency independent of biochemical severity |
| Henderson-Hasselbalch plausibility checks (true positives and negatives) |
| FiO₂ validity gate and A-a gradient suppression |
| TTKG suppression when urine osmolality is dilute |
| Osmolal gap calculation |
| HHS vs DKA differentiation at very high glucose |
| CrCl drug gates — acetazolamide, arginine HCl, potassium rate adjustment |
| Female CrCl 0.85 multiplier applied correctly |
| Urine chloride subtyping; UAG and TTKG calculation |
| UAG interpretation restricted to confirmed normal-gap metabolic acidosis, with high-gap confounders disclosed |
| BMP-only gating of intervention and dose text |
| No automatic fluid rate or universal lactate-clearance target derived solely from the acid-base pattern |
| Runtime across all teaching presets without errors |
| User interface input/output linkage checks |
13 — Known Limitations & Clinical Caveats
- BMP-only or incomplete-ABG classification. Without both pH and PaCO₂, the calculator cannot fully confirm acidemia or alkalemia, verify compensation, or reliably detect mixed disorders. These outputs are labeled as provisional, and actionable bicarbonate dosing is withheld.
- Compensation formula variance. Winters formula and standard respiratory compensation ranges are bedside approximations derived from population studies. Individual variation is expected; the tool consistently uses "may suggest" rather than "confirms."
- Creatinine clearance in frail patients. Cockcroft-Gault may overestimate GFR when muscle mass is reduced. Cystatin C-based eGFR is preferred in those populations where available.
- Pediatric use. Adult normal ranges and thresholds are used throughout. Pediatric acid-base interpretation is outside the current scope of this tool.
- No prospective clinical validation. The calculator has been verified through internal unit testing but has not yet been evaluated against a prospective patient-level dataset.
- Mixed-disorder confidence. Detection relies on compensation thresholds that carry inherent variance. Post-bicarbonate administration, chronic compensated states, or simultaneously evolving disorders may affect accuracy.
- One-compartment assumption. Standard acid-base formulas assume equilibrated distribution. They are less reliable during rapid flux states or immediately following bicarbonate administration.
- Fluid and lactate context. Acid-base values do not establish volume status or fluid responsiveness, and lactate has multiple causes. The calculator cannot replace bedside hemodynamic assessment, disease-specific resuscitation guidance, or serial clinical reassessment.
- Teaching-preset scope. Presets are preloaded laboratory scenarios, not complete disease protocols. Their labels provide educational context, but the calculator's generic output should not be read as a comprehensive diagnosis-specific treatment plan.
14 — References
- Winters RW. Posterior and anterior anion gap acidosis. JAMA. 1967;199(11):80-82.
- Winters RW. Terminology of acid-base disorders. Ann Intern Med. 1965;63(5):873-884.
- Martini WZ, et al. Metabolic acidosis and compensation. Arch Surg. 2007.
- Albert MS, et al. Quantitative displacement of acid-base equilibrium. Ann Intern Med. 1967.
- Emmett M, Narins RG. Clinical use of the anion gap. Medicine (Baltimore). 1977;56(1):38-54.
- Oh MS, Carroll HJ. The anion gap. N Engl J Med. 1977;297(15):814-817.
- Figge J, et al. Serum proteins and acid-base equilibria. J Lab Clin Med. 1991;117(6):453-467.
- Figge J, Jabor A, Kazda A, Fencl V. Anion gap and hypoalbuminemia. Crit Care Med. 1998;26(11):1807-1810.
- Feldman M, et al. Effect of hypoalbuminemia on the serum anion gap. J Lab Clin Med. 2000.
- Batlle DC, et al. The use of the urinary anion gap in the diagnosis of hyperchloremic metabolic acidosis. N Engl J Med. 1988;318(10):594-599.
- Narins RG, Emmett M. Simple and mixed acid-base disorders: a practical approach. Medicine (Baltimore). 1980;59(3):161-187.
- Kraut JA, Madias NE. Approach to patients with acid-base disorders. Respir Care. 2001;46(4):392-403.
- Fencl V, et al. Diagnosis of metabolic acid-base disturbances in critically ill patients. Am J Respir Crit Care Med. 2000;162(6):2246-2251.
- Adrogué HJ, Madias NE. Management of life-threatening acid-base disorders. N Engl J Med. 1998;338(1):26-34.
- Kraut JA, Madias NE. Metabolic acidosis: pathophysiology, diagnosis and management. Nat Rev Nephrol. 2010;6(5):274-285.
- Khanna A, Kurtzman NA. Metabolic alkalosis. J Nephrol. 2006;19 Suppl 9:S86-96.
- Cockcroft DW, Gault MH. Prediction of creatinine clearance from serum creatinine. Nephron. 1976;16(1):31-41.
- US Food and Drug Administration. Guidance for Industry: Pharmacokinetics in Patients with Impaired Renal Function. 2024.
- Society of Critical Care Medicine. Surviving Sepsis Campaign: International Guidelines for Management of Sepsis and Septic Shock. 2026.
- Jones AE, et al. Lactate clearance vs central venous oxygen saturation as goals of early sepsis therapy: a randomized clinical trial. JAMA. 2010;303(8):739-746.
- Jansen TC, et al. Early lactate-guided therapy in intensive care unit patients: a multicenter, open-label, randomized controlled trial. Am J Respir Crit Care Med. 2010;182(6):752-761.
- Levraut J, et al. Reliability of anion gap as an indicator of blood lactate in critically ill patients. Intensive Care Med. 1997;23(4):417-422.
- Rehman MZ, et al. Urinary ammonium in clinical medicine: direct measurement and the urine anion gap as a surrogate marker during metabolic acidosis. Adv Kidney Dis Health. 2023;30(2):197-206.
Reporting Discrepancies & Contact
- If you identify a calculation discrepancy, logic inconsistency, or scenario the calculator does not handle well, please report it using the feedback button on the calculator. Clinical input from practicing pharmacists is the most valuable driver of improvement.
- Include: the specific section and inputs used; exact values entered; what you expected vs what the calculator returned; and a reference or comparator where applicable. No PHI is required.
- Contact: [email protected] — all reports reviewed by the clinical pharmacist developer.