Limestone, sedimentary rock composed mainly of calcium carbonate (CaCO3), usually in the form of calcite or aragonite. It may contain considerable amounts of magnesium carbonate (dolomite) as well minor constituents also commonly present include clay, iron carbonate, feldspar, pyrite, and quartz.