Biogenic calcium carbonate is formed when marine organisms, such as coccolithophores, corals, pteropods, and other mollusks transform calcium ions and bicarbonate into shells and exoskeletons of calcite or aragonite, both forms of calcium carbonate. This is the dominant sink for dissolved calcium in the ocean. Dead organisms sink to the bottom of the ocean, depositing layers of shell which over time cement to form limestone. This is the origin of both marine and terrestrial limestone.
Calcium precipitates into calcium carbonate according to the following equation:
Ca + 2HCO → CO+ HO + CaCO
The relationship between dissolved calcium and calcium carbonate is affected greatly by the levels of carbon dioxide (CO) in the atmosphere.
Increased carbon dioxide leads to more bicarbonate in the ocean according to the following equation:
CO + CO + HO → 2HCO 
With ocean acidification, inputs of carbon dioxide promote the dissolution of calcium carbonate and harm marine organisms dependent on their protective calcite or aragonite shells. The solubility of calcium carbonate increases with pressure and carbon dioxide and decreases with temperature. Thus, calcium carbonate is more soluble in deep waters than surface waters due to higher pressure and lower temperature. As a result, precipitation of calcium carbonate is more common in shallower oceans. The depth at which the rate of calcite dissolution equals the rate of calcite precipitation is known as calcite compensation depth.