soapformulator
EN
Advanced The science 15 min read Updated

The chemistry of saponification: from ester bond to soap crystal

Fat plus lye gives soap plus glycerin is the one-line version. This is the long one: why the reaction only runs forwards, why stearic acid sets in the jug, what stays out of the soap, and what a bar is made of after gel and cure.

A glass flask of golden olive oil, a dish of white sodium hydroxide beads, a small bottle of clear glycerin and a cut bar of pale soap on a cobalt blue backdrop

In short

  • Hydroxide attacks each of a fat's three ester bonds directly. The fatty acid leaves as a carboxylate, and that last proton transfer is why saponification never runs backwards.
  • The balance is exact: 100 g of triolein takes 13.55 g of sodium hydroxide and gives 103.15 g of soap and 10.40 g of glycerin.
  • Free fatty acids, stearic acid and rosin are neutralised the moment lye reaches them, which is why they can thicken a batch in seconds.
  • Sterols, squalene, vitamin E and the alcohols in waxes never become soap. Jojoba is half fatty alcohol, and its wax esters probably barely react in a soap pot.
  • Oil and lye water do not mix, so the reaction starts slowly; the first soap emulsifies the rest and it speeds itself up.
  • Gel is soap passing into a liquid crystal. Cure is mostly water leaving while the soap crystallises.
On this page

The account in how soap is made is right as far as it goes: a fat meets a strong alkali and comes apart into soap and glycerin. This guide follows one ester bond through that reaction, does the arithmetic on real molecules, and then follows the soap after the lye has gone, through gel and cure, to the crystals a bar is actually made of.

A fat is three esters on one backbone

A triglyceride is glycerol, a three-carbon alcohol with a hydroxyl group on each carbon, joined to three fatty acids. Each join is an ester bond. The fatty acid’s end carbon is double-bonded to one oxygen and holds the glycerol through a second oxygen. Oxygen pulls electrons towards itself, which leaves that carbon slightly positive, and that carbon is where hydroxide attacks.

A natural fat is a crowd of such molecules rather than one kind. The chains are shared out among the backbones in many combinations, so olive oil holds triolein, with three oleic chains, alongside molecules that carry palmitic or linoleic chains as well. The fatty-acid profile on an oil’s page is the average over that crowd, and it is all the chemistry below needs, because every chain reacts the same way whichever backbone it sits on.

One ester bond, step by step

Saponification is a nucleophilic acyl substitution, the reaction organic chemistry courses use to introduce ester hydrolysis. Each chain goes through three steps.

  1. Addition. A hydroxide ion bonds to the positive carbon. For a moment that carbon carries four groups, a tetrahedral intermediate with a negative charge on the old carbonyl oxygen.
  2. The backbone leaves. The intermediate collapses back to a carbonyl and pushes out the oxygen that held the chain to the glycerol. The chain is now a carboxylic acid, and the backbone carries a negatively charged oxygen, an alkoxide.
  3. The proton moves. A carboxylic acid is a far stronger acid than an alcohol, so it hands its proton to the alkoxide, or to any hydroxide nearby, at once. The chain becomes a carboxylate, paired with a sodium ion: soap. The backbone has its hydroxyl group back.

Step three is why saponification goes all the way. The carboxylate’s negative charge is shared across two oxygens, and a negatively charged carboxylate repels the alkoxide that would have to attack it to rebuild the ester. There is no way back. It is also why chemists call the reaction base-promoted rather than base-catalysed: every ester bond uses up one hydroxide for good, and that is the reason lye has to be weighed.

The three chains on a backbone are cut one at a time, so a fat passes through diglyceride and monoglyceride on its way to glycerol. In a superfatted soap the lye runs out part way, so the fat left in the bar is a mixture of whole triglycerides and partly split ones. That was still argued in 1908: Simmons and Appleton’s handbook reports Geitel and Lewkowitsch’s view that triglyceride, diglyceride, monoglyceride, glycerol and soap sit in the pan side by side, notes that Fanto could find no intermediates at all, and, though the evidence seemed to favour the stepwise view, calls the matter unsettled.

Saponification: one fat molecule and three lye molecules make three soap molecules and one glycerinA triglyceride (three fatty-acid chains on a glycerol backbone) reacts with three sodium hydroxide units. Each chain leaves as a soap with a charged head and a sodium ion; the backbone leaves as glycerin. For 100 g of olive oil at a saponification value of 190 mg KOH/g: 13.5 g of sodium hydroxide gives 103.1 g of soap and 10.4 g of glycerin.OOOOlive oila triglyceride · 100 g+NaOHNaOHNaOHLye13.5 g−Na⁺−Na⁺−Na⁺Soapsodium oleate · 103.1 g+OHOHOHGlycerin10.4 g100.0 g + 13.5 g = 103.1 g + 10.4 g: nothing is lost, it is rearranged.
The overall balance: one triglyceride and three sodium hydroxides give three soap molecules and one glycerin. The masses are for 100 g of olive oil at 190 mg KOH/g.

