Hard water is caused by an excess of dissolved minerals - primarily calcium and magnesium - in water. Hardness is measured as grains per gallon, with water containing up to one grain per gallon considered to be soft. Water containing more than 10 grains per gallon is generally classified as hard.