Acid-Base Calculator
Two calculators in one: choose Buffer Chemistry to solve the Henderson-Hasselbalch equation for pH, pKa, acid concentration, or conjugate base concentration, or choose Blood Gas (ABG) to interpret arterial blood gas values and identify respiratory acidosis, metabolic alkalosis, and every other acid-base disorder with its compensation status. Results update as you type.
What is the Henderson-Hasselbalch equation?
The Henderson-Hasselbalch equation is the central formula in acid-base chemistry: pH = pKa + log10([A-]/[HA]). It relates the pH of a solution to the pKa of the weak acid and the ratio of conjugate base concentration [A-] to weak acid concentration [HA]. When the ratio equals 1, pH equals pKa exactly, and the buffer is at its optimal point. A buffer is most effective within one pH unit of its pKa, meaning the [A-]/[HA] ratio stays between 0.1 and 10. Outside that window, one form dominates and the buffer loses its resistance to pH change. This calculator lets you solve for any one of the four variables pH, pKa, [A-], or [HA] when the other three are known.
Common buffer systems and their pKa values
Choosing the right buffer starts with matching the pKa to the target pH. Acetic acid (pKa 4.76) is the workhorse for pH 3.8-5.8 buffers in food science and biochemistry. Phosphoric acid (pKa 2.15 for the first ionization, 7.20 for the second) underpins the physiological phosphate buffer system. Carbonic acid (pKa 6.35) is the anchor of the bicarbonate buffer in blood, the most important extracellular buffer in mammals. Ammonia and ammonium (pKa 9.25) cover the basic range. Lactic acid (pKa 3.86) appears in muscle chemistry and fermentation. Citric acid (pKa 3.13 for the first proton) is used in food preservation and pharmaceutical formulation. The preset list in this calculator covers the most common choices; enter a custom pKa for any acid not listed.
Interpreting arterial blood gas values step by step
Arterial blood gas (ABG) analysis is the clinical equivalent of the Henderson-Hasselbalch equation applied to blood. The five-step method starts with pH: below 7.35 is acidemia, above 7.45 is alkalemia. Step 2 checks PaCO2 to identify the respiratory contribution: above 45 mmHg drives acidosis, below 35 mmHg drives alkalosis. Step 3 checks HCO3- for the metabolic contribution: below 22 mEq/L indicates metabolic acidosis, above 26 mEq/L indicates metabolic alkalosis. The primary disorder is whichever component matches the pH direction. Step 4 applies the compensation formula for that disorder to judge whether the opposite system has responded appropriately. Fully compensated disorders have a normal pH but both PaCO2 and HCO3- are still abnormal. Step 5 assesses oxygenation from PaO2 independently; hypoxemia can coexist with any acid-base pattern. The Winters formula (expected PaCO2 = 1.5 x HCO3 + 8, plus or minus 2) is the standard check for respiratory compensation in metabolic acidosis.
Clinical causes and context
Respiratory acidosis arises whenever the lungs cannot excrete CO2 fast enough: COPD, sleep apnea, neuromuscular weakness, opioid or sedative overdose, and severe pneumonia are the leading causes. Respiratory alkalosis is caused by hyperventilation from anxiety, fever, pain, hypoxia, or inappropriate mechanical ventilator settings. Metabolic acidosis covers diabetic ketoacidosis, lactic acidosis from sepsis or ischemia, renal failure (inability to regenerate HCO3-), severe diarrhea, and toxic ingestions. Metabolic alkalosis most often follows vomiting, nasogastric suction, or diuretic use, all of which remove hydrogen ions or chloride and leave bicarbonate behind. Mixed disorders occur when two primary disturbances are present simultaneously, such as the combined metabolic acidosis and respiratory alkalosis seen in salicylate toxicity.
Acid-base disorder reference
| Disorder | pH | PaCO2 | HCO3- | Compensation formula |
|---|---|---|---|---|
| Respiratory Acidosis (acute) | < 7.35 | > 45 | Normal or high | HCO3 rises 1 mEq/L per 10 mmHg CO2 increase |
| Respiratory Acidosis (chronic) | < 7.35 or normal | > 45 | High | HCO3 rises 3-4 mEq/L per 10 mmHg CO2 increase |
| Respiratory Alkalosis (acute) | > 7.45 | < 35 | Normal or low | HCO3 falls 2 mEq/L per 10 mmHg CO2 decrease |
| Respiratory Alkalosis (chronic) | > 7.45 or normal | < 35 | Low | HCO3 falls 5 mEq/L per 10 mmHg CO2 decrease |
| Metabolic Acidosis | < 7.35 | Normal or low | < 22 | Winters formula: expected PaCO2 = 1.5 x HCO3 + 8 (+-2) |
| Metabolic Alkalosis | > 7.45 | Normal or high | > 26 | PaCO2 rises ~0.7 mmHg per 1 mEq/L HCO3 increase |
Primary disturbances and expected compensatory responses. Normal: pH 7.35-7.45, PaCO2 35-45 mmHg, HCO3- 22-26 mEq/L.
Frequently asked questions
What is the Henderson-Hasselbalch equation used for?
It calculates the pH of a buffer solution from the pKa of the weak acid and the ratio of conjugate base to acid concentrations. It is also used in reverse to find pKa from a known pH and concentration ratio, to determine what concentration of base or acid is needed to reach a target pH, and in clinical medicine to model the bicarbonate buffer system in blood.
What is pKa and how do I find it?
pKa is the negative base-10 logarithm of the acid dissociation constant Ka. It represents the pH at which exactly half of the acid is ionized. A strong acid like HCl has a very negative pKa (around -7); a weak acid like acetic acid has pKa 4.76. You can look pKa up in reference tables (this calculator includes presets for common acids) or measure it experimentally by finding the pH at the half-equivalence point of a titration curve.
What is the best buffer range for a given acid?
A buffer is most effective when the target pH is within one unit of the pKa. This corresponds to a [A-]/[HA] ratio between 0.1 and 10. The Henderson-Hasselbalch calculator displays this ratio automatically. If your ratio is outside 0.1-10, consider switching to an acid with a pKa closer to your target pH.
What do the normal blood gas values mean?
Normal arterial pH is 7.35-7.45, reflecting a tightly controlled hydrogen ion concentration in the blood. PaCO2 (35-45 mmHg) measures how much carbon dioxide the lungs are eliminating; it is the respiratory axis. HCO3- (22-26 mEq/L) measures bicarbonate, the main metabolic buffer; kidneys regulate it over hours to days. PaO2 (80-100 mmHg on room air) measures oxygen in the blood, which is assessed independently of acid-base status.
What is Winters formula?
Winters formula estimates the PaCO2 that should be seen if the lungs are compensating appropriately for a metabolic acidosis: expected PaCO2 = 1.5 x HCO3 + 8, with a tolerance of plus or minus 2 mmHg. If the measured PaCO2 falls within that range, the respiratory system is compensating fully. If PaCO2 is higher than predicted, there is also a respiratory acidosis on top of the metabolic one; if lower, there is a superimposed respiratory alkalosis.
Can a patient have more than one acid-base disorder at once?
Yes. Mixed disorders are common in critically ill patients. For example, someone with both metabolic acidosis (from lactic acidosis) and respiratory alkalosis (from fever and pain) may have a near-normal pH with dramatically abnormal PaCO2 and HCO3-. Applying the compensation formulas helps reveal whether the changes are explainable by a single disorder or whether a second primary disturbance is present.
How accurate is the calculated blood pH?
The blood pH calculated from HCO3 and PaCO2 using the Henderson-Hasselbalch equation (pH = 6.1 + log10[HCO3 / (0.0308 x PaCO2)]) closely matches direct measurement in most patients. Discrepancies can arise at extremes of temperature, with unusual plasma proteins, or in patients on extracorporeal circuits. Always use the directly measured pH from the blood gas report as the primary value; the calculated pH is useful for cross-checking and understanding the relationship between the variables.