Weak Acid + Weak Base Titration

An acid HA is titrated with a base B (or a base with an acid). Either or both can be weak, like acetic acid or ammonia, or strong, like HCl or NaOH. At every point the pH is found exactly from the charge balance, both dissociation equilibria, both mass balances, and water self-dissociation, so the same calculation covers every combination at any concentration. Use “Save current titration” to keep up to three titrations on the same axes for comparison. The lower plot shows the concentrations of the species, including H+ or OH− when they are large, and the buffer capacity during the current titration. Move the pointer over either plot to read off values.

Settings
In the flask:
M
M
mL
mL
Advanced options
1.0 × 10−14 at 25 °C; about 2.4 × 10−14 at 37 °C and 5.5 × 10−14 at 50 °C. Applies to all curves. With pKb held fixed, changing Kw also changes the pKa of BH+.
Curves on the titration plot
Saved curves (up to 3) remain when you change current settings.

Titration curve: pH as titrant is added

Speciation and buffer capacity; current titration only

Concentrations in the flask (left axis) and buffer capacity (right axis)

How this is calculated

Solution of monoprotic acid–base problems using an exact polynomial expression for [H+].

This treatment considers the equilibrium between an acid HA (such as HCOOH) and a base B (such as NH3) at any concentration of either one and for any values of Ka (pKa of HCOOH = 3.75) and Kb (pKb of NH3 = 4.74). This is the basis for exact calculation of weak-acid/weak-base titrations, which include strong acids and bases as extremes. Similar equations can be written for polyprotic acid titrations.

Throughout, activities are treated as equal to concentrations (an ideal solution), so the results are approximate at high concentrations, where ionic strength effects become important.

The six species we care about are HA, A−, BH+, B, H+, and OH−. We will need six equations to solve for six variables.

We have three equations from the dissociation equilibria that always hold:

[HCOO-][H+]/[HCOOH] = Ka
(of HA)
[H+][HO-] = Kw
[NH4+][HO-]/[NH3] = Kb
(of B), or
[NH3][H+]/[NH4+] = Kw/Kb

We have two conservation equations for the total concentration of HA and A− (e.g. formic acid/formate) and for B and BH+ (ammonia/ammonium):

[NH3] + [NH4+] = CB
[HCOO-] + [HCOOH] = CA

Finally, the sixth equation represents the overall charge neutrality of the solution:

[BH+] + [H+] = [A-] + [HO-]
Here,
[NH4+] + [H+] = [HCOO-] + [HO-]

The goal is to express everything in terms of [H+], solve for [H+], and then calculate everything else from the value for [H+] as needed.

Eliminate [HO−] using
[HO-] = Kw/[H+]
Eliminate [NH4+] using
[NH4+] = CB - [NH3]
:
[NH3][H+]/(CB - [NH3]) = Kw/Kb

Then solve for [NH3] as a function of [H+]:

[NH3][H+] = (Kw/Kb)(CB - [NH3])
so
[NH3]([H+] + Kw/Kb) = (Kw/Kb)CB
[NH3] = (Kw/Kb)CB/([H+] + Kw/Kb)
Eliminate [HCOO−] using
[HCOO-] = CA - [HCOOH]
:
(CA - [HCOOH])[H+]/[HCOOH] = Ka

Then solve for [HCOOH] as a function of [H+]:

(CA - [HCOOH])[H+] = Ka[HCOOH]
so
[HCOOH]([H+] + Ka) = CA[H+]
[HCOOH] = CA[H+]/([H+] + Ka)

Then plug everything into the charge conservation equation:

[NH4+] + [H+] = [HCOO-] + [HO-]
becomes
(CB - [NH3]) + [H+] = (CA - [HCOOH]) + Kw/[H+]
CB - (Kw/Kb)CB/([H+] + Kw/Kb) + [H+] = CA - CA[H+]/([H+] + Ka) + Kw/[H+]

This is a polynomial equation of one variable ([H+]), which we need to solve. From here on, it’s all just math, so we state everything in general terms rather than using the specific HCOOH/NH3 example.

Multiply through by
[H+]([H+] + Kw/Kb)([H+] + Ka)
and collect all terms on the left side:
multiplied-through equation

Multiply out:

multiplied-out equation, first form
multiplied-out equation, second form

Collect terms in [H+] to get the desired polynomial of the form ax4 + bx3 + cx2 + dx + e = 0, here with a = 1:

polynomial with collected coefficients

Canceling terms, we have the final fourth-order polynomial below. Kw/Kb could be replaced throughout with the Ka of BH+, the conjugate acid of the base B. During a (forward) titration, CA decreases due to dilution and CB increases as we add base. We solve the polynomial at each point.

final fourth-order polynomial in [H+]

Check a sample limiting case. Usually CB and CA are both ≫ Ka and Kw/Kb:

approximate polynomial

Then if CB = 0:

approximate polynomial with CB = 0

and [H+] will be ≫ Ka and Kw/Kb, so that the [H+] term and the constant term are negligible, giving

[H+]^4 + [H+]^2 (Ka)(-CA) = 0, [H+] = sqrt(CA Ka)

which is the correct limiting expression for the dissociation of a concentrated weak acid.

