Henderson–Hasselbalch Calculator
Calculate the pH of an acid–base buffer from the pKa and the amounts of acid and conjugate base, or find the base-to-acid ratio needed to hit a target pH. Enter pKa and concentrations to get the result instantly.
Find the pH or the Required Ratio of an Acid–Base Buffer
Henderson–Hasselbalch Formula
Where:
- \(\text{pH}\) — the hydrogen ion potential of the buffer solution
- \(\text{p}K_a\) — the negative logarithm of the acid dissociation constant, \(-\log_{10} K_a\)
- \([\text{A}^-]\) — concentration (or amount) of the conjugate base form
- \([\text{HA}]\) — concentration (or amount) of the weak acid form
The equation states that the pH of a buffer equals the pKa of the weak acid plus the logarithm of the ratio of conjugate base to acid. Rearranged, it also lets you solve for the ratio required to reach any target pH: \([\text{A}^-]/[\text{HA}] = 10^{\text{pH} - \text{p}K_a}\).
Henderson–Hasselbalch – Calculation Example
Example 1 (buffer pH): a buffer contains 0.1 mol/L acetic acid (pKa = 4.76) and 0.1 mol/L acetate.
\[ \text{pH} = 4.76 + \log_{10}\!\left( \frac{0.1}{0.1} \right) = 4.76 + \log_{10}(1) = 4.76 + 0 \]
Result: pH = 4.76. When the acid and base forms are equal, the pH always equals the pKa.
Example 2 (required ratio): using the same acid, you want the buffer at pH 5.40 with [HA] = 0.1 mol/L.
\[ \frac{[\text{A}^-]}{[\text{HA}]} = 10^{5.40 - 4.76} = 10^{0.64} \approx 4.37 \]
Result: you need about 0.437 mol/L of acetate — roughly 4.37 parts of base form for every 1 part of acid form.
How to Use the Calculator
- Open What to Calculate and choose either Buffer pH from acid and base amounts or Required base-to-acid ratio for a target pH. The input fields adapt automatically: in ratio mode, the base amount is hidden and the Target pH field appears.
- Enter the pKa of the Acid (HA). For acetic acid this is 4.76; for any other acid, look up its \(K_a\) and take \(-\log_{10} K_a\) if needed.
- Enter the Amount of Acid Form (HA) and pick the unit (mol/L, mmol/L or µmol/L) from the dropdown.
- In pH mode, also enter the Amount of Base Form (A⁻) with its unit. In ratio mode, enter the Target pH instead.
- Read the results: the buffer pH (in pH mode), the base-to-acid ratio \([\text{A}^-]/[\text{HA}]\), its inverse, and a note telling you whether the ratio lies within the effective 0.1–10 buffering range.
What the Henderson–Hasselbalch Equation Describes
The Henderson–Hasselbalch equation describes the behavior of buffer solutions — mixtures of a weak acid and its conjugate base (or a weak base and its conjugate acid) that resist changes in pH when small amounts of strong acid or base are added. It follows directly from the equilibrium expression \(K_a = [\text{H}^+][\text{A}^-]/[\text{HA}]\) by taking the negative logarithm of both sides. Because the approximation requires both acid and base forms to be present in significant amounts, the equation is a staple of general chemistry, biochemistry and pharmacy.
The most useful insight it gives is the relationship between pH and pKa. When \([\text{A}^-] = [\text{HA}]\), the ratio is 1, the logarithm is 0, and pH = pKa exactly — this is the half-equivalence point of a titration. Each tenfold change in the base-to-acid ratio shifts the pH by exactly one unit: a 10:1 ratio puts the pH one unit above the pKa, and a 1:10 ratio puts it one unit below.
Interpreting the result matters as much as computing it. A buffer is most effective when the pH is within ±1 unit of the pKa, which corresponds to a \([\text{A}^-]/[\text{HA}]\) ratio between 0.1 and 10. Outside that window, one component is nearly exhausted, and the solution loses its ability to neutralize added acid or base in one direction. If your target pH falls far from the pKa, the practical fix is to pick a different buffer system — for example, phosphate near pH 7.2 or Tris near pH 8.1.
The equation also works for the basic form: for a weak base \(\text{B}\) and its conjugate acid \(\text{BH}^+\), the same relationship holds with \(\text{p}K_a\) of the conjugate acid. In practice you can treat every buffer as an acid/base conjugate pair and use the calculator unchanged.
Assumptions, Limitations and Practical Tips
- Equilibrium concentrations vs. added amounts. The equation assumes that the added (analytical) amounts of HA and A⁻ equal their equilibrium concentrations. This is accurate when both forms are present at appreciable levels and the acid is weak, but breaks down for very dilute buffers (below about 10⁻³ mol/L) or extremely weak or strong acids.
- Activity vs. concentration. The rigorous form uses activities rather than molar concentrations. At ionic strengths above roughly 0.1 mol/L, activity coefficients deviate noticeably from 1, so the predicted pH can be off by 0.1–0.3 units. Check the ionic strength of your solution to judge whether this correction matters.
- Valid pH range. The equation is unreliable below about pH 2 and above about pH 12, where water autoionization and activity effects become large. For direct pH computations from a strong acid or base concentration, use the dedicated pH calculator.
- Units cancel in the ratio. Because only the ratio \([\text{A}^-]/[\text{HA}]\) matters, both amounts may be entered in moles, concentrations, or even millimoles as long as they use the same unit. The calculator converts units automatically.
- Temperature dependence. pKa values shift with temperature (acetic acid changes by only a small amount, but Tris shifts by about −0.03 pH units per °C). Use a pKa measured at your working temperature for precise work.
- Related tasks. To find where a buffer's pH equals the pKa during a titration, see the acid–base titration calculator; to convert a mass of a salt into the molar amount you enter here, use the molarity calculator.
Common Buffer Systems and Their pKa Values
| Buffer pair | pKa (25 °C) | Useful pH range |
|---|---|---|
| Acetic acid / acetate | 4.76 | 3.8 – 5.8 |
| Carbonic acid / bicarbonate | 6.35 | 5.4 – 7.4 |
| Dihydrogen phosphate / hydrogen phosphate | 7.21 | 6.2 – 8.2 |
| Tris·H⁺ / Tris | 8.06 | 7.1 – 9.1 |
| Ammonium / ammonia | 9.25 | 8.3 – 10.3 |
Frequently Asked Questions
How do I calculate buffer pH by hand without a calculator?
Take the pKa, then add the base-10 logarithm of the ratio \([\text{A}^-]/[\text{HA}]\). For quick mental math: ratio 1 → add 0; ratio 10 → add +1; ratio 0.1 → add −1; ratio 2 → add about 0.3; ratio 5 → about 0.7. Example: pKa 7.2 with a 4:1 ratio gives pH ≈ 7.2 + 0.6 = 7.8. Only the ratio matters, not the absolute amounts.
How do I convert Ka to pKa?
Take the negative base-10 logarithm: \(\text{p}K_a = -\log_{10} K_a\). For example, if \(K_a = 1.8 \times 10^{-5}\) (acetic acid), then \(\text{p}K_a = -(\log_{10} 1.8 - 5) \approx 4.74\). If your source lists \(K_b\) for a base instead, first get the conjugate acid's constant via \(K_a = K_w / K_b\) (with \(K_w = 10^{-14}\) at 25 °C), then take the logarithm.
Can I use moles or millimoles instead of mol/L concentrations?
Yes. Because the equation only uses the ratio \([\text{A}^-]/[\text{HA}]\), any consistent unit works: moles, millimoles, grams per liter, or molar concentrations. Just make sure both forms use the same unit — mixing 0.1 mol/L of acid with 50 mmol/L of base without converting gives a ratio that is off by a factor of 1000. The calculator converts the units you pick automatically.
Why does my calculated pH differ from the measured pH?
The equation is an approximation, so small deviations are normal. Common causes: activity effects at ionic strength above ~0.1 mol/L (up to 0.1–0.3 pH units off), a pKa value measured at a different temperature, very dilute buffers (below 10⁻³ mol/L), or CO₂ absorption from air in alkaline buffers. Calibrating your pH meter properly and using a pKa at your working temperature closes most of the gap.
How do I actually prepare a buffer with the calculated ratio?
Two standard methods: (1) weigh out the weak acid and its conjugate-base salt (e.g., acetic acid and sodium acetate) in the calculated molar ratio; (2) start from the weak acid and add strong base (NaOH) — at the half-equivalence point half the acid is converted to A⁻, and each added mole of OH⁻ shifts the ratio predictably. The second method needs no conjugate salt. Always verify the final pH with a calibrated meter.
Can I use this equation for a weak base like ammonia?
Yes, if you use the pKa of the conjugate acid, not the pKb of the base. For the ammonia/ammonium pair, use \(\text{p}K_a = 14 - \text{p}K_b\) at 25 °C, which gives 9.25 for ammonium. Then treat ammonium (NH₄⁺) as HA and ammonia (NH₃) as A⁻ and enter them into the calculator exactly as for an acid buffer. The underlying math is identical.
What are common mistakes when using the Henderson–Hasselbalch equation?
The most frequent error is inverting the ratio — it must be base over acid \([\text{A}^-]/[\text{HA}]\), which flips the sign of the logarithm term. Others: using pKb instead of pKa, applying it to strong acids or bases (where it does not apply), forgetting that dilution changes the ratio if acid and base are not diluted equally, and ignoring temperature shifts in pKa. Double-check the ratio direction before trusting the result.