The arithmetic, on real molecules

Because the reaction is exact, the lye a fat needs follows from its molar mass alone. One mole of triglyceride takes three moles of hydroxide, and a triglyceride weighs three fatty acids plus one glycerol, less the three waters that were lost when the esters formed. Triolein, the triglyceride of oleic acid, weighs 885.4 g/mol. So it:

  • needs 3 × 56.106 = 168.3 g of potassium hydroxide per mole, which is 190.1 mg per gram: its saponification value;
  • needs 3 × 39.997 = 120.0 g of sodium hydroxide per mole, or 13.55 g per 100 g of fat;
  • releases one mole of glycerin, 92.09 g, or 10.40 g per 100 g;
  • becomes the fat plus the lye minus the glycerin in soap: 103.15 g of sodium oleate from every 100 g.

The same sums for the other chains that matter in soap:

Pure triglyceride Molar mass (g/mol) SAP (mg KOH/g) NaOH per 100 g Glycerin per 100 g Sodium soap per 100 g
Trilaurin (C12:0) 639.0 263.4 18.78 g 14.41 g 104.37 g
Trimyristin (C14:0) 723.2 232.7 16.59 g 12.73 g 103.86 g
Tripalmitin (C16:0) 807.3 208.5 14.86 g 11.41 g 103.46 g
Tristearin (C18:0) 891.5 188.8 13.46 g 10.33 g 103.13 g
Triolein (C18:1) 885.4 190.1 13.55 g 10.40 g 103.15 g
Trilinolein (C18:2) 879.4 191.4 13.64 g 10.47 g 103.17 g
Triricinolein (C18:1, 12-OH) 933.5 180.3 12.85 g 9.87 g 102.99 g

Worked from IUPAC 2013 atomic weights; a triglyceride is three fatty acids plus glycerol (92.094) less three waters (18.015 each). Real oils are mixtures, which is why their values fall between the rows.

Two things stand out. Chain length moves the numbers: a gram of trilaurin holds 39 % more molecules than a gram of triolein, so it needs 39 % more lye. Double bonds barely do. Each one removes two hydrogen atoms, 2 g/mol on a chain of about 280, so the stearic, oleic and linoleic triglycerides all sit near 190. Castor’s ricinoleic acid carries an extra oxygen in its hydroxyl group, which adds weight and brings it down to 180. The SAP guide uses exactly this to check published figures against an oil’s composition.

The arithmetic is more than a century old. Simmons and Appleton’s 1908 handbook gives each fat as a saponification equivalent, the grams of fat that 56.1 g of potassium hydroxide saponifies, which for a triglyceride is a third of its molar mass, and turns it into a saponification value by dividing 56,100 by it. Their laurin (212.7), palmitin (268.7), stearin (296.7), olein (294.7) and ricinolein (310.7) come out at 263.8, 208.8, 189.1, 190.4 and 180.6, within 0.2 % of the table above.

No water is made or used when a triglyceride saponifies, which is why the water in a recipe is only a solvent and most of it later leaves the bar. With potassium hydroxide the soap is heavier, because potassium is: 100 g of triolein takes 19.01 g of KOH and gives 108.61 g of potassium oleate.

Every oil gets the same sum. 700 g of olive oil and 300 g of coconut oil need 149.7 g of sodium hydroxide to saponify completely, or 142.2 g at a 5 % superfat, and the working shows each oil's share.

Open it in the calculator

Free fatty acids: the fast reaction

Not every fatty acid in a fat is bound to glycerol. A small share is free, and a free acid skips the first two steps: it is already a carboxylic acid, so the hydroxide only has to take its proton.

R–COOH + NaOH → R–COO⁻Na⁺ + H₂O

A proton transfer between an acid and a strong base is about as fast as chemistry gets, so free acid turns to soap the moment lye reaches it. It makes water instead of glycerin: 100 g of stearic acid takes 14.06 g of sodium hydroxide and gives 107.7 g of sodium stearate and 6.3 g of water. The standard saponification test counts free and bound acids together, so the lye arithmetic needs no correction. What changes is the timing, and the timing is what a maker notices.

Sodium carbonate draws the line neatly. It turns free fatty acids into soap at once, foaming off carbon dioxide, but, as Simmons and Appleton note, it “cannot be used in the actual saponification of a neutral fat”: only hydroxide can break the ester.

