This free Henderson-Hasselbalch calculator finds the pH of a buffer from its pKa or Ka and the amounts of weak acid and conjugate base, or the base-to-acid ratio you need for a target pH, for chemistry and AP® Chemistry students, with every step shown.
Loading the henderson-hasselbalch (buffer) calculator…
How to use the Henderson-Hasselbalch Calculator
- Pick the buffer type. Choose “Weak acid + conjugate base” (like acetic acid and acetate) or “Weak base + conjugate acid” (like ammonia and ammonium).
- Choose what to solve for. Solve for the pH, or for the ratio of base to acid that gives a target pH.
- Enter the acid or base strength. Type the pKa or Ka (pKb or Kb for a basic buffer). Ka can be written as 1.8e-5 or 1.8 × 10^-5.
- Enter the amounts. Give both components as concentrations (M), as moles, or as mL of a solution with its molarity. For a target pH, you can add how much acid you have to see how much base to add.
Worked example
You mix 50.0 mL of 0.100 M acetic acid (Ka = 1.8 × 10−5) with 25.0 mL of 0.100 M sodium acetate. What is the pH of the buffer?
- pKa: −log(1.8 × 10−5) = 4.745.
- Moles of each part: acetic acid (HA) = 0.0500 L × 0.100 M = 0.005000 mol, and acetate (A−) = 0.0250 L × 0.100 M = 0.002500 mol.
- Ratio: both are in the same 75.0 mL of solution, so [A−] ÷ [HA] = 0.002500 ÷ 0.005000 = 0.5000.
- pH: pH = 4.745 + log(0.5000) = 4.745 − 0.301 = 4.44.
The ratio is between 0.1 and 10, so this is an effective buffer. Use the “Mixing two solutions” example in the calculator to see the same steps.
What a buffer does
A buffer is a solution that resists changes in pH when you add a small amount of strong acid or strong base. It contains a weak acid and its conjugate base in similar amounts, such as acetic acid (CH3COOH) and acetate (CH3COO−). Each part handles one kind of threat:
- Added acid (H+) reacts with the conjugate base: A− + H+ → HA.
- Added base (OH−) reacts with the weak acid: HA + OH− → A− + H2O.
Either way, the strong acid or base is turned into something weak, and the pH moves only a little. Your blood relies on this: the carbonic acid/bicarbonate buffer keeps it close to pH 7.4.
Where the equation comes from
Start with the acid dissociation expression for HA ⇌ H+ + A−:
Ka = [H+][A−] ÷ [HA]
Take −log of both sides and rearrange, using pH = −log[H+] and pKa = −log Ka:
pH = pKa + log([A−] ÷ [HA])
That’s the Henderson-Hasselbalch equation. It says the pH of a buffer depends on two things: the strength of the acid (pKa) and the ratio of base to acid. Here’s how the ratio shifts the pH away from the pKa:
| [A−] ÷ [HA] | log(ratio) | pH |
|---|---|---|
| 0.1 | −1.00 | pKa − 1 |
| 0.5 | −0.30 | pKa − 0.30 |
| 1 | 0 | pKa |
| 2 | +0.30 | pKa + 0.30 |
| 10 | +1.00 | pKa + 1 |
When the acid and base are present in equal amounts, the ratio is 1, log(1) = 0, and pH = pKa. In a weak acid titration, that’s the half-equivalence point, which is why you can read the pKa straight off a titration curve.
Effective buffer range and choosing a buffer
A buffer works well while the base-to-acid ratio stays between 0.1 and 10. That puts the pH within 1 unit of the pKa. Past that, one component has almost run out, and the buffer can’t absorb much more acid or base. The calculator shows “Outside effective buffer range.” when the ratio falls outside 0.1–10.
So to make a buffer at a given pH, start by choosing a weak acid whose pKa is close to that pH, then use the ratio mode to fine-tune the amounts. Some common choices:
| Buffer pair | pKa | Works from about |
|---|---|---|
| Acetic acid / acetate | 4.76 | pH 3.8 to 5.8 |
| Carbonic acid / bicarbonate | 6.35 | pH 5.4 to 7.4 |
| Dihydrogen phosphate / hydrogen phosphate | 7.21 | pH 6.2 to 8.2 |
| Ammonium / ammonia | 9.25 | pH 8.3 to 10.3 |
The ratio sets the pH, but the total amount sets the buffer capacity, meaning how much acid or base the buffer can absorb before its pH changes a lot. A 1.0 M acetate buffer and a 0.010 M one at the same ratio have the same pH, but the 1.0 M buffer can handle about 100 times as much added acid.
Basic buffers
For a weak base and its conjugate acid, such as ammonia (NH3) and ammonium (NH4+), you can write the equation in terms of pOH:
pOH = pKb + log([BH+] ÷ [B]), then pH = 14.00 − pOH
For 0.20 M NH3 and 0.10 M NH4+ with Kb = 1.8 × 10−5: pKb = 4.745, pOH = 4.745 + log(0.50) = 4.44, and pH = 9.56. You get the same answer using the pKa of NH4+ (14.00 − 4.745 = 9.26) in the regular form.
Moles or concentrations?
Either works, as long as you use the same kind for both parts. The weak acid and its conjugate base sit in the same solution, so they share one volume, and the volume cancels out of the ratio. That’s why the worked example could skip finding concentrations: 0.002500 mol ÷ 0.005000 mol gives the same 0.5000 as 0.03333 M ÷ 0.06667 M. Working in moles is often quicker, especially when you mix two solutions or add a strong acid or base to a buffer and need to track what reacts.
When the equation doesn’t work well
The Henderson-Hasselbalch equation assumes the starting amounts of acid and base barely change as the buffer reaches equilibrium. That holds for most classroom buffers, but it breaks down when the solution is very dilute, when the acid isn’t weak (a large Ka), or when the ratio is far outside 0.1–10. In those cases, use an ICE table with the full Ka expression instead. For a single weak acid or base with no conjugate partner, the pH Calculator handles the math.
Buffers on the AP® Chemistry exam
Buffers are Topics 8.8 through 8.10 in Unit 8 (Acids and Bases): properties of buffers, the Henderson-Hasselbalch equation and buffer capacity. Expect questions that ask you to find a buffer’s pH, read the pKa at the half-equivalence point of a titration curve, pick the best acid for a target pH, or explain why a buffer with more total acid and base has a larger capacity. For more practice, see Henderson-Hasselbalch Equation: AP® Chemistry Review and Buffers: AP® Chemistry Review. The AP® Chemistry score calculator shows how your section scores turn into a 1 to 5.
FAQ
What is the Henderson-Hasselbalch equation?
It gives the pH of a buffer made from a weak acid and its conjugate base: pH = pKa + log([A⁻] ÷ [HA]). With pKa 4.76 and ten times as much base as acid, pH = 4.76 + log(10) = 5.76.
When does pH equal pKa?
When the weak acid and its conjugate base are present in equal amounts, the ratio is 1 and log(1) = 0, so pH = pKa. In a titration of a weak acid, this happens at the half-equivalence point.
What is the effective range of a buffer?
A buffer works well while the base-to-acid ratio stays between 0.1 and 10, which puts the pH within 1 unit of the pKa. Outside that range, there’s too little of one component to absorb added acid or base.
How do you use the Henderson-Hasselbalch equation for a basic buffer?
For a weak base B and its conjugate acid BH⁺, use pOH = pKb + log([BH⁺] ÷ [B]), then pH = 14.00 − pOH. For 0.20 M NH3 and 0.10 M NH4⁺ with Kb = 1.8 × 10⁻⁵, pOH = 4.44 and pH = 9.56.
Can I use moles instead of concentrations?
Yes. The acid and base are in the same solution, so they share one volume, and the mole ratio equals the concentration ratio. 0.050 mol A⁻ with 0.100 mol HA gives the same pH as 0.50 M with 1.00 M.