How pH Is Calculated
pH is a logarithmic measure of the hydrogen-ion concentration in a solution, defined as pH = -log10[H+]. Because the scale is logarithmic, each whole-number change in pH represents a tenfold change in acidity. A solution with [H+] = 0.01 mol/L has a pH of 2, while one with [H+] = 1 × 10⁻⁷ mol/L (pure water at 25°C) has a pH of 7 — neutral. Values below 7 are acidic; values above 7 are basic or alkaline.
For a strong acid, which dissociates completely, the hydrogen-ion concentration equals the acid concentration, so pH is simply -log10[acid]. For a strong base, you first compute pOH = -log10[OH-] and then use the relationship pH + pOH = 14 to find pH.
Buffer Solutions and the Henderson-Hasselbalch Equation
A buffer resists changes in pH when small amounts of acid or base are added. Its pH is given by the Henderson-Hasselbalch equation: pH = pKa + log([A-]/[HA]), where pKa is the negative log of the acid dissociation constant and [A-]/[HA] is the ratio of conjugate base to weak acid. This equation is widely used in biochemistry — for example, blood plasma pH of 7.4 is maintained by the bicarbonate buffering system. Because pKa is a property of the specific acid, this calculator takes it as an input rather than assuming a particular compound.