In American English, the term gunpowder also refers broadly to any gun propellant. Gunpowder (black powder) as described in this article is not normally used in modern firearms, which instead use smokeless powders.
Gunpowder, also known since the late 19th century as black powder, was the first chemical explosive and the only one known until the mid-1800s. It is a mixture of sulfur, charcoal, and potassium nitrate (saltpeter)—with the sulfur and charcoal acting as fuels, while the saltpetre works as an oxidizer. Because of its burning properties and the amount of heat and gas volume that it generates, gunpowder has been widely used as a propellant in firearms and as a pyrotechnic composition in fireworks.
Gunpowder was, according to prevailing academic consensus, invented in the 9th century in China, and the earliest record of a written formula for gunpowder appears in the 11th century Song Dynasty text, Wujing Zongyao. This discovery led to the invention of fireworks and the earliest gunpowder weapons in China. In the centuries following the Chinese discovery, gunpowder weapons began appearing in the Arab world, Europe, and India. The technology spread from China through the Middle East or Central Asia, and then into Europe. The earliest Western accounts of gunpowder appear in texts written by English philosopher Roger Bacon in the 13th century.
Gunpowder is classified as a low explosive because of its relatively slow decomposition rate and consequently low brisance. Low explosives deflagrate (i.e., burn) at subsonic speeds, whereas high explosives detonate, producing a supersonic wave. Gunpowder’s burning rate increases with pressure, so it will burst containers if contained but otherwise just burns in the open. Ignition of the powder packed behind a bullet must generate enough pressure to force it from the muzzle at high speed, but not enough to rupture the gun barrel. Gunpowder thus makes a good propellant, but is less suitable for shattering rock or fortifications. Gunpowder was widely used to fill artillery shells and in mining and civil engineering to blast rock roughly until the second half of the 19th century, when the first high explosives (nitro-explosives) were discovered. Gunpowder is no longer used in modern explosive military warheads, nor is it used as main explosive in mining operations due to its cost relative to that of newer alternatives such as ammonium nitrate/fuel oil (ANFO). Black powder is still used as a delay element in various munitions where its slow-burning properties are valuable.
Formulations used in blasting rock (such as in quarrying) are called blasting powder.