Gunpowder, also called black powder, is a mixture of sulfur, charcoal, and potassium nitrate. It burns rapidly, producing a volume of hot gas and a solid residue which can be used as a propellant in firearms and as a pyrotechnic composition in fireworks. The term gunpowder also refers broadly to any propellant powder. Modern firearms do not use the traditional gunpowder (black powder) described in this article, but instead use smokeless powder. Antique firearms or replicas of antique firearms are often used with black powder substitute.
Gunpowder is classified as a low explosive because of its relatively slow decomposition rate and consequently low brisance. Low explosives deflagrate at subsonic speeds. High explosives detonate, producing a supersonic wave. The gases produced by burning gunpowder generate enough pressure to propel a bullet, but not enough to destroy a gun barrel. This makes gunpowder less suitable for shattering rock or fortifications, where high explosives such as TNT are preferred.
The term black powder was coined in the late 19th century to distinguish prior gunpowder formulations from the new smokeless powders and semi-smokeless powders.(Semi-smokeless powders featured bulk volume properties that approximated black powder in terms of chamber pressure when used in firearms, but had significantly reduced amounts of smoke and combustion products; they ranged in color from brownish tan to yellow to white. Most of the bulk semi-smokeless powders ceased to be manufactured in the 1920s.)
Black powder is a granular mixture of
Potassium nitrate is the most important ingredient in terms of both bulk and function because the combustion process releases oxygen from the potassium nitrate, promoting the rapid burning of the other ingredients. To reduce the likelihood of accidental ignition by static electricity, the granules of modern black powder are typically coated with graphite, which prevents the build-up of electrostatic charge.
The current standard composition for the black powders that are manufactured by pyrotechnicians was adopted as long ago as 1780. Proportions by weight are 75% potassium nitrate, 15% softwood charcoal, and 10% sulfur. These ratios have varied over the centuries and by country, and can be altered somewhat depending on the purpose of the powder. For instance, power grades of black powder, unsuitable for use in firearms but adequate for blasting rock in quarrying operations, is called blasting powder rather than gunpowder with standard proportions of 70% nitrate, 14% charcoal, and 16% sulfur; blasting powder may be made with the cheaper sodium nitrate substituted for potassium nitrate and proportions may be as low as 40% nitrate, 30% charcoal, and 30% sulfur.
The burn rate of black powder can be changed by corning. Corning first compresses the fine black powder meal into blocks with a fixed density (1.7 g/cm³). The blocks are then broken up into granules. These granules are then sorted by size to give the various grades of black powder. In the United States, standard grades of black powder run from the coarse Fg grade used in large bore rifles and small cannons, through FFg (medium and smallbore arms such as muskets and fusils), FFFg (smallbore rifles and pistols), and FFFFg (extreme small bore, short pistols and most commonly for priming flintlocks). In the United Kingdom, the gunpowder grains are categorised by mesh size: the BSS sieve mesh size, being the smallest mesh size on which no grains were retained. Recognised grain sizes are Gunpowder G 7, G 20, G 40, and G 90.
A simple, commonly cited, chemical equation for the combustion of black powder is
A more accurate, but still simplified, equation is
Another reaction may be:
Charcoal does not consist of pure carbon; rather, it consists of partially pyrolyzed cellulose, in which the wood is not completely decomposed.
The burning of gunpowder does not take place as a single reaction, however, and the byproducts are not easily predicted. One study's results showed that it produced (in order of descending quantities): 55.91% solid products: potassium carbonate, potassium sulfate, potassium sulfide, sulfur, potassium nitrate, potassium thiocyanate, carbon, ammonium carbonate. 42.98% gaseous products: carbon dioxide, nitrogen, carbon monoxide, hydrogen sulfide, hydrogen, methane, 1.11% water.
Black powder formulations where the nitrate used is sodium nitrate tend to be hygroscopic, unlike black powders where the nitrate used is saltpeter (saltpeter (also saltpetre) in the context of this article means specifically potassium nitrate and not other definitions). Because of this, black powder which uses saltpeter can be stored unsealed and remain viable for centuries provided no liquid water is ever introduced. Muzzleloaders have been known to fire after hanging on a wall for decades in a loaded state, provided they remained dry. By contrast, powder that uses sodium nitrate, which is typically intended for blasting, must be sealed from moisture in the air to remain stable for long times.
In firearms, black powder allows loading by volumetric measure, where as smokeless powder requires precise measuring of the charge by weight to prevent damage due to overloading, though damage by overloading is still possible with black powder.
In quarrying, high explosives are generally preferred for shattering rock. However, because of its low brisance, black powder causes fewer fractures and results in more usable stone compared to other explosives, making black powder useful for blasting monumental stone such as granite and marble.
Black powder is well suited for blank rounds, signal flares, burst charges, and rescue-line launches. Black powder is also used in fireworks for lifting shells, in rockets as fuel, and in certain special effects.
Combustion converts less than half the mass of black powder to gas. The rest ends up as a thick layer of soot inside the barrel. In addition to being a nuisance, the residue from burnt black powder is hygroscopic and an anhydrous caustic substance. When moisture from the air is absorbed, the potassium oxide or sodium oxide turns into hydroxide, which will corrode wrought iron or steel gun barrels. Black powder arms must be well cleaned both inside and out to remove the residue. The Matchlock musket (an early gun) would be unusable in wet weather due to powder in the pan being exposed and dampened, in which case soldiers would use the ends as clubs or use bayonets.
The UN Model Regulations on the Transportation of Dangerous Goods and national transportation authorities, such as United States Department of Transportation, have classified Gunpowder (black powder) as a Group A: Primary explosive substance for shipment because it ignites so easily. Complete manufactured devices containing black powder are usually classified as Group D: Secondary detonating substance, or black powder, or article containing secondary detonating substance, such as firework, class D model rocket engine, etc., for shipment because they are harder to ignite than loose powder. As explosives, they all fall into the category of Class 1.
Gunpowder contains 3 megajoules per kilogram, and contains its own oxidant. For comparison, the energy density of TNT is 4.6 megajoules per kilogram, and the energy density of gasoline is 47.2 megajoules per kilogram.
The development of smokeless powders, such as Cordite, in the late 19th century created the need for a spark-sensitive priming charge, such as gunpowder. However, the sulfur content of traditional gunpowders caused corrosion problems with Cordite Mk I and this led to the introduction of a range of sulfur-free gunpowders, of varying grain sizes. They typically contain 70.5 parts of saltpetre and 29.5 parts of charcoal. Like black powder, they were produced in different grain sizes. In United Kingdom, the finest grain was known as sulfur-free mealed powder (SMP). Coarser grains were numbered as sulfur-free gunpowder (SFG n): 'SFG 12', 'SFG 20', 'SFG 40' and 'SFG 90', for example, where the number was a BSS sieve mesh size, being the smallest mesh size on which no grains were retained.
The main purpose of sulfur in gunpowder is to decrease the ignition temperature. A sample reaction for sulfur-free gunpowder would be
Gunpowder was invented, documented and used in ancient China where the Chinese military forces used gunpowder based weapons technology (i.e. rockets, guns, cannons) and explosives (i.e. grenades and different types of bombs) against the Mongols when the Mongols attempted to invade and breach the Chinese city fortifications on the northern borders of China. After the Mongols conquered China and founded the Yuan Dynasty, they used the Chinese gunpowder-based weapons technology in their invasion of Japan. Chinese also used gunpowder to fuel rockets. However, it has also been argued that, like the wheel, gunpowder was "coinvented" or "co-discovered" prior to, simultaneously or slightly after the Chinese, by cultures separated from the Chinese by vast distances, with minimal direct contact between one another.
A major problem compounding unbiased academic study is rapid access to original sources. Moreover, the major dilemma of accurate transliteration of original sources, especially of medieval Chinese texts, from then-understood metaphor and/or prose employed to describe (then) hitherto unexplained phenomena into contemporary languages with their well-established and rigidly defined terminology. The difficulty in transliteration lends itself readily to errors or latitude bordering on artistic licence in the interpretation 
An evaluation of all arguments and thorough literature review is beyond the scope of this article. Rather than take a position, the article will present all arguments to the reader.
Saltpeter was known to the Chinese by the mid-1st century AD and there is strong evidence of the use of saltpeter and sulfur in various largely medicinal combinations. A Chinese alchemical text dated 492 AD noted saltpetre burnt with a purple flame, providing a practical and reliable means of distinguishing it from other inorganic salts, thus enabling alchemists to evaluate and compare purification techniques. The Chinese word for "gunpowder" is Chinese: 火药/火藥; pinyin: huŏ yào /xuou yɑʊ/, which literally means "Fire Medicine." 
Some have heated together sulfur, realgar and saltpeter with honey; smoke and flames result, so that their hands and faces have been burnt, and even the whole house where they were working burned down.
The Chinese "Wu Ching Tsung Yao", written by Tseng Kung-Liang in 1044, provides encyclopedia references to a variety of mixtures which included petrochemicals, as well as garlic and honey. A slow match for flame throwing mechanisms using the siphon principle and for fireworks and rockets are mentioned. Academics argue the Chinese wasted little time in applying gunpowder to warfare, and they produced a variety of gunpowder weapons, including flamethrowers, rockets, bombs, and mines, before inventing guns as a projectile weapon. Invention of gunpowder preceded that of firearm.There was once a great deal of confusion and controversy surrounding the invention of firearms, but it is now generally accepted that firearms originated in China. Although there is no solid evidence for firearms in Europe before the 1300s, archeologists have discovered a gun in Manchuria dating from the 1200s, and a historian has identified a sculpture in Sichuan dating from the 1100s that appears to represent a figure with a firearm. Since all the other evidence points to Chinese origins, it is safe to conclude that this was in fact the case. The Europeans certainly had firearms by the first half of the 1300s. The Arabs obtained firearms in the 1300s too, and the Turks, Iranians, and Indians all got them no later than the 1400s, in each case directly or indirectly from the Europeans. The Koreans adopted firearms from the Chinese in the 1300s, but the Japanese did not acquire them until the 1500s, and then from the Portuguese rather than the Chinese. The time frame of the spread of firearms corresponded well with the Mongol's ruling of China (Yuan dynasty) when cultural and technological exchange between China and other Mongolian ruled territories were promoted. Therefore, from all the sources involving the alchemy (chemistry) of gunpowder and the invention and the spread of firearms,it seems that the Chinese invention of gunpowder was hundreds of years before other cultures obtaining the knowledge (or invention as some claim) of gunpowder.
The Arabs acquired knowledge of gunpowder some time after 1240 AD, but before 1280 AD, by which time Hasan al-Rammah had written, in Arabic, recipes for gunpowder, instructions for the purification of saltpeter, and descriptions of gunpowder incendiaries. However, because al-Rammah attributes his material to "his father and forefathers", al-Hassan argues that gunpowder became prevalent in Syria and Egypt by "the end of the twelfth century or the beginning of the thirteenth".
Al-Hassan claims that in the Battle of Ain Jalut of 1260 AD, the Mamluks used against the Mongols in "the first cannon in history" gunpowder formulæ with near-identical ideal composition ratios for explosive gunpowder. However, Khan claims that it was invading Mongols who introduced Chinese gunpowder to the Islamic world and cites Mamluk antagonism towards early riflemen in their infantry as an example of how gunpowder weapons were not always met with open acceptance in the Middle East. Similarly, the refusal of their Qizilbash forces to use firearms contributed to the Safavid rout at Chaldiran in 1514.
The earliest surviving documentary evidence for the use of the hand cannon, considered the oldest type of portable firearm and a forerunner of the handgun, are from several Arabic manuscripts dated to the 14th century. Al-Hassan argues that these are based on earlier originals and that they report hand-held cannons being used by the Mamluks at the Battle of Ain Jalut in 1260.
Hasan al-Rammah included 107 gunpowder recipes in his text al-Furusiyyah wa al-Manasib al-Harbiyya (The Book of Military Horsemanship and Ingenious War Devices), 22 of which are for rockets. If one takes the median of 17 of these 22 compositions for rockets (75% nitrates, 9.06% sulfur, and 15.94% carbon), it is near identical with the modern reported ideal gunpowder recipe (75% potassium nitrate, 10% sulfur, and 15% carbon).
Dated around 1257 AD, among the earliest extant written references to gunpowder in Europe, are Roger Bacon's texts Epistola, "De Secretis Operibus Artis et Naturae et de Nullitate Magiae," dated variously between 1248 and 1257, he states:
We can, with saltpeter and other substances, compose artificially a fire that can be launched over long distances... By only using a very small quantity of this material much light can be created accompanied by a horrible fracas. It is possible with it to destroy a town or an army ... In order to produce this artificial lightning and thunder it is necessary to take saltpeter, sulfur, and Luru Vopo Vir Can Utriet.
The last part has been interpreted as an elaborate coded anagram for the quantities needed, but other academics holding contrary viewpoints argue this may be erroneous transcription of a passage read with much difficulty.
a child’s toy of sound and fire and explosion made in various parts of the world with powder of saltpetre, sulfur and charcoal of hazelwood.
The Liber Ignium, or Book of Fires, attributed to Marcus Graecus, is a collection of incendiary recipes, including some gunpowder recipes. Partington dates the gunpowder recipes to approximately 1300. One recipe for "flying fire" (ingis volatilis) involves saltpetre, sulfur, and colophonium, which, when inserted into a reed or hollow wood, "flies away suddenly and burns up everything." Another recipe, for artificial "thunder", specifies a mixture of one pound native sulfur, two pounds linden or willow charcoal, and six pounds of saltpeter. Another specifies a 1:3:9 ratio.
Some of the gunpowder recipes of De Mirabilibus Mundi of Albertus Magnus are identical to the recipes of the Liber Ignium, and according to Partington, "may have been taken from that work, rather than conversely." Partington suggests that some of the book may have been compiled by Albert's students, "but since it is found in thirteenth century manuscripts, it may well be by Albert." Albertus Magnus died in 1280 AD.
A common German folk-tale is of the German priest/monk named Berthold Schwarz who independently invented gunpowder, thus earning it the German name Schwarzpulver or in English Schwarz's powder. Schwarz is also German for black so this folk-tale, while likely containing elements of truth, is considered problematic.
The major and uniquely European advancement of gunpowder was corning: the addition of moisture to the gunpowder to form regular greater grains which much increased the reliability and consistency of gunpowder. This occurred around the late 1400s AD, as European powdermakers began adding moisture to gunpowder to reduce dust and with it the risk of dust explosion. The powdermakers would then shape the resulting mush of dampened gunpowder, known as mill cake, into corns, or grains, to dry.
The new "corned" powder remained potent and more reliable to store as it was far less hygroscopic than the former powder (due to net reduced surface area). Gunners also found it was more powerful and easier to load measures of it into guns. The main advantage of corning is that the combustion flame spreads evenly between the grains, thus igniting all grains before significant gas expansion (when the gunpowder actually "explodes"). Gunpowder not corned results in much unburnt powder blown away from the ignition flame and combustion chamber due to localized miniature gas expansions within the powder.
Europeans innovated by experimentation and discovering different kernel sizes combusted at differing rates, and thus were more suitable for one gun or for another. Otto notes that without corning, gunpowder like all dry mixtures, has a tendency to gradually demix back into its original components and thus too unreliable for effective use in guns as mixtures would not be of uniform composition, noting the use of corning technique is commonplace in the modern pharmaceutical industry to ensure uniform proportions of active ingredients for each tablet.
Shot and gunpowder for military purposes were made by skilled military tradesmen, later called firemakers, and were also required to craft fireworks for celebrations of victory or peace. During the Renaissance, two European schools of pyrotechnic thought emerged, one in Italy and the other at Nürnberg, Germany. The Italian school of pyrotechnics emphasized elaborate fireworks, and the German school stressed scientific advancement. Both schools added significantly to further development of pyrotechnics, and by the mid-17th century fireworks were used for entertainment on an unprecedented scale in Europe, being popular even at resorts and public gardens.
By 1788, as a result of the reforms for which Lavoisier was mainly responsible, France had become self-sufficient in saltpeter, and its gunpowder had become not only widely considered the best in Europe but more importantly, inexpensive.
The introduction of smokeless powder in the late 19th century led to the contraction of the gunpowder industry.
Gunpowder production in England appears to have started in the mid 13th century AD with the aim of supplying The Crown. Records show that gunpowder was being made, in England, in 1346, at the Tower of London; a powder house existed at the Tower in 1461; and in 1515 three King's gunpowder makers worked there. Gunpowder was also being made or stored at other Royal castles, such as Portchester Castle.
By the early fourteenth century, according to N.J.G. Pounds's study The Medieval Castle in England and Wales, many English castles had been deserted and others were crumbling. Their military significance faded except on the borders. Gunpowder made smaller castles useless.
The introduction of smokeless powder in the late 19th century led to a contraction of the gunpowder industry. After the end of World War I, the majority of the United Kingdom gunpowder manufacturers merged into a single company, "Explosives Trades limited"; and number of sites were closed down, including those in Ireland. This company became Nobel Industries Limited; and in 1926 became a founding member of Imperial Chemical Industries. The Home Office removed gunpowder from its list of Permitted Explosives; and shortly afterwards, on 31 December 1931, the former Curtis & Harvey's Glynneath gunpowder factory at Pontneddfechan, in Wales, closed down, and it was demolished by fire in 1932.
The last remaining gunpowder mill at the Royal Gunpowder Factory, Waltham Abbey was damaged by a German parachute mine in 1941 and it never reopened. This was followed by the closure of the gunpowder section at the Royal Ordnance Factory, ROF Chorley, the section was closed and demolished at the end of World War II; and ICI Nobel's Roslin gunpowder factory which closed in 1954.
This left the sole United Kingdom gunpowder factory at ICI Nobel's Ardeer site in Scotland; it too closed in October 1976. Since then gunpowder has been imported into the United Kingdom. In the late 1970s / early 1980s gunpowder was bought from eastern Europe, particularly from what was then the East Germany and former Yugoslavia.
It was written in the Tarikh-i Firishta (1606–1607) that the envoy of the Mongol ruler Hulegu Khan was presented with a dazzling pyrotechnics display upon his arrival in Delhi in 1258 CE. Firearms known as top-o-tufak also existed in the Vijayanagara Empire of India by as early as 1366 AD. From then on the employment of gunpowder warfare in India was prevalent, with events such as the siege of Belgaum in 1473 AD by Sultan Muhammad Shah Bahmani.
By the 16th century, Indians were manufacturing a diverse variety of firearms; large guns in particular, became visible in Tanjore, Dacca, Bijapur and Murshidabad. Guns made of bronze were recovered from Calicut (1504 AD) and Diu (1533 AD). Gujarāt supplied Europe saltpeter for use in gunpowder warfare during the 17th century. Bengal and Mālwa participated in saltpeter production. The Dutch, French, Portuguese, and English used Chāpra as a center of saltpeter refining.
War rockets, mines and counter mines using gunpowder were used in India by the time of Akbar and Jahangir. Fathullah Shirazi (c. 1582), a Persian-Indian polymath and mechanical engineer who worked for Akbar the Great in the Mughal Empire, invented an autocannon, early multi-shot gun. As opposed to the polybolos and repeating crossbows used earlier in ancient Greece and China, respectively, Shirazi's rapid-firing gun had multiple gun barrels that fired hand cannons loaded with gunpowder.
The Javanese Majapahit Empire is argued to have grown to span most of modern day ASEAN due to its Javanese mastery of bronze-smithing and unique within the immediate region to the Majapahit court, the technology and mass manufacture (via cottage industries which contributed to a central arsenal). Documentary and archeological evidence indicate that Arab or Indian traders introduced gunpowder, gonnes, muskets, blunderbusses, and cannon to the Javanese, Acehnese, and Batak via long established commercial trade routes around the early to mid 1300s CE. Early European aggressors of Portugal and Spain were unpleasantly surprised and outgunned on many occasions. The resurgent Singhasari Empire overtook Sriwijaya and later emerged as the Majapahit who rigidly established fire-arms and cannonade as a feature of warfare.
Circa 1540 CE the Javanese always alert for new weapons found the newly arrived Portuguese weaponry superior to that of the locally made variants. The Javanese bronze breech-loaded swivel-gun, erroneously termed the lantaka, more correctly known as a meriam was used ubiquitously by the Majapahit navy and unfortunately pirates and rival lords. The demise of the Majapahit empire and the flight of disaffected skilled bronze cannon-smiths to Brunei, modern Sumatra and Malaysia, and the Philippines lead to near universal use of the swivel-gun, especially on trade vessels to protect against prevalent marauding pirates, especially in the Makassar Strait.
A Chinese pirate or commercial shipwreck site unearthed a double-ended swivel gun, which enabled swift firin: one barrel would fire whiles its opposite would be reloaded, though this is a rare and unique piece. Other archeological finds have unearthed some triple-barrel and some double-barrel swivel-guns, which were not widely duplicated.
The saltpetre harvesting was recorded by Dutch and German travelers as being common to even the smallest villages and collected from the decomposition process of large goat dung hills specifically piled for collection this saltpetre, a most unpleasant job. Saltpetre must be remembered by today's reader as being a key food preservative agent in a period of no refrigeration.
The Dutch punishment for possession of unpermitted gunpowder appears to have been amputation.
Ownership and manufacture of gunpowder was later prohibited by the colonial Dutch occupiers. Sir Thomas Stamford Raffles, from his The History of Java relates the process of powder manufacture, perhaps of noteworthy relevance considering at the time it was a military-related craft and not always recorded:
the best sulphur is supplied from a crater from a mountain near the straits of Bali...in caverns in irregularly formed beds of earth, which being impregnated with the native nitre, saturated with the evacuation of the enumerous bats that haunt these caves is mixed with a compound of wood ashes, supplies the liquid that is boiled in large kettles and afterward left to cool and crystallize.
For the most powerful black powder meal, a wood charcoal is used. The best wood for the purpose is Pacific willow, but others such as alder or buckthorn can be used. The ingredients are mixed as thoroughly as possible. This is achieved using a ball mill with non-sparking grinding apparatus (e.g., bronze or lead), or similar device. Historically, a marble or limestone edge runner mill, running on a limestone bed was used in Great Britain; however, by the mid 19th century AD this had changed to either an iron shod stone wheel or a cast iron wheel running on an iron bed. The mix is sometimes dampened with alcohol or water during grinding to prevent accidental ignition.
Around the late 14th century AD, European powdermakers began adding damp to the constituents of gunpowder to reduce dust and with it the risk of explosion. The powdermakers would then shape the resulting paste of dampened gunpowder, known as mill cake, into corns, or grains, to dry. Not only did corned powder keep better because of its reduced surface area, gunners also found that it was more powerful and easier to load into guns. Before long, powdermakers standardized the process by forcing mill cake through sieves instead of corning powder by hand.
During the 18th century gunpowder factories became increasingly dependent on mechanical energy.
Besides its habitual use as an explosive, gunpowder has been occasionally employed for other purposes, After the battle of Aspern-Essling (1809), the surgeon of the Napoleonic Army Larrey combated the lack of food for the wounded under his care by preparing a bouillon of horse meat seasoned with gunpowder for lack of salt. It was also used for sterilizing on ships when there was no alcohol.