The oceans contain around 36,000 gigatons of carbon, mostly in the form of bicarbonate ion (over 90%, with most of the remainder being carbonate).
CO2 is absorbed from the atmosphere at the ocean's surface and converted into dissolved inorganic carbon (DIC). It is then converted in gross primary production (GPP) by phytoplankton into organic carbon. About half of the GPP is autotrophically respirated and converted back into DIC. The rest stays in the form of net primary production (NPP). Some of the organic carbon sinks into the lower ocean levels as detritus or calcium carbonate in shells. Some soft tissue is converted into particulate organic carbon or dissolved organic carbon and, from these forms, into dissolved inorganic carbon. The rest sinks to the ocean floor. Shells out of calcium carbonate are also deposited on the ocean floor as sediment, whereas the carbon can dissolve and reach the lower ocean levels again. Thermohaline circulation can bring carbon in the deep ocean levels to the upper levels, where it can again be exchanged with the atmosphere. Units are in gigatons.
In the oceans, dissolved carbonate can combine with dissolved calcium to precipitate solid calcium carbonate, CaCO3, mostly as the shells of microscopic organisms. When these organisms die, their shells sink and accumulate on the ocean floor. Over time these carbonate sediments form limestone which is the largest reservoir of carbon in the carbon cycle. The dissolved calcium in the oceans comes from the chemical weathering of calcium-silicate rocks, during which carbonic and other acids in groundwater react with calcium-bearing minerals liberating calcium ions to solution and leaving behind a residue of newly formed aluminium-rich clay minerals and insoluble minerals such as quartz.