How this page uses it. The concentrations CA and CB in the polynomial are the total concentrations in the flask at each point, after mixing. If CA,0 and CB,0 are the concentrations of the two solutions and VA and VB their volumes,

CA = CA0 VA/(VA + VB), CB = CB0 VB/(VA + VB)

At each volume the page finds the one positive root of the polynomial numerically (by repeatedly halving the range of possible [H+], which gives the same result as the roots step in the Matlab version of this program, weakweak10.m), and then calculates the four species from [H+]:

[HA] = CA[H+]/([H+] + Ka), [A-] = CA - [HA], [B] = CB(Kw/Kb)/([H+] + Kw/Kb), [BH+] = CB - [B]

A strong acid or base is simply one with a very large K: a pK of −2 or below (K ≥ 100) behaves as strong at any ordinary concentration. When the acid is strong, HA is completely dissociated, so [HA] is essentially zero and A− is just the spectator anion (Cl− for HCl); likewise for a strong base, BH+ stands for the spectator cation (Na+ for NaOH). The speciation plot then also shows [H+] or [OH−], which become large past the equivalence point; they are drawn whenever they exceed 2% of the largest species.

Buffer capacity. The plot shows the dynamic buffer capacity βV of Michałowska-Kaczmarczyk and Michałowski (2015): the change in the concentration of added titrant in the flask per unit change in pH, as the titration actually proceeds. If V mL of titrant of concentration C has been added to V0 mL of analyte,

beta_V = |dc/dpH|, c = C V/(V0 + V)

It is largest where the pH changes least, in the buffer region and at the extremes of pH, and smallest at the equivalence point, where the pH changes fastest. Because c is the concentration in the growing volume of the flask, it includes the dilution caused by each addition. The page calculates it from two points a tiny volume apart.

The classical (static) buffer capacity, Van Slyke’s “buffer value” (1922), can be chosen under Advanced options. It is the amount of strong base, in mol per liter, needed to raise the pH by one unit at fixed total concentrations of the buffering species (imagining the base added without changing the volume):

beta = ln 10 ([H+] + Kw/[H+] + CA Ka [H+]/(Ka + [H+])^2 + CB (Kw/Kb)[H+]/(Kw/Kb + [H+])^2)

The factor ln 10 appears because pH is a base-10 logarithm: d[H+]/dpH = −ln 10 · [H+]. The first two terms are water itself, which buffers only at the extremes of pH; the last two are the HA/A− and BH+/B pairs, each largest when [H+] equals its Ka.

In the buffer region, where nearly all of the added titrant reacts, βV ≈ β · V0/(V0 + V), so the dynamic buffer capacity is smaller and peaks earlier in the titration. Outside the buffer region the two differ more, because there dilution itself changes the pH and a weak titrant does not react completely.

References: D. D. Van Slyke (1922), “On the measurement of buffer values and on the relationship of buffer value to the dissociation constant of the buffer and the concentration and reaction of the buffer solution,” J. Biol. Chem. 52, 525–570. A. M. Michałowska-Kaczmarczyk and T. Michałowski (2015), “Dynamic buffer capacity in acid–base systems,” J. Solution Chem. 44, 1256–1266 (doi:10.1007/s10953-015-0342-0).

Henderson–Hasselbalch estimate. The dotted curve (shown unless its box is unticked) assumes that each mole of titrant converts one mole of HA to A− (or B to BH+) completely, so that before the equivalence point

pH = pKa + log10(CB/(CA - CB))

(and the corresponding expression with pKw − pKb when a base is titrated). It is drawn for each curve on the plot, in that curve’s color. It works well in the middle of the buffer region of a weak acid titrated with a strong base, and fails at the very start, near equivalence, and whenever the reaction between the acid and the base is incomplete, that is, when pKa + pKb is not well below pKw. It fails completely when the substance in the flask (the analyte) is a strong acid or base, since there is then no buffer region: it predicts pH values outside the plotted range (below 0 for a strong acid, above 14 for a strong base), so most of the dotted curve is off the plot (the pH axis is not extended to show it). The legend then says “fails for a strong analyte”.

Log-derivative plot. The optional log-derivative curve on the titration plot is the slope of the titration curve, |dpH/dV|, the change in pH per mL of titrant, plotted as its base-10 logarithm on the right axis. It is drawn in purple for the current titration and faintly, in their own colors, for any saved curves. It peaks sharply at the equivalence point, which is how an equivalence point is located from measured data, and it is lowest where the buffer capacity is highest. It is calculated from two points a tiny volume apart.

Concentrations are in M (mol/L) and volumes in mL. The Matlab version of this program, weakweak10.m, and these notes are by Jason Kahn.

This page was checked by its author on desktop browsers in light mode. No human testing was done in dark mode or on phones.

Jason D. Kahn, Dept. of Chemistry and Biochemistry, University of Maryland College Park, using Claude

Complete table of values for the current titration

To use these numbers elsewhere, click Download .csv: the file opens directly in Excel, Numbers or Google Sheets, and in Matlab T = readtable('filename.csv') reads it into a table. Or click Copy table and paste into a spreadsheet; each value lands in its own cell. The export is for the current titration, with full precision; to export a different titration, change the settings and export again.