The hardness level as mg/L (ppm) calcium carbonate is determined by an EDTA (ethylene-diamine-tetraacetic acid) titration. The solution is first adjusted to a pH of 10 using a buffer solution. The indicator chelates with metal ions such as magnesium or calcium to form a red colored complex. As EDTA is added, metal ions complex with it. After all the free metal ions have been complexed, an excess EDTA removes the metal ions complexed with the indicator to form a blue colored solution. This color change from red to blue is the endpoint of the titration.