← All simulations

Diprotic Acid + Base Titration

A diprotic acid H2A (such as maleic acid) is titrated with a base B, or a base B that takes up two protons (such as carbonate) is titrated with an acid HA. The titrant can be weak, like ammonia or acetic acid, or strong, like NaOH or HCl. At every point the pH is found exactly from the charge balance, the dissociation equilibria, the mass balances, and water self-dissociation. There are two equivalence points: the first when one proton per molecule has reacted, the second when both have. Use “Save current titration” to keep up to three titrations on the same axes for comparison. The lower plots show the species and the buffer capacity during the current titration, against volume and against pH. Move the pointer over any 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. When a base B is the titrant, its pKb is held fixed, so 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 vs. volume; current titration only

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

Speciation and buffer capacity vs. pH; current titration only

How this is calculated

This page is the web version of the Matlab programs diprotic3.m (a diprotic acid H2A titrated with a base B) and diprotic3r.m (a base B that takes up two protons, titrated with an acid HA). It works the same way as the weak acid + weak base page, with one more equilibrium.

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.

Species and equilibria. For the diprotic acid, Ka1 and Ka2 are the dissociation constants of H2A and HA−; for the dibasic base, they are those of H2B2+ and BH+. pKa1 is the smaller of the two (the first proton is lost more easily). The fractions of the three forms depend only on [H+]:

[H2A] = CA[H+]^2/Delta, [HA-] = CA Ka1 [H+]/Delta, [A2-] = CA Ka1 Ka2/Delta, Delta = [H+]^2 + Ka1[H+] + Ka1 Ka2
[H2B2+] = CB[H+]^2/Delta, [BH+] = CB Ka1 [H+]/Delta, [B] = CB Ka1 Ka2/Delta

The monoprotic titrant is treated as on the weak acid + weak base page:

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

Charge balance. Putting these into the charge balance leaves a single equation in [H+]. For a diprotic acid titrated with a base, and for a dibasic base titrated with an acid,

[BH+] + [H+] = [HA-] + 2[A2-] + [OH-]
[BH+] + 2[H2B2+] + [H+] = [A-] + [OH-]

with [OH−] = Kw/[H+]. The charges are written for a neutral base B; for a base that carries a charge, such as carbonate (B = CO32−, BH+ = HCO3−, H2B2+ = H2CO3), the spectator ions (2 Na+ per carbonate) shift both sides equally, so the equation is the same. Multiplying out the denominators gives a fifth-order polynomial; the Matlab programs find its one positive real root with roots (in [H+] for diprotic3.m, in [OH−] for diprotic3r.m). Every term in the charge balance changes in one direction as [H+] increases, so there is exactly one root, and this page finds it by repeatedly halving the range of possible [H+], which gives the same result. The species then follow from the expressions above.

How the titration is followed. The concentrations CA and CB 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)

The first equivalence point is reached when the moles of titrant added equal the moles of analyte; the second when they are twice the moles of analyte. Halfway to each, the two forms of one conjugate pair are present in nearly equal amounts, so the pH is close to that pair’s pKa. At the first equivalence point the flask holds mainly the amphiprotic form (HA− or BH+), and the pH is close to the average of the two pKa values. When the two pKa values are less than about 3 units apart, the first equivalence point is hard to see.

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. With a strong titrant, BH+ (or A−) is just the spectator ion (Na+ from NaOH, Cl− from HCl). The speciation plots also show [H+] or [OH−] whenever they exceed 2% of the largest species, as they do past the second equivalence point with a strong titrant.

Buffer capacity. The plots show 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 two buffer regions and at the extremes of pH, and smallest at the equivalence points. 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: the amount of strong base, in mol per liter, needed to raise the pH by one unit at fixed total concentrations. Here n̄i is the average number of protons bound to each molecule of acid–base system i (the diprotic analyte or the titrant) and Ci its total concentration; the page evaluates the derivative numerically:

beta = ln10([H+] + Kw/[H+]) + sum over i of Ci |dn_i/dpH|

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 the titrant reacts completely, first with one proton of each analyte molecule and then with the second. With x the moles of titrant added per mole of analyte, for a diprotic acid titrated with a base

pH = pKa1 + log(x/(1-x)) for 0 < x < 1; pH = pKa2 + log((x-1)/(2-x)) for 1 < x < 2

and for a dibasic base titrated with an acid

pH = pKa2 - log(x/(1-x)) for 0 < x < 1; pH = pKa1 - log((x-1)/(2-x)) for 1 < x < 2

At the first equivalence point itself (x = 1), where the amphiprotic form dominates, the usual estimate is

pH = (pKa1 + pKa2)/2 at x = 1

It is drawn for each curve on the plot, in that curve’s color. It works well in the middle of each buffer region, and fails at the start, near each equivalence point, when the two pKa values are close (the two steps then overlap), and when the titrant is weak. It fails completely for a strong analyte (a pKa of the analyte at or below −2), since there is then no buffer region for that step: it predicts pH values outside the plotted range, so that part 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 at each equivalence point, which is how equivalence points are located from measured data, and it is lowest where the buffer capacity is highest.

Speciation against pH. The bottom plot shows the same species against the pH of the flask instead of the volume. The green lines mark the pH at the four marked points of the titration (halfway to and at each equivalence point), and the gray dotted lines the two pKa values. The two forms of each conjugate pair cross where the pH equals that pair’s pKa; the pH halfway to an equivalence point is close to, but not exactly at, the pKa. When a base is titrated with an acid, the pH falls as the titration proceeds, so the pH axis runs from high to low to keep the same left-to-right order as the titration.

Concentrations are in M (mol/L) and volumes in mL. The Matlab programs diprotic3.m and diprotic3r.m 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.

This particular page is a work in progress, not fully human-checked although derived from human-written programs.

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.