What a buffer does and what the equation predicts
A buffer resists changes in pH when small amounts of acid or base are added. It contains a weak acid and its conjugate base in comparable amounts, such as acetic acid and acetate. The Henderson-Hasselbalch equation predicts the pH of such a mixture from two things: the pKa of the acid, which is a property of the acid at a given temperature, and the ratio of base to acid. This page evaluates the equation. Enter the pKa and the two concentrations, and it returns the estimated pH. It is used to design buffers for experiments, check a recipe and understand how the ratio sets the pH.
The equation
The calculation is pH = pKa + log10(base / acid). It follows from the acid dissociation equilibrium. Taking the negative logarithm of Ka = [H+][A-]/[HA] and rearranging gives pH = pKa + log([A-]/[HA]). Here base is the conjugate base concentration and acid is the weak acid concentration, both positive and in the same unit, so only their ratio matters. Moles, millimoles or mol/L all give the same answer, provided both use the same one. When the two are equal, the logarithm of 1 is zero and the pH equals the pKa, which is why a buffer works best near its pKa.
An acetic acid and acetate buffer at pKa 4.76
The page opens with pKa = 4.76, a conjugate base concentration of 0.2 mol/L and a weak acid concentration of 0.1 mol/L. These resemble an acetic acid and acetate buffer, with acetic acid pKa about 4.76 at 25 °C. The ratio is 2, the logarithm of 2 is 0.30103, and the pH is 4.76 + 0.30103 = 5.06103. The base is twice as plentiful as the acid, so the pH sits about 0.3 units above the pKa. With equal concentrations of 0.1 and 0.1, the pH would equal 4.76. A tenfold excess of base would add one full unit to give 5.76, and a tenfold excess of acid would give 3.76.
Other buffer systems
The phosphate buffer used in many laboratories relies on the second dissociation of phosphoric acid, with a pKa of about 7.21 at 25 °C. A mixture with 0.15 mol/L hydrogen phosphate and 0.05 mol/L dihydrogen phosphate has a ratio of 3, and a pH of 7.21 + 0.4771 = 7.6871. An ammonia buffer uses ammonium as the acid, with a pKa near 9.25. With 0.1 mol/L ammonia and 0.2 mol/L ammonium, the ratio is 0.5, the logarithm is -0.30103, and the pH is 8.94897. Pick a buffer whose pKa lies within about one unit of your target pH, because the buffering is strongest there.
Choosing the ratio for a target pH
The equation can be solved for the ratio: base / acid = 10^(pH - pKa). For a target pH of 5.46 with acetate at pKa 4.76, the exponent is 0.70 and the ratio is about 5.01. Mix five parts of base to one part of acid. Within a pH window of one unit either side of the pKa, the ratio runs from 1:10 to 10:1, and this is the useful buffer range. Outside it, one component is too scarce to neutralize added acid or base. You can then scale both concentrations up or down to set the capacity without changing the pH, since only the ratio enters the formula.
Concentration and buffer capacity
The pH depends on the ratio, but the capacity depends on the total amount. A 0.2 mol/L base with 0.1 mol/L acid and a 0.002 mol/L base with 0.001 mol/L acid both have a calculated pH of 5.06, yet the first absorbs far more added acid or base before the pH shifts. The equation does not capture that, and the page does not assess buffer capacity. If you expect to add significant acid or base, work out how many moles it would shift in the ratio and make sure the buffer components can supply them. A common practical choice is a buffer concentration between 10 and 100 mmol/L for biochemical work.
Temperature, ionic strength and the pKa
The pKa is not a universal constant. It depends on temperature and on the ionic strength of the solution. Tabulated values are usually for 25 °C and low ionic strength, so a pKa from a table may not apply to a buffer at 37 °C or in a concentrated salt solution. Some buffers, such as Tris, change pH noticeably with temperature. Use a pKa value that matches your conditions, and when accuracy matters, measure the pH with a calibrated meter and adjust. The calculated pH is a design estimate, and the pH meter reading is the real result for the solution you made.
When the approximation breaks down
The equation assumes that the amount of acid that dissociates is small compared with the buffer concentrations, so that the equilibrium amounts equal the amounts you mixed. That fails at very low concentrations, close to 1e-3 mol/L or below for typical acids, or when the ratio is extreme, such as 100:1. It also fails when a strong acid or base is in excess, and at high concentrations where activities differ from concentrations. In those cases a full equilibrium calculation is needed. The page flags these as outside its assumptions and does not assess them. It requires positive concentrations, since the logarithm of zero or a negative number is undefined.
Mixing a buffer from stock solutions
In practice you rarely weigh a conjugate pair directly. A common route starts with the acid and adds strong base to convert part of it into the conjugate base. Starting with 0.100 mol of acetic acid and adding 0.040 mol of sodium hydroxide leaves 0.060 mol of acid and creates 0.040 mol of acetate. The ratio is 0.040 / 0.060 = 0.667, the logarithm is -0.176, and the pH is 4.76 - 0.176 = 4.58. Enter the moles of each component, since the volume cancels in the ratio. This approach also explains why the pH can be tuned continuously by adding base, and why a final check with a meter is still worthwhile.
Limits and interpretation
The result is an estimate for a simple weak acid and conjugate base system. It does not assess buffer capacity, strong acid or base excess, concentrated solution activity effects or biological and clinical samples. Do not use it to prepare solutions for patient care or to interpret blood gas results. The pH is shown to six significant digits, which is much finer than the accuracy of the pKa and concentrations. In the laboratory, verify with a calibrated pH meter and adjust with small additions of acid or base. OpenStax Chemistry 2e covers buffers and this equation in its acid-base chapter.