The carbonic acid / bicarbonate / carbonate buffering system is very important in an aquarium and largely controls both the pH and the resistance to change of the pH in the water. These three carbonate-based species can all interconvert in a connected equilibrium reaction:

(1) H_{2}CO_{3} (carbonic acid) ⇌ H^{+} + HCO_{3}^{–} (bicarbonate) ⇌ 2H^{+} + CO_{3}^{-2} (carbonate)

H^{+} is shorthand for the hydronium H_{3}O^{+} ion. The concentration of H^{+} (notated as [H^{+}]) is what determines pH. pH is calculated as:

(2) pH = -log_{10}[H^{+}]

So when [H^{+}] = 1e-7M the pH is -log_{10}(1e-7) = 7.0 which is considered ‘neutral pH’.

Collectively, the amount of HCO_{3}^{–} (bicarbonate) and CO_{3}^{-2} (carbonate) set the water’s ‘alkalinity‘ which is sometimes reported as the ‘dKH’ value.

## Equilibrium concentrations of carbonic acid, bicarbonate and carbonate

The relative fraction of carbonic acid vs. bicarbonate vs. carbonate is entirely determined by the pH of the water. At lower pH (more acidic) the equilibrium shifts away from carbonate through bicarbonate and winds up as carbonic acid. The reverse is true at high pH. As the “middle ground” bicarbonate represents the majority of the species over a range of pH near neutral, including most of the typical pH values an aquarium might have.

The equilibrium for each of the carbonate-based species is the concentration(s) at which the relative amounts of each species are stable and unchanging, because under equilibrium conditions the rate of forward and reverse reactions are the same. This includes H_{3}O^{+} so at equilibrium the pH is also stable. These equilibrium concentrations can be described as follows:

(3) [H^{+}] x [HCO_{3}^{–}] / H_{2}CO_{3} = K_{a1}

(4′) [H^{+}] x [H^{+}] x [CO_{3}^{-2}] / [H^{+}] / [HCO_{3}^{–}] = K_{a2} which simplifies to…

(4) [H^{+}] x [CO_{3}^{-2}] / [HCO_{3}^{–}] = K_{a2}

K_{a1} and K_{a2} are the equilibrium constants for these reactions. You will often see these equilibrium constants expressed as pK_{a1} and pK_{a2} where by exact analogy to how pH relates to [H^{+}] by pH = -log_{10}[H^{+}], pK_{a1} = -log_{10}[K_{a1}] and pK_{a2} = -log_{10}[K_{a2}]. Whilst pK_{a2} is well-known to be 10.3, the value for pK_{a1} is still being debated, with a recent determination of 3.49. Part of the challenge with measuring pK_{a1} is that H_{2}CO_{3} can also spontaneously react with water along this scheme:

(5) H_{2}CO_{3} (carbonic acid) ⇌ H_{2}O + CO_{2}

This last reaction has an equilibrium that very heavily favors CO_{2} over H_{2}CO_{3}, which is important in a planted aquarium since dissolved CO_{2} gas is the major source of carbon for submersed plants. If we assume the concentration of water in this reaction is constant, then the equilibrium constant for conversion of carbonic acid to carbon dioxide is around 667 so carbonic acid at equilibrium is about 0.15% of the carbon dioxide concentration. This rapid conversion of carbonic acid to something other than bicarbonate is part of what makes determining K_{a1} so challenging.

## Relative amounts of carbonic acid, bicarbonate and carbonate

If the pH changes, the relative amounts of the three carbonate-based species will also change, establishing new equilibrium concentrations one relative to the other at the new pH. The reverse is also true, so if for example growing plants consume dissolved carbon dioxide, that will lower the concentration of carbonic acid which will in turn affect (raise) the pH, again rebalancing the relative distribution of the three carbonate-based species to a new equilibrium.

Knowing the pH and the two equilibrium constants K_{a1} and K_{a2} the relative fraction carbonic acid, bicarbonate and carbonate can be calculated. After some algebra (left as an exercise for the reader) this works out to:

(6) fraction of H_{2}CO_{3} (carbonic acid) = [H^{+}] / ([H^{+}] + K_{a1} + K_{a1} x K_{a2} / [H^{+}])

(7) fraction of HCO_{3}^{–} (bicarbonate) = K_{a1} / ([H^{+}] + K_{a1} + K_{a1} x K_{a2} / [H^{+}])

(8) fraction of CO_{3}^{-2} (carbonate) = K_{a2} / ([H^{+}] + K_{a2} + [H^{+}] x [H^{+}] / K_{a1})

Of course, these three relative amounts add up to exactly 1.0 and are dependent on pH and the two equilibrium constants. There is also a dependence on both temperature and the amount of salt in the water to a certain extent which can be modeled by adjusting the K_{a1} and K_{a2} values suitably if needed.

### Bjerrum plot of carbonate equilibria

