Limestone is a sedimentary rock composed primarily of calcium carbonate (CaCO3), usually in the form of the mineral calcite.