Stearic acid. Commercial stearic acid, roughly half palmitic and half stearic, is specified with an acid value of 205–211 mg KOH/g inside a saponification value of 206–212: practically all of it is free acid. Melted into the oils, it turns to soap as the lye goes in, and the batter can thicken past pouring within seconds. Failor, who uses it to harden and correct transparent soap, warns that it can also curdle the batch for good, so she melts it and adds it separately, once the other oils have begun to trace. The 1908 handbook describes the same curdling with acidic oils: free acid is neutralised so fast that grains of soap form, and strong lye throws them out of solution, leaving the soap “thick and gritty”.

Rosin. Pine rosin is not a fat. It is mostly resin acids such as abietic acid, C₂₀H₃₀O₂, and they are free acids too. India’s rosin standard sets a minimum acid number of 155 and a minimum saponification number of 160 for the ordinary grades, nearly the same figure, where a triglyceride’s acid number is close to zero. Pure abietic acid would be 185.5. The calculator uses the 160 floor, which errs towards extra superfat rather than free lye.

Ordinary oils. Oils carry a little free acid as well. Codex allows extra virgin olive oil up to 0.8 g of free acid per 100 g, and ordinary virgin olive oil up to 3.3 g. That share makes soap before the esters have started, and the first soap is an emulsifier, as the section on rate explains, which is one reason an oil high in free acid can trace faster. Simmons and Appleton report the experiment behind it: dilute alkali emulsified a cottonseed oil that held free acid, but not the same oil once its acid was removed, while a solution of soap emulsified both.

What never becomes soap

Saponify a fat completely, extract what is left with a solvent, and a little remains, usually a percent or two: the unsaponifiable matter. It is whatever in the fat has no ester for hydroxide to attack, mainly sterols, hydrocarbons such as squalene, tocopherols (vitamin E), triterpene alcohols and pigments. It goes into the bar unchanged.

Fat Unsaponifiable matter
Castor oil up to 0.8 %
Olive, coconut, sunflower and soybean oil up to 1.5 %
Olive-pomace oil up to 3 %
Rice bran oil up to 6.5 %
Shea butter 2.4–11.6 %, mean 6.2 % (36 samples, seven countries)
Jojoba about 51 %

From the Codex standards and the other primary documents on each oil’s page; shea from Akihisa et al. (2010), jojoba from the Cosmetic Ingredient Review (2008).

The unsaponifiables are part of why one oil feels different from another in a finished bar, and none of the soap-quality numbers can see them, because those numbers count fatty acids only. They also dilute the fat. A gram of shea butter that is 10 % unsaponifiable has only about 0.9 g of fat to saponify, which is why shea takes less lye than its fatty acids alone suggest, and why the standards for unrefined shea allow a range as wide as 160–195 mg KOH/g.

That is the truth behind a line repeated in soap books, that shea or cocoa butter “does not fully saponify”. Every fatty-acid chain in them saponifies if there is lye for it. What stays behind is the unsaponifiable fraction, small in most butters and large in shea, plus the superfat, and in cold process nobody chooses which oil the superfat is made of. At trace much of the lye has yet to react (the loaf goes on warming for hours after it is poured), so an oil stirred in at trace meets the same lye as the rest. Only an oil stirred into hot process soap after the cook, when the lye is gone, stays whole, and the calculator has a setting for exactly that.

Waxes: jojoba and beeswax

Jojoba “oil” is a liquid wax: about 97 % wax esters, each one long fatty acid, mostly C20 or C22, joined to one long fatty alcohol of similar length. Its saponification value is about 93, half an ordinary oil’s, because each heavy ester carries only one acid. Even fully saponified, half of it would stay behind as fatty alcohol. Beeswax is the same kind of material: esters of fatty acids with long-chain alcohols, some hydrocarbons and some free fatty acids, with an acid value of 17–24 inside a saponification value of 87–104.

Long-chain wax esters also resist hydrolysis by alkali; analysts split them another way first (Miwa, 1971). In a soap pot, where the triglycerides use up the lye within a day or two, the free acids in beeswax react, but most of the wax esters are likely to go into the bar as they went in. The calculator cannot see that. It charges lye for jojoba at its full saponification value, and if the jojoba does not react, that lye goes to the other oils instead. At 10 % jojoba and a 5 % superfat, jojoba’s share of the lye is about as large as the whole superfat, so in the worst case the other oils are left with no margin at all. We have found no published measurement of what jojoba does in cold process, so the careful course is to count it as superfat: above a few percent, add half its percentage to the superfat you would otherwise use.