Plotting these relative fractions vs. pH gives an interesting graph. Shown here is the result for pK_{a1} = 3.49 and pK_{a2} = 10.3 over a range of pH values, remembering to convert the pK_{a} values to their respective K_{a} values when using the equations. You can see from the graph that between pH 5 and 9 the bicarbonate will represent over 95% of the three different carbonate species. Note that here we show carbonic acid and not carbon dioxide. The interconversions between carbonic acid, bicarbonate and carbonate are all protonations and reach equilibrium very quickly, but the interconversion between carbonic acid and carbon dioxide is a legitimate chemical reaction which under some circumstances can take a long time to reach equilibrium.

### Carbon dioxide *vs.* bicarbonate *vs.* carbonate

Of perhaps more general relevance is a plot of dissolved CO_{2} vs. other carbonate species. This uses a pK_{a1} = 6.35 which accounts for the linked equilibria between dissolved CO_{2} and carbonic acid. Bicarbonate is still the dominant species at most aquarium-relevant pH values.

## The absolute amount of dissolved CO_{2} gas in aquarium water is a constant value

Note that the graphs show the relative levels of the species, not the absolute levels. Under conditions where the aquarium is open to atmosphere (doesn’t have a lid) the absolute level of dissolved CO_{2} gas is set by the level of atmospheric CO_{2} and temperature and not by pH. It might seem from the graph like you could boost levels of dissolved CO_{2} gas in the water by keeping the pH (and necessarily also the alkalinity) low, but this doesn’t actually work. Instead what happens is CO_{2} levels equilibrate to a constant value and is it the total amount of both bicarbonate and carbonate that is affected by changing the pH. As pH is increased exponentially more bicarbonate and carbonate are produced from the unchanging amount of carbonic acid (and thereby dissolved CO_{2}) present.

### Exact solution for CO_{2}, H_{2}CO_{3}, HCO_{3}^{–}, CO_{3}^{-2}

For the sake of completeness, it is straightforward to find exact solutions to the relative fraction of all four species, however, since the relationship between CO_{2} and H_{2}CO_{3} is not dependent on pH, and H_{2}CO_{3} is always a small fraction of CO_{2}, the graph of the four species with respect to pH is nearly identical to the one above for three species using pK_{a1} = 6.35, with the amount of H_{2}CO_{3} remaining small over all pH. If the hydration of CO_{2} has an equilibrium:

(9) [H_{2}CO_{3}] / [CO_{2}] / [H_{2}O] = K_{hyd} ≈ 1.5e-3 (with water assumed constant at 55.56M)

Then the relative fractions of CO_{2}, H_{2}CO_{3}, HCO_{3}^{–} and CO_{3}^{-2} are:

(10) CO_{2} fx = 1 / (1 + K_{hyd} + K_{hyd} x K_{a1} / [H^{+}] + K_{hyd} x K_{a1} x K_{a2} / [H^{+}] / [H^{+}])

(11) H_{2}CO_{3} fx = 1 / (1 + 1 / K_{hyd} + K_{a1} / [H^{+}] + K_{a1} x K_{a2} / [H^{+}] / [H^{+}])

(12) HCO_{3}^{–} fx = 1 / (1 + [H^{+}] / K_{a1} + [H^{+}] / K_{hyd} / K_{a1} + K_{a2} / [H^{+}])

(13) CO_{3}^{-2} fx = 1 / (1 + [H^{+}] / K_{a2} + [H^{+}] x [H^{+}] / K_{a1} / K_{a2} + [H^{+}] x [H^{+}] / K_{hyd} / K_{a1} / K_{a2})

Shown here is the fractional equilibrium concentrations of the four different carbonate-based species at a given pH, using K_{a1} = 3.24e-4 and K_{a2} = 5.01e-11. This graph is log_{10} transformed to better illustrate the minor components. To find the actual concentrations, raise 10 to the indicated power shown on the Y-axis, so 0 → 10^{0} = 1.0 = 100%; -1 → 10^{-1} = 0.1 = 10%; -2 → 10^{-2} = 0.01 = 1% etc.

## One more reaction path for CO_{2}

Not discussed above and not influencing the equilibrium values or how they are calculated, there is a second reaction path available by which bicarbonate can interconvert to carbon dioxide:

(14) CO_{2} + OH^{–} ⇌ HCO_{3}^{–}

In this hydroxylation reaction, dissolved carbon dioxide reacts with the hydroxide ion to form the bicarbonate ion. The equilibrium for this reaction is:

(15) [HCO_{3}^{–} ] / [CO_{2}] / [OH^{–}] = K_{oh} ≈ 3.02e7

Unlike the hydration of carbon dioxide to carbonic acid, which is independent of pH, the hydroxylation reaction is pH dependent. The very well known self-ionisation of water follows this scheme:

(16) [H^{+}] x [OH^{–}] = K_{w} = 1e-14

such that:

(17) [HCO_{3}^{–} ] x [H^{+}] / [CO_{2}] = K_{w} x K_{oh} ≈ 1e-14 x 3.02e7 ≈ 3.02e-7

It doesn’t matter which equilibrium pathway you use to calculate the amount of CO_{2} as the amounts will work out to be the same either way – at least to within an approximation of how accurately the various equilibrium constants have been determined.