Buffer calculator (Henderson-Hasselbalch)
This buffer calculator uses the Henderson-Hasselbalch equation to find the pH of a buffer from its acid and conjugate base, the ratio you need for a target pH, a complete recipe (grams of each component, or acid plus NaOH or HCl stock), and the new pH after you add a strong acid or base.
Henderson-Hasselbalch calculator: buffer pH
Buffer recipe calculator
Buffer pH after adding a strong acid or base
How to use the buffer calculator
The buffer calculator has three panels. Buffer pH applies the Henderson-Hasselbalch equation to the concentrations or moles of the weak acid and its conjugate base, and also solves the exact charge balance so you can see when the shortcut breaks down. Buffer recipe works backwards from a target pH, a total concentration and a final volume to the moles and grams to weigh, or to the volume of NaOH or HCl stock to add to a weak acid or weak base. Type formulas such as CH3COONa·3H2O and the molar mass is calculated for you. pH after adding acid or base does the stoichiometry of the neutralization first and then reapplies Henderson-Hasselbalch, warning you when the buffer is exhausted.
The Henderson-Hasselbalch equation
A buffer contains comparable amounts of a weak acid HA and its conjugate base A⁻. Taking the logarithm of the Ka expression and rearranging gives the equation every buffer calculator is built on:
When [A⁻] = [HA] the log term is zero and pH = pKa. Each tenfold change in the ratio moves the pH by one unit, which is why the useful range of a buffer is about pKa ± 1 (ratios from 0.1 to 10). Because acid and base share the same volume, you can use moles instead of concentrations. For a weak base buffer such as NH₃/NH₄⁺ or Tris/Tris-HCl, use the pKa of the protonated form (BH⁺) and put the base in the numerator. OpenStax Chemistry 2e, section 14.6 Buffers derives the equation and shows why it is an approximation: it assumes the mixed concentrations are not changed by ionization, which fails for very dilute buffers or acids with pKa below about 3.
Buffer calculator worked example: pH of an acetate buffer
The first panel of the buffer calculator opens with 0.15 M sodium acetate and 0.10 M acetic acid, pKa 4.76. The ratio is 0.15/0.10 = 1.5, log 1.5 = 0.176, so pH = 4.76 + 0.18 = 4.94. The exact charge balance gives the same 4.94, confirming that Henderson-Hasselbalch is fine at these concentrations. The moles mode gives the same result for 0.015 mol acetate and 0.010 mol acetic acid in any volume. As a check against a physiological example, the carbonic acid/bicarbonate system in blood has [HCO₃⁻] = 0.024 M and [H₂CO₃] (dissolved CO₂) = 0.0012 M, a ratio of 20. With the apparent pKa′ of 6.1 that applies in plasma at 37 °C, pH = 6.1 + log 20 = 6.1 + 1.30 = 7.40, right in the normal range of 7.35–7.45. OpenStax uses pKa 6.4 in this example, which gives 7.7 and overestimates real blood pH; the 6.35 in the table below is the value for dilute solution at 25 °C.
Buffer recipe calculator: how much acid and base to weigh
To make 1.00 L of 0.100 M acetate buffer at pH 5.00 (the default of the recipe panel): the ratio is 10^(5.00 − 4.76) = 1.738. Total moles 0.100 mol split as n(A⁻) = 0.100 × 1.738/2.738 = 0.0635 mol and n(HA) = 0.0365 mol. With acetic acid (60.05 g/mol) and sodium acetate trihydrate (136.08 g/mol) that is 2.19 g of acetic acid (2.09 mL of glacial acetic acid at 1.049 g/mL) and 8.64 g of CH₃COONa·3H₂O. Using anhydrous sodium acetate (82.03 g/mol) instead needs 5.21 g. The buffer calculator does this whenever you type the formula of what is on your shelf, so the hydrate is never forgotten.
Partial neutralization. Many labs make a buffer by weighing only the weak acid and adding strong base until the pH is right. Each mole of NaOH turns one mole of HA into A⁻, so you need n(NaOH) = n(A⁻) = 0.0635 mol, or 63.5 mL of 1.0 M NaOH, plus 0.100 mol (6.01 g) of acetic acid. For Tris (C₄H₁₁NO₃, 121.14 g/mol, pKa 8.07) at pH 7.5, weigh all the Tris and add HCl: the ratio is 10^(7.5 − 8.07) = 0.269, so 79 % of the Tris must be protonated.
Adding a strong acid or base to a buffer
Do the reaction first, then the equilibrium; the third panel of the buffer calculator follows exactly this order. Strong base reacts completely with HA (OH⁻ + HA → A⁻ + H₂O) and strong acid with A⁻ (H⁺ + A⁻ → HA). Update the moles, then use Henderson-Hasselbalch with the new ratio. Example from the default values: a 1.0 L buffer with 0.100 mol acetic acid and 0.100 mol acetate (pKa 4.74, Ka = 1.8 × 10⁻⁵) receives 0.010 mol NaOH. Then n(HA) = 0.090 mol, n(A⁻) = 0.110 mol and pH = 4.74 + log(0.110/0.090) = 4.83, a rise of only 0.09. The same 0.010 mol of NaOH in 1.0 L of pure water gives pH 12.00. OpenStax Example 14.20 adds 1.0 mL of 0.10 M NaOH to 100 mL of the same buffer and gets pH 4.75; enter 0.010, 0.010 and 0.0001 mol and a volume of 0.101 L in the buffer calculator to reproduce it.
Choosing a buffer system: pKa values for the buffer calculator
Choose a buffer whose pKa is within about 0.5 of your target pH. Values below are from the Wikipedia article on buffer solutions and LibreTexts Table E1; biological buffers such as Tris and HEPES (a Good’s buffer) shift by about −0.028 and −0.014 pH units per °C.
| Buffer pair | pKa (25 °C) | Useful pH range | Typical use |
|---|---|---|---|
| Citric acid / citrate | 3.13, 4.76, 6.40 | 2.1 – 7.4 | Food, wide-range buffers |
| Formic acid / formate | 3.75 | 2.8 – 4.8 | HPLC mobile phases |
| Acetic acid / acetate | 4.76 | 3.8 – 5.8 | General lab, protein work |
| MES | 6.15 | 5.2 – 7.2 | Cell culture, biochemistry |
| Carbonic acid / bicarbonate | 6.35 (6.1 in plasma at 37 °C) | 5.4 – 7.4 | Blood, natural waters |
| H₂PO₄⁻ / HPO₄²⁻ (phosphate) | 7.20 | 6.2 – 8.2 | PBS, biology, analytical |
| HEPES | 7.48 | 6.5 – 8.5 | Cell culture |
| Tris / Tris-HCl | 8.07 | 7.1 – 9.1 | Molecular biology, electrophoresis |
| Boric acid / borate | 9.24 | 8.2 – 10.2 | Electrophoresis, cleaning |
| NH₄⁺ / NH₃ | 9.25 | 8.3 – 10.3 | EDTA titrations |
| HCO₃⁻ / CO₃²⁻ | 10.33 | 9.3 – 11.3 | High-pH work |
Limits of the Henderson-Hasselbalch equation in any buffer calculator
Dilute buffers. Below about 0.001 M, or when the acid has pKa under 3, the H⁺ released by the acid itself changes the ratio; the buffer calculator shows the exact charge-balance pH alongside. Ionic strength. Real pH meters respond to activity, not concentration; a 0.1 M phosphate buffer reads about 0.1 to 0.2 units below the Henderson-Hasselbalch value. Temperature. pKa changes with temperature, strongly for Tris. Polyprotic acids. Use the pKa of the pair you are working with, for example pKa₂ = 7.20 for phosphate near pH 7. To know how much acid or base a buffer can take before its pH moves, pair this buffer calculator with the Buffer Capacity Calculator.
Related calculators
The buffer calculator assumes both members of the pair are present. For a weak acid alone (no conjugate base) use the Weak Acid Calculator; for the whole neutralization curve, including the buffer region of a weak acid titration, use the Titration Calculator. The Molarity Calculator converts grams to molarity for each component.
- Buffer Capacity Calculator
- Weak Acid Calculator
- Weak Base Calculator
- Titration Calculator
- pH Calculator
- Molarity Calculator
- All chemistry calculators
Frequently asked questions
How do I calculate the pH of a buffer?
Use pH = pKa + log([A⁻]/[HA]) with the concentrations (or moles) of conjugate base and weak acid. For 0.15 M acetate and 0.10 M acetic acid, pH = 4.76 + log 1.5 = 4.94. The buffer calculator does this and checks it against the exact solution.
What ratio of base to acid do I need for a given pH?
The ratio [A⁻]/[HA] = 10^(pH − pKa). For pH 5.00 with acetate (pKa 4.76) it is 1.74, so about 64 % of the buffer should be acetate and 36 % acetic acid.
Why should a buffer be used within pKa ± 1?
Outside that range one component is less than about 10 % of the total, so a small addition of acid or base uses it up and the pH changes quickly. Buffer capacity is highest at pH = pKa.
Can I use moles instead of concentrations in the Henderson-Hasselbalch equation?
Yes. Both species are in the same solution, so the volume cancels in the ratio. That is why the pH after adding acid or base can be found from moles alone.
Is this buffer calculator free?
Yes. The buffer calculator runs in your browser, needs no account and does not store or send the values you enter.