Coal is a combustible black or brownish-black sedimentary rock, formed as rock strata called coal seams. Coal is mostly carbon with variable amounts of other elements, chiefly hydrogen, sulfur, oxygen, and nitrogen. Coal is formed when dead plant matter decays into peat and is converted into coal by the heat and pressure of deep burial over millions of years. Vast deposits of coal originate in former wetlands—called coal forests—that covered much of the Earth's tropical land areas during the late Carboniferous (Pennsylvanian) and Permian times. However, many significant coal deposits are younger than this and originate from the Mesozoic and Cenozoic eras.
Coal is primarily used as a fuel. While coal has been known and used for thousands of years, its usage was limited until the Industrial Revolution. With the invention of the steam engine, coal consumption increased. In 2020 coal supplied about a quarter of the world's primary energy and over a third of its electricity. Some iron and steel making and other industrial processes burn coal.
The extraction and use of coal causes premature deaths and illness. The use of coal damages the environment, and it is the largest anthropogenic source of carbon dioxide contributing to climate change. 14 billion tonnes of carbon dioxide was emitted by burning coal in 2020, which is 40% of the total fossil fuel emissions and over 25% of total global greenhouse gas emissions. As part of the worldwide energy transition many countries have reduced or eliminated their use of coal power. The UN Secretary General asked governments to stop building new coal plants by 2020. Global coal use peaked in 2013. To meet the Paris Agreement target of keeping global warming to below 2 °C (3.6 °F) coal use needs to halve from 2020 to 2030, and phasing down coal was agreed in the Glasgow Climate Pact.
The largest consumer and importer of coal in 2020 was China. China accounts for almost half the world's annual coal production, followed by India with about a tenth. Indonesia and Australia export the most, followed by Russia.