Alkalinity (from ) is the capacity of water to resist acidification. It should not be confused with basicity, which is an absolute measurement on the pH scale. Alkalinity is the strength of a buffer solution composed of weak acids and their conjugate bases. It is measured by titrating the solution with an acid such as HCl until its pH changes abruptly, or it reaches a known endpoint where that happens. Alkalinity is expressed in units of concentration, such as meq/L (milliequivalents per liter), μeq/kg (microequivalents per kilogram), or mg/L CaCO (milligrams per liter of calcium carbonate).  Each of these measurements corresponds to an amount of acid added as a titrant.
In freshwater, particularly those on non-limestone terrains, alkalinities are low and involve a lot of ions. In the ocean, on the other hand, alkalinity is completely dominated by carbonate and bicarbonate plus a small contribution from borate.
Although alkalinity is primarily a term used by limnologists and oceanographers, it is also used by hydrologists to describe temporary hardness. Moreover, measuring alkalinity is important in determining a streams ability to neutralize acidic pollution from rainfall or wastewater. It is one of the best measures of the sensitivity of the stream to acid inputs. There can be long-term changes in the alkalinity of streams and rivers in response to human disturbances such as acid rain generated by SO and NO emissions.