In this application, ion-exchange resins are used to replace the magnesium and calcium ions found in hard water with sodium ions. When the resin is fresh, it contains sodium ions at its active sites. When in contact with a solution containing magnesium and calcium ions (but a low concentration of sodium ions), the magnesium and calcium ions preferentially migrate out of solution to the active sites on the resin, being replaced in solution by sodium ions. This process reaches equilibrium with a much lower concentration of magnesium and calcium ions in solution than was started with.