Why the reaction starts slowly and then speeds up

Lye solution and melted fat do not mix. Hydroxide stays in the water and triglyceride stays in the oil, so the reaction can only happen where the two touch, and its speed depends on how much boundary there is between them. Stirring by hand breaks the lye solution into droplets slowly. A stick blender’s blades make droplets small enough to multiply that boundary many times over in seconds, which is why trace took up to an hour of hand stirring in Failor’s hot method and as little as three minutes with a blender. That one tool made cold process quick and predictable enough to pour at a chosen thickness, which is what layers and swirls depend on.

Then the reaction helps itself. The first soap molecules gather at the boundary between oil and water, as they do around a drop of grease in the sink, and make the droplets smaller and steadier. More boundary means faster saponification, which means more soap: the reaction is autocatalytic. McBain and Kawakami showed in 1930 that the rate depends on the physical state of the soap already present, and that even closely related triglycerides differ in how readily they emulsify. Soap boilers worked by it long before: in their pans the start of saponification “is denoted by the formation of an emulsion”, and a pan slow to start was given a little soap to get it going. Mixing energy alone can carry it a long way: sunflower oil and potassium hydroxide driven by an ultrasonic probe at room temperature reached a high yield after 15 minutes of power (Mercantili et al., 2014).

How a soap molecule worksA soap molecule has an oil-loving tail, the fatty-acid chain, and a water-loving head, the charged carboxylate with its sodium ion. In water, soap molecules surround a drop of oil with their tails inside it and their heads outside, forming a micelle that rinses away.−Na⁺Oil-loving tailthe fatty-acid chainWater-loving headthe charged carboxylateoilA micelle: tails in the oil, heads in the water
The two-ended molecule that lifts grease off skin also sits at the boundary between oil and lye water in the pot, which is how the first soap speeds up the rest.

Trace is the point at which that emulsion stops separating and the batter holds a drizzled line. The reaction is far from over then. Saponification gives off heat, and an insulated loaf goes on warming for hours after the pour because much of the reaction is still to come. Heat speeds every step, and the reaction’s own heat raises the temperature, which is how a wrapped loaf climbs into gel with no help. More water in the lye solution slows trace and less speeds it; the trace guide and the water guide cover the practical side.

Gel: soap as a liquid crystal

Fresh soap is mostly soap already. The everyday 40/30/30 bar made from 1000 g of oils at 38 % water starts out roughly 65 % soap, 25 % water, 7 % glycerin and 3 % unreacted oil. What that mixture looks like depends on its temperature.

Soap and water have been mapped together since the 1930s. Below a certain temperature the soap is partly crystalline: solid soap sits in the water and the mass is opaque. Above it, the soap passes into a liquid-crystalline state. The molecules keep their order, but their chains become liquid-like, and at concentrations like a fresh loaf’s they stack in sheets two molecules thick with water between them, the arrangement old soap boilers called neat soap. That state is translucent and glossy, and it is what soapmakers call gel. A physical chemist uses the word the other way round: to them the gel, or coagel, is the opaque, crystal-laden state below the transition.

How warm the soap must be depends on its chains. The temperature above which a pure sodium soap dissolves readily in water, its Krafft point, shows the pattern: about 25 °C (77 °F) for sodium laurate, 45 °C (113 °F) for myristate, 60 °C (140 °F) for palmitate and 71 °C (160 °F) for stearate. A real loaf is a mixture of many soaps with glycerin and water, and it reaches the transition on its own heat, from the middle outwards, when it is insulated well enough.

A cut bar of cold process soap with a darker, slightly translucent centre and a paler, opaque border A partial gel: the centre passed into the liquid-crystalline state and the edges, which lost heat faster, did not. Both are soap.

Where the mould loses heat faster than the reaction makes it, at the edges and corners, the soap may never reach the transition, which gives the paler ring of a partial gel. As a gelled loaf cools, the soap crystallises back out of the liquid crystal, and it turns opaque over the following hours. X-ray work in the 1940s found that sodium soaps crystallise in several distinct forms, which Ferguson named alpha, beta, delta and omega; which ones form depends on the chains, the water and how the soap cooled. Bar-soap factories control that on purpose. In handmade soap nobody measures it, but it is likely part of the reason a gelled and an ungelled bar from the same batter can differ slightly in look and feel. The gel phase guide covers how to encourage or prevent it.

Cure: what changes in the bar

