When carbon dioxide dissolves, it can react with water to form carbonic acid, H2CO3. H2CO3 can dissociate and give away one or two hydrogen ions to form either a bicarbonate ion (HCO3-) or a carbonate ion (CO3 w/ -2 charge). If dissolved calcium is present, it reacts to form insoluble calcium carbonate (CaCO3) or soluble calcium bicarbonate (Ca(HCO3-)2). If you're testing water samples for environmental health and/or water quality, you may need to calculate bicarbonate concentration. To calculate bicarbonate concentration, you'll first need to find total alkalinity for your sample. Testing total alkalinity is beyond the scope of this article; if you need to know how to do so, the link under Resources provides full instructions.
Convert from total alkalinity to molarity. Total alkalinity is usually a measure of milligrams per litre of calcium carbonate; divide by 100,000 (approximately) grams per mole to find moles per litre or molarity. Molarity is the concentration of a substance in a solution.
Substitute the equation for carbonate concentration as a function of bicarbonate concentration and pH for the equation for total alkalinity. The expression for total alkalinity is 2 x total alkalinity = [HCO3-] + 2 [CO3 -2] + [OH-]. (Note that in chemistry, the brackets around a species refer to its concentration, so [HCO3-] is the concentration of bicarbonate). The equation for carbonate concentration is [CO3 -2] = K2 [HCO3-] / [H+], where K2 is the second dissociation constant for carbonic acid. Substituting this expression will give us 2 x total alkalinity = [HCO3-] + 2 x ( K2 [HCO3-] / [H+] ) + [OH-].
Rearrange this equation to solve for [HCO3-]. Since pH = -log [H+], [H+] = 10 to the negative pH. We can use this information and some algebra to rewrite the equation as [HCO3-] = ( 2 x total alkalinity ) - ( 10 to the (-14 + pH) ) / ( 1 + 2K2 x 10 to the pH).
Plug the value for moles per litre of calcium carbonate you found previously into the equation to find bicarbonate concentration.
The formula will work only if calcium and carbonate compounds make up the bulk of the contribution to total alkalinity. If you suspect other compounds like ammonia are present, a more complex formula will be required; see the first link under the "References" for details.