structural:expansion, information:classification
Limestone (calcium carbonate CaCO) is a type of carbonate sedimentary rock which is the main source of the material lime. It is composed mostly of the minerals calcite and aragonite, which are different crystal forms of CaCO. Limestone forms when these minerals precipitate out of water containing dissolved calcium. This can take place through both biological and nonbiological processes, though biological processes, such as the accumulation of corals and shells in the sea, have likely been more important for the last 540 million years. Limestone often contains fossils which provide scientists with information on ancient environments and on the evolution of life.

About 20% to 25% of sedimentary rock is carbonate rock, and most of this is limestone. The remaining carbonate rock is mostly dolomite, a closely related rock, which contains a high percentage of the mineral dolomite, CaMg(CO). Magnesian limestone is an obsolete and poorly-defined term used variously for dolomite, for limestone containing significant dolomite (dolomitic limestone), or for any other limestone containing a significant percentage of magnesium. Most limestone was formed in shallow marine environments, such as continental shelves or platforms, though smaller amounts were formed in many other environments. Much dolomite is secondary dolomite, formed by chemical alteration of limestone. Limestone is exposed over large regions of the Earth's surface, and because limestone is slightly soluble in rainwater, these exposures often are eroded to become karst landscapes. Most cave systems are found in limestone bedrock.

Limestone has numerous uses: as a chemical feedstock for the production of lime used for cement (an essential component of concrete), as aggregate for the base of roads, as white pigment or filler in products such as toothpaste or paint, as a soil conditioner, and as a popular decorative addition to rock gardens. Limestone formations contain about 30% of the world's petroleum reservoirs.