The Henderson-Hasselbach equation is a simple rearrangement of the equation for the equilibrium constant. Suppose that a Bronsted-Lowry acid HA dissociates in solution as follows:
HA(aq)⇋H+(aq)+A−(aq)
The acid dissociation constant Ka can be written as follows:
Ka=[HA][H+][A−]
Now, we rearrange:
[H+]=Ka[A−][HA]
We then take the negative base-10 logarithm of both sides. Note that pKa=−log10Ka and that pH=−log10[H+]:
pH=pKa+log10[HA][A−].
This is the Henderson-Hasselbach Equation. This rearrangement is very useful because it allows us to compute pH or pKa from the other easily and see the relationship between pH and pKa very intuitively. We see immediately that, pH=pKa if exactly half of the HA has dissociated. If less than half has dissociated, then pH<pKa, and if more than half has dissociated, then pH>pKa.
The above equation for acids also has an analogous equation for bases which is identical in form and is derived in exactly the same way. For a Bronsted-Lowry base B with base dissociation constant Kb:
pOH=pKb+log10[B][BH+].