A narrow window
Your blood is kept between pH 7.35 and 7.45. Below about 7.0 or above about 7.8, enzymes misfold, nerves misfire and life is in danger. Yet your metabolism releases acid all day long: every breath you exhale carries away carbon dioxide that, dissolved in blood, is an acid. Something holds the pH steady against that constant stream. It is a buffer, and by the end of this lesson you will be able to compute how it works.
Acids and bases run through all of chemistry. Ocean water is slightly basic, and the CO₂ it absorbs is making it measurably less so. Soil pH decides which crops grow and which metal ions plants can take up. A medicine's charge, and so whether it crosses a cell membrane, depends on the pH around it. Industrial chemistry consumes acids and bases by the hundred million tonnes. You met acids and bases in everyday life in an earlier lesson; this lesson makes those ideas quantitative with the equilibrium tools of Chemical equilibrium.
Passing protons, sharing pairs
A hydrogen atom that has lost its electron is just a proton, H⁺, and in water a bare proton never exists for long: it attaches to a water molecule and hops rapidly from one to the next. An acid is a substance that gives a proton away, and a base is one that takes it. When ethanoic (acetic) acid, the acid of vinegar, meets water, a small fraction of its molecules hand a proton to water:
CH₃COOH + H₂O ⇌ CH₃COO⁻ + H₃O⁺
Read backwards, the ethanoate ion takes a proton from H₃O⁺, so it is a base too: the conjugate base of ethanoic acid. Every acid–base reaction is a contest between two bases for one proton, and the equilibrium lies on the side of the weaker acid and weaker base.
Analogy, not a formal construction
Think of a proton as a ball passed between players. A strong acid is a player who throws the ball away at the first chance; a weak acid holds on and passes it only now and then. A strong base grabs any ball within reach. Who ends up holding the ball most of the time depends on how tightly each player grips, and that grip is what measures.
Gilbert Lewis saw in 1923 that what really happens is a change in electron pairs: the base uses a lone pair of electrons to form a new bond. That view includes reactions with no proton at all. Boron trifluoride, whose boron atom has an empty orbital, accepts the lone pair of ammonia's nitrogen to form a single adduct.
Every Brønsted–Lowry base is a Lewis base (it must have a lone pair to bind the proton), and the proton itself is a Lewis acid. The Lewis view adds metal ions such as Fe³⁺ and Al³⁺, which bind water's lone pairs strongly enough to make their solutions acidic, and it is the language of catalysis and coordination chemistry later in the course (Coordination chemistry).
Constants and scales
Definition— Brønsted–Lowry acid and base
An acid is a proton donor and a base is a proton acceptor (Johannes Brønsted and Thomas Lowry, independently, 1923). An acid and the base formed when it loses a proton are a conjugate pair, such as CH₃COOH/CH₃COO⁻ or NH₄⁺/NH₃.
Definition— Lewis acid and base
A Lewis base donates an electron pair to form a bond; a Lewis acid accepts one.
Definition— ion product of water
Water transfers protons to itself: 2 H₂O ⇌ H₃O⁺ + OH⁻, with at 25 °C. rises with temperature (about at 37 °C).
Definition— pH
, where is the activity of hydrogen ions (written H⁺ or H₃O⁺); in dilute solutions, with mol/L. A solution is neutral when , which is pH 7.00 at 25 °C.
Definition— acid dissociation constant
For HA + H₂O ⇌ A⁻ + H₃O⁺, (concentrations over ; water, the solvent, has activity 1), and . For the conjugate base, , so at 25 °C.
A strong acid such as hydrochloric acid has a so large that it is essentially completely ionised in water; a weak acid such as ethanoic acid () is mostly not. The smaller the , the stronger the acid, and the weaker its conjugate base. Because the scales are logarithmic, each pH unit is a factor of ten in hydrogen-ion concentration (logarithms).
Note
Strong acids and bases, and concentrated weak ones, are corrosive: they destroy skin and eyes on contact. Their containers carry the GHS corrosion pictogram (a liquid eating into a hand and a surface), and their safety data sheets list the gloves, goggles and handling they require. In a school or university laboratory they are handled only under supervision. Never taste a laboratory chemical, never put your nose near one, and never mix household cleaners with each other.
The pH of a weak acid, exactly and approximately
Take ethanoic acid at concentration . The textbook shortcut says: let be the amount ionised, assume , and ignore the H⁺ from water. Then , so . How good is that?
To find out, solve the problem exactly. Three facts fix the four unknowns [HA], [A⁻], [H⁺] and [OH⁻]: the two equilibria ( and ), conservation of the acid (), and electrical neutrality, the charge balance: positive charge equals negative charge, . Eliminating everything except gives
a cubic in . Rather than use the cubic formula, find the root numerically. The left side minus the right side increases with , so bisection on the pH between 0 and 14 always works.
from math import log10, sqrt
Kw = 1.0e-14 # water's ion product at 25 °C
def solve_pH(balance):
"""Find pH in [0, 14] where balance(h) changes sign (bisection on log10 h)."""
lo, hi = 0.0, 14.0 # pH bounds; balance(10**-pH) > 0 at pH 0
for _ in range(60):
mid = 0.5 * (lo + hi)
if balance(10 ** -mid) > 0: # too much H+: the true pH is higher
lo = mid
else:
hi = mid
return 0.5 * (lo + hi)
def pH_weak_acid(C, Ka):
# charge balance [H+] = [A-] + [OH-], with [A-] = C Ka / (Ka + [H+])
return solve_pH(lambda h: h - C * Ka / (Ka + h) - Kw / h)
Ka = 1.75e-5 # ethanoic (acetic) acid, pKa 4.76
print(f"{'C / (mol/L)':>12} {'exact pH':>9} {'≈ sqrt(Ka C)':>13} {'error':>7} {'% ionised':>10}")
for C in (1.0, 0.1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6, 1e-7):
exact = pH_weak_acid(C, Ka)
approx = -log10(sqrt(Ka * C))
h = 10 ** -exact
ionised = 100 * Ka / (Ka + h)
print(f"{C:12.0e} {exact:9.3f} {approx:13.3f} {approx - exact:+7.3f} {ionised:10.1f}")For vinegar-strength solutions (about 1 mol/L) and for 0.1 mol/L, the approximation is excellent: errors of 0.001 and 0.003 pH units. By mol/L it is off by 0.03, and at mol/L by 0.27, because the acid is now 71 % ionised, so "" is false. At mol/L the shortcut predicts pH 5.88, while the true value is 6.79: an acid this dilute barely changes the pH of water, and almost every molecule of it is ionised. Weak acids become more completely ionised as they are diluted, which is Le Chatelier's principle again.
Buffers and the Henderson–Hasselbalch equation
A buffer is a solution of a weak acid together with its conjugate base, in comparable amounts. Add a strong acid and the base mops up the protons (CH₃COO⁻ + H₃O⁺ → CH₃COOH + H₂O); add a strong base and the acid neutralises it. In both cases a strong acid or base is replaced by a weak one, and the pH barely moves.
Take logarithms of the expression and rearrange:
This is the Henderson–Hasselbalch equation (Lawrence Henderson worked out the relationship for blood in 1908; Karl Hasselbalch put it in logarithmic form in 1916). It is exact if the concentrations are the true equilibrium ones; the approximation is to use the amounts weighed in, which is fine when both are much larger than and . A buffer works best at , where the ratio is 1, and is useful within about one unit either side.
Example— Designing a buffer
To hold pH 5.00 with ethanoic acid (): , so the ratio of sodium ethanoate to ethanoic acid must be . For pH 7.4, a biochemist would choose an acid with near 7.4 instead, such as dihydrogen phosphate ( 7.20) or HEPES (about 7.5).
The block below adds 1.00 mol/L hydrochloric acid, 10 mL at a time, to one litre of buffer containing 0.100 mol of ethanoic acid and 0.100 mol of sodium ethanoate, and solves the full charge balance at each step. It compares the result with Henderson–Hasselbalch, and with adding the same acid to a litre of pure water.
from math import log10
Kw, Ka = 1.0e-14, 1.75e-5
pKa = -log10(Ka)
def solve_pH(balance):
lo, hi = 0.0, 14.0
for _ in range(60):
mid = 0.5 * (lo + hi)
if balance(10 ** -mid) > 0:
lo = mid
else:
hi = mid
return 0.5 * (lo + hi)
def pH_mixture(acetate_total, Na, Cl):
"""Exact pH from the charge balance [H+] + [Na+] = [A-] + [OH-] + [Cl-] (all mol/L)."""
return solve_pH(lambda h: h + Na - acetate_total * Ka / (Ka + h) - Kw / h - Cl)
# 1.000 L of buffer: 0.100 mol ethanoic acid + 0.100 mol sodium ethanoate.
# Add 1.00 mol/L hydrochloric acid, 10 mL at a time; compare with 1.000 L of pure water.
print(f"{'HCl added':>10} {'buffer pH':>10} {'Henderson-Hasselbalch':>22} {'water pH':>9}")
for mL in (0, 10, 20, 50, 80, 100):
n_HCl = mL / 1000 * 1.00
V = 1.000 + mL / 1000
buffer = pH_mixture(0.200 / V, 0.100 / V, n_HCl / V)
hh = f"{pKa + log10((0.100 - n_HCl) / (0.100 + n_HCl)):.2f}" if n_HCl < 0.100 else "fails"
water = pH_mixture(0.0, 0.0, n_HCl / V)
print(f"{mL:7d} mL {buffer:10.2f} {hh:>22} {water:9.2f}")The first 10 mL of acid drops the pH of pure water by five units, from 7.00 to 2.00, but the buffer's by only 0.09. Henderson–Hasselbalch matches the exact answer to 0.01 throughout the buffer's working range. After 100 mL, though, every ethanoate ion has been used up: the buffer is exhausted, the equation "fails" (the logarithm of zero), and the pH plunges to that of plain ethanoic acid, 2.75. The amount of acid or base a buffer can absorb before this happens is its buffer capacity; it grows with the concentrations, not with their ratio.
Titration curves
In a titration, a solution of known concentration (the titrant, here sodium hydroxide) is added from a burette to a measured volume of the sample until the reaction is exactly complete, at the equivalence point. Recording the pH as the titrant goes in gives a titration curve, and the same charge balance lets us simulate one. For 25.00 mL of 0.1000 mol/L acid titrated with 0.1000 mol/L NaOH, the charge balance is , where the anion is Cl⁻ (all of it) for hydrochloric acid, and only the ionised fraction of the ethanoic acid.
import numpy as np
Kw = 1.0e-14
def solve_pH(balance):
lo, hi = 0.0, 14.0
for _ in range(60):
mid = 0.5 * (lo + hi)
if balance(10 ** -mid) > 0:
lo = mid
else:
hi = mid
return 0.5 * (lo + hi)
def titration_pH(Vb, Ka=None, Ca=0.100, Va=25.0, Cb=0.100):
"""pH after adding Vb mL of NaOH (Cb mol/L) to Va mL of acid (Ca mol/L).
Ka=None means a strong acid (fully ionised)."""
V = Va + Vb
acid, Na = Ca * Va / V, Cb * Vb / V # total acid and Na+ after mixing
if Ka is None:
anion = lambda h: acid # Cl- is always fully there
else:
anion = lambda h: acid * Ka / (Ka + h) # only the ionised part is A-
return solve_pH(lambda h: h + Na - anion(h) - Kw / h)
volumes = np.arange(0.0, 50.01, 2.5)
strong = [titration_pH(v) for v in volumes]
weak = [titration_pH(v, Ka=1.75e-5) for v in volumes]
print(" NaOH/mL pH(HCl) pH(ethanoic) 0" + " " * 40 + "14 <- pH")
for v, s, w in zip(volumes, strong, weak):
row = ["."] * 43 # one character per 1/3 pH unit
row[round(3 * w)] = "w"
row[round(3 * s)] = "s" # s = HCl, w = ethanoic acid
print(f"{v:7.1f} {s:8.2f} {w:13.2f} " + "".join(row))
print(f"\nhalf-way (12.5 mL): pH = {titration_pH(12.5, Ka=1.75e-5):.2f} (pKa = {-np.log10(1.75e-5):.2f})")
print(f"equivalence (25.0 mL): strong {titration_pH(25.0):.2f}, weak {titration_pH(25.0, Ka=1.75e-5):.2f}")
for v in (24.9, 25.1):
print(f"at {v} mL: strong {titration_pH(v):.2f}, weak {titration_pH(v, Ka=1.75e-5):.2f}")Three features are worth remembering. Half-way to equivalence, exactly half the weak acid has been converted to its conjugate base, so and : titration is how values are measured. At equivalence the weak-acid solution contains only sodium ethanoate, a weak base, so the pH is 8.73, not 7. And the jump at equivalence is much steeper for the strong acid, which is why an indicator must be chosen to change colour within the jump: phenolphthalein (colour change near pH 8 to 10) suits both titrations here, while methyl orange (pH 3.1 to 4.4) would give a badly early end point for ethanoic acid.
Indicators are themselves weak acids whose acid and base forms have different colours. The pigments in red cabbage are a natural set of them. A safe kitchen activity, with an adult handling the hot water: steep chopped red cabbage in hot water, strain off the purple liquid, and add a little of it to separate small glasses of lemon juice, white vinegar, plain water and a solution of baking soda. The colours run from red in acids through purple to blue and green in bases. Use only food ingredients, and pour everything away afterwards.
Polyprotic acids and the buffer in your blood
Some acids can give up more than one proton, one at a time, each with its own . Phosphoric acid, H₃PO₄, has three: , 7.20 and 12.35. At any pH, the fractions of H₃PO₄, H₂PO₄⁻, HPO₄²⁻ and PO₄³⁻ follow from the equilibria; each pair of neighbours is equal at its own . The second , 7.20, is why the H₂PO₄⁻/HPO₄²⁻ pair buffers the inside of cells.
Blood is buffered mainly by carbon dioxide and hydrogencarbonate (bicarbonate). Dissolved CO₂ reacts with water (the enzyme carbonic anhydrase makes this fast) to give carbonic acid, which loses a proton:
CO₂(aq) + H₂O ⇌ H₂CO₃ ⇌ HCO₃⁻ + H⁺
Physiologists combine the steps into one apparent of 6.1 at body temperature and measure the dissolved CO₂ by its partial pressure, : 0.0307 mmol/L of dissolved CO₂ per mmHg. With the normal values, 24 mmol/L of bicarbonate and mmHg, Henderson–Hasselbalch gives .
import numpy as np
def fractions(pH, pKas):
"""Fraction of a polyprotic acid in each protonation state (H_nA, ..., A^n-) at this pH."""
h = 10.0 ** -pH
Ks = 10.0 ** -np.array(pKas)
terms = [h ** (len(Ks) - j) * np.prod(Ks[:j]) for j in range(len(Ks) + 1)]
return np.array(terms) / sum(terms)
phosphoric = [2.15, 7.20, 12.35]
names = ["H3PO4", "H2PO4-", "HPO4^2-", "PO4^3-"]
print(f"{'pH':>5} " + "".join(f"{n:>9}" for n in names))
for pH in (1, 2.15, 4.7, 7.2, 7.4, 9.8, 12.35, 14):
print(f"{pH:5} " + "".join(f"{f:9.3f}" for f in fractions(pH, phosphoric)))
# Blood: the CO2/bicarbonate buffer at 37 °C. Dissolved CO2 = 0.0307 mmol/L per mmHg of CO2.
def blood_pH(bicarbonate_mM, pCO2_mmHg, pKa=6.1):
return pKa + np.log10(bicarbonate_mM / (0.0307 * pCO2_mmHg))
print()
for label, hco3, pco2 in [("typical arterial blood", 24, 40),
("breathing too fast (CO2 blown off)", 24, 30),
("breathing too slowly (CO2 retained)", 24, 60),
("bicarbonate used up by extra acid", 15, 40),
("... partly offset by faster breathing", 15, 30)]:
print(f"{label:38s} HCO3- {hco3:2d} mM, pCO2 {pco2} mmHg -> pH {blood_pH(hco3, pco2):.2f}")At pH 4.7 and 9.8, half-way between neighbouring values, more than 99 % of the phosphate is in a single form: these are the equivalence points of a phosphoric acid titration. At blood pH 7.4, phosphate is about 39 % H₂PO₄⁻ and 61 % HPO₄²⁻.
The bicarbonate buffer's of 6.1 is more than a unit from 7.4, so on paper it is a poor buffer. It works superbly because it is an open system: the lungs adjust within minutes by breathing faster or slower, and the kidneys adjust bicarbonate over hours to days. The last lines of the block show both: breathing too fast blows off CO₂ and raises the pH to 7.52, while a loss of bicarbonate (as in some metabolic disorders) drops it to 7.19, partly corrected when faster breathing lowers . Diagnosing such disturbances from blood-gas measurements is everyday work in hospitals; these numbers illustrate the chemistry and are not medical guidance.
How pH is measured and used today
In the laboratory, pH is measured with a glass electrode, whose thin glass membrane develops a voltage that changes by about 59 mV per pH unit at 25 °C, a direct consequence of the Nernst equation in Electrochemistry. Because the electrode's response drifts, it is calibrated every day against standard buffers; IUPAC's 2002 recommendations on pH define the primary standards, whose values national metrology institutes certify. Automated titrators then find equivalence points from the steepest part of the curve, as in the simulation above.
Biochemists use the zwitterionic buffers introduced by Norman Good and colleagues in 1966, such as MES, PIPES and HEPES, chosen for values near 6 to 8 and for not interfering with enzymes. Medicinal chemists predict values computationally, since a drug's charge at the pH of the gut or the blood decides how it is absorbed (Medicinal chemistry). Oceanographers measure seawater pH to better than 0.01 units: the surface ocean has become about 0.1 pH unit more acidic since pre-industrial times as it absorbs CO₂, which means about 26 % more hydrogen ions, with consequences for shell-building organisms (Environmental chemistry).
Common misconceptions
Misconception
"A strong acid is a concentrated acid." Strength is about how completely an acid ionises (); concentration is about how much is dissolved. A 0.001 mol/L solution of hydrochloric acid is dilute but strong; glacial (pure) ethanoic acid is concentrated but weak.
Misconception
"The pH scale runs from 0 to 14." Those are just convenient limits for everyday dilute solutions. Concentrated strong acids have negative pH, concentrated strong bases have pH above 14, and acid mine drainage has been measured below zero.
Misconception
"At the equivalence point the pH is always 7." Only for a strong acid with a strong base at 25 °C. Titrating a weak acid gives its conjugate base at equivalence, so the solution is basic (pH 8.73 above); titrating a weak base gives an acidic solution.
Misconception
"A buffer keeps the pH fixed, whatever is added." It resists change only while both partners remain in good supply. Once one is used up, the pH changes as fast as in unbuffered water, as the block above shows at 100 mL.
Exercises
Assume 25 °C, , and for ethanoic acid, unless an exercise says otherwise.
1. Acids, bases and buffers
Warm-upHumanIn the equilibrium HCO₃⁻ + H₂O ⇌ CO₃²⁻ + H₃O⁺, which species is the conjugate base of the hydrogencarbonate ion, HCO₃⁻?
2. Acids, bases and buffers
CoreHumanWhich of these can act as Lewis acids (electron-pair acceptors)? Select all that apply.
3. Acids, bases and buffers
Warm-upHumanWhat is the pH of a mol/L solution of sodium hydroxide at 25 °C?
4. Acids, bases and buffers
CoreHumanWhat is the pH of 0.10 mol/L ethanoic acid ()? Give it to two decimal places.
5. Acids, bases and buffers
CoreHumanYou want an ethanoic acid / sodium ethanoate buffer at pH 5.76. What ratio do you need? Give a whole number.
6. Acids, bases and buffers
CoreHumanA nervous student breathes very fast for several minutes. Bicarbonate stays at 24 mmol/L, but the partial pressure of CO₂ in the blood falls from 40 to 30 mmHg. What happens to the blood's pH, and why?
7. Acids, bases and buffers
CoreComputationalWrite pH_weak_acid(C, Ka, Kw=1e-14) that returns the exact pH of a solution of a weak monoprotic acid at total concentration C (mol/L), by solving the charge balance
for . The starter uses the square-root shortcut, which fails for dilute solutions and for very weak acids. Use bisection on the pH between 0 and 14 (or any method that is reliable).
8. Acids, bases and buffers
StretchComputationalA buffer contains a weak acid at concentration Ca and its conjugate base at Cb (mol/L). Using the Henderson–Hasselbalch equation with the amounts weighed in, write acid_to_shift(Ca, Cb, dpH) that returns how many moles of a strong acid per litre can be added before the pH falls by dpH. (Ignore the volume of acid added. Each mole of strong acid converts one mole of base into acid. The cancels out.)
Further reading and resources
- Measurement of pH. Definition, standards, and procedures (IUPAC Recommendations 2002) · R. P. Buck et al. · 2002Pure and Applied Chemistry. How pH is defined and measured, and how standard buffers are certified.
- Hydrogen ion buffers for biological research · N. E. Good et al. · 1966Biochemistry. The paper that introduced HEPES, MES and the other "Good's buffers".
- PubChemDissociation constants, hazard classifications and safety data for acids and bases.
- Globally Harmonized System of Classification and Labelling of Chemicals (GHS) · United Nations Economic Commission for EuropeThe international system of hazard pictograms, including the corrosion pictogram on strong acids and bases.
- MIT OpenCourseWare 5.111: Principles of Chemical Science · Massachusetts Institute of TechnologyIntroductory university lectures, including acid–base equilibria and titrations.