These minerals include sodium , potassium , chloride , calcium , phosphorous , magnesium and sulfate . The kidneys also take out hydrogen ions from the blood . When healthy , the kidneys maintain the body 's internal equilibrium of water and minerals ( sodium , potassium , chloride , calcium , phosphorus , magnesium , sulfate ) .