Treating or preventing calcium deficiency. Calcium Carbonate is a dietary supplement. It works by providing extra calcium to the body. Antacids are taken by mouth to relieve heartburn, sour stomach, or acid indigestion. They work by neutralizing excess stomach acid. Some antacid combinations also contain simethicone, which may relieve the symptoms of excess gas. Antacids alone or in combination with simethicone may also be used to treat the symptoms of stomach or duodenal ulcers. With larger doses than those used for the antacid effect, magnesium hydroxide (magnesia) and magnesium oxide antacids produce a laxative effect. The information that follows applies only to their use as an antacid. Some antacids, like aluminum carbonate and aluminum hydroxide, may be prescribed with a low-phosphate diet to treat hyperphosphatemia (too much phosphate in the blood). Aluminum carbonate and aluminum hydroxide may also be used with a low-phosphate diet to prevent the formation of some kinds of kidney stones.