The chemical formula for limestone is CaCO3. When water (H2O) dissolves carbon dioxide (CO2) from the atmosphere, it forms carbonic acid (H2CO3). This weak acid reacts with limestone, causing it to dissolve and form calcium bicarbonate (Ca(HCO3)2), which is then carried away by water.