In a warm, insulated loaf the lye is essentially used up within a day or two; a thin, cold, ungelled batch takes longer. After that the bar’s chemistry is largely settled, and three slower things happen.

  • Water leaves. A bar made at 38 % water starts about a quarter water and loses much of it over the following weeks, quickly at first, then more slowly as its weight settles against the humidity of the room. Weighing the same few bars every week or so draws the curve.
  • The soap crystallises further. As water leaves, more of the soap is in crystals and they pack tighter, so the bar hardens and dissolves more slowly in use.
  • The surface meets the air. Any hydroxide still at the surface reacts with carbon dioxide to form sodium carbonate, the white bloom of soda ash.

Makers also find that bars get milder over a cure. The water loss can be weighed and the hardening follows from it; why the feel changes is less well pinned down. A long cure is good practice either way. What a cure cannot do is rescue a lye-heavy bar. Surplus hydroxide in the middle of a bar has nothing left to react with, and the fix is to rebatch it with more oil. The curing guide covers racks, times and storage.

Sources

  1. Organic Chemistry, section 21.6: Chemistry of Esters . John McMurry, OpenStax (Rice University) , 2023. The mechanism of base-promoted ester hydrolysis.
  2. Atomic weights of the elements 2013 . IUPAC, Pure and Applied Chemistry 88(3) , 2016.
  3. ISO 3657:2023 Animal and vegetable fats and oils: Determination of saponification value . International Organization for Standardization , 2023. Defines the value as a measure of the free and esterified acids in a fat.
  4. Standard for Olive Oils and Olive Pomace Oils (CXS 33-1981) . Codex Alimentarius Commission (FAO/WHO) . Free acidity limits for each grade; unsaponifiable matter.
  5. Standard for Named Vegetable Oils (CXS 210-1999) . Codex Alimentarius Commission (FAO/WHO) . Unsaponifiable matter of coconut, sunflower, soybean and rice bran oil.
  6. Regional Standard for Unrefined Shea Butter (CXS 325R-2017, amended 2022) . Codex Alimentarius Commission (FAO/WHO) , 2022. Saponification value 160–195 mg KOH/g; unsaponifiable matter 1–19 %.
  7. IS 553:1984 Specification for gum rosin . Bureau of Indian Standards , 1984. Acid number and saponification number of each grade.
  8. Beeswax (INS 901): specifications . Joint FAO/WHO Expert Committee on Food Additives , 2005.
  9. Final report on the safety assessment of Simmondsia chinensis (jojoba) seed oil and related ingredients . Cosmetic Ingredient Review Expert Panel , 2008. Composition (97 % wax esters) and physical constants of jojoba.
  10. Jojoba oil wax esters and derived fatty acids and alcohols: gas chromatographic analyses . T. K. Miwa, Journal of the American Oil Chemists' Society 48 , 1971. Long-chain wax esters resist direct hydrolysis by alkali.
  11. Triterpene alcohol and fatty acid composition of shea nuts from seven African countries . Akihisa T. et al., Journal of Oleo Science 59(7) , 2010.
  12. The influence of physical state of a soap solution upon the rate of saponification of triglycerides . J. W. McBain and Y. Kawakami, Journal of Physical Chemistry 34 , 1930.
  13. Ultrasonic initiation of the alkaline hydrolysis of triglycerides (saponification) without phase catalysis . Mercantili L., Davis F., Higson S. P. J., Journal of Surfactants and Detergents 17 , 2014.
  14. The structure of the liquid-crystalline phases of lipid-water systems . V. Luzzati and F. Husson, Journal of Cell Biology 12 , 1962.
  15. Removal of lithium from aqueous solutions by precipitation with sodium and choline alkanoate soaps . Raiguel S., Avdibegović D., Binnemans K., Green Chemistry 27 , 2025. Table 1: Krafft points of sodium laurate, myristate, palmitate and stearate, after Klein et al. (2008).
  16. The four known crystalline forms of soap . R. H. Ferguson, Oil & Soap 21 , 1944.
  17. Making Transparent Soap . Catherine Failor, Storey Publishing , 2000. Stearic acid and rosin in contact with lye; trace times by hand and by blender.
  18. Scientific Soapmaking: The Chemistry of the Cold Process . Kevin M. Dunn, Clavicula Press , 2010.
  19. The Handbook of Soap Manufacture . W. H. Simmons and H. A. Appleton, Scott, Greenwood & Son (Project Gutenberg edition) , 1908. Saponification equivalents of the pure triglycerides and the conversion, saponification value = 56,100 ÷ equivalent; the 1908 dispute over whether di- and monoglycerides form in the soap pan; carbonate saponifies free acids but not neutral fat; free acidity making cold-process soap gritty; Hillyer's emulsification tests; the emulsion as the sign a pan has started.