Pour lye solution into melted oil and, over about a day, a slippery mixture turns into a firm bar. It looks like a spell, but every step is chemistry you can predict and calculate: what fats are, what lye does to them, what a soap molecule is, how it cleans, and why the lye amount matters for safety. Every later recipe rests on these ideas.
What you'll learn
- LO1.1 Describe saponification as the reaction of triglycerides with a strong alkali to give soap (fatty acid salts) and glycerin.
- LO1.2 Explain what a saponification (SAP) value is and why each oil needs a different amount of lye.
- LO1.3 Distinguish sodium hydroxide (bar soap) from potassium hydroxide (soft and liquid soap) and convert between their SAP values.
- LO1.4 Relate the main fatty acids (lauric, myristic, palmitic, stearic, ricinoleic, oleic, linoleic, linolenic) to hardness, cleansing, lather and shelf life.
- LO1.5 Explain why excess lye makes a harsh, unsafe bar and why a superfat is a safety margin.
Fats are esters
Every oil and butter you will soap is mostly triglycerides. A triglyceride is one molecule of glycerol (a three-carbon alcohol with three –OH groups) joined to three long-chain carboxylic acids called fatty acids [S77]. Module 4 covers the individual fatty acids and oils. Here you need the joint.
Each fatty acid is attached to glycerol through an ester link: the acid's C=O carbon bonded to an oxygen of glycerol. A triglyceride therefore holds three ester links. Saponification is what happens when a strong base breaks all three.
Saponification: breaking esters with a strong base
Chemists call the hydrolysis (splitting with water) of an ester in basic solution saponification, from the Latin word for soap [S140]. The steps are worth knowing because they explain everything that follows [S140]:
- A hydroxide ion (OH⁻) from the lye attacks the carbon of an ester's C=O group.
- That forms a short-lived intermediate, which falls apart. The bond between the acid carbon and the glycerol oxygen breaks.
- The fatty acid is released, and the strong base immediately takes its acidic proton. The fatty acid becomes a carboxylate ion (R–COO⁻), paired with the sodium ion (Na⁺) from the lye. That salt is soap.
- The glycerol oxygen picks up a hydrogen and leaves as part of glycerol.
Step 3 is why saponification runs one way. A carboxylate ion does not react back with an alcohol to rebuild the ester [S140]. Each hydroxide that does its job is used up for good, so the reaction only stops when either the ester links or the hydroxide run out.
Repeat that three times on one triglyceride and you get the overall reaction: one fat plus three sodium hydroxide gives three sodium carboxylates (soap) plus one glycerol [S139]. For triolein (glyceryl trioleate), a fat whose three chains are all oleic acid, the balanced equation is:
C₅₇H₁₀₄O₆ + 3 NaOH → 3 C₁₈H₃₃NaO₂ + C₃H₈O₃ (triolein + sodium hydroxide → sodium oleate + glycerol) [S139][S147]
Count the atoms and both sides match: 57 carbon, 107 hydrogen, 9 oxygen and 3 sodium. That 1 : 3 ratio of fat to hydroxide is the whole basis of lye calculation.
Glycerin, the co-product
Every triglyceride that saponifies releases one glycerol, which soapmakers usually call glycerin. In the worked example it is about 9% of the products by weight. In the traditional factory "kettle" process, soap is boiled, then salted out of solution so it separates from the glycerol and leftover alkali [S139]. Cold process soap has no separation step: everything you put in the mould stays in the bar, so the glycerin stays too.
How long it takes
The reaction is not instant. In a peer-reviewed study of commercial cold process soaps, saponification took about 18–24 hours, followed by three to four weeks of curing [S78]. Module 10 covers trace and temperatures; Module 14 covers curing.
Sodium or potassium: bar or liquid
Which alkali you use decides what kind of soap you get. Sodium hydroxide (NaOH, lye, caustic soda) makes hard, durable bars. Potassium hydroxide (KOH, caustic potash) makes soft soap and liquid soap [S78][S143][S145]. The fatty acid part is the same; only the metal ion in the salt changes: sodium oleate in a bar, potassium oleate in a liquid. The shop calculator offers NaOH for bar soap, KOH for liquid soap and a mix of both for cream soap [S1].
KOH is no gentler. The National Research Council's lab safety summary describes potassium hydroxide as somewhat more corrosive than sodium hydroxide, and both give off considerable heat when they dissolve [S7]. Everything in Module 2 applies to it.
The SAP value
The saponification value (SAP value) of a fat is the number of milligrams of potassium hydroxide needed to neutralize the free acids and saponify the esters in 1 g of it [S146]. It is a lab measurement, made by boiling a weighed sample with a known amount of KOH and titrating what is left over [S146]. That is why certificates of analysis report SAP values in mg KOH/g, even though bar soapmakers use NaOH (Module 4 shows how to read one). Note two things in that definition:
- Free fatty acids count. Any loose fatty acid in the oil uses up alkali too [S146].
- Unsaponifiables don't. Substances lye cannot turn into soap [S80] use no alkali but still add weight, so they lower the SAP value.
Why every oil needs a different amount of lye
Each triglyceride uses exactly three hydroxides, whatever its size. So the lye per gram depends on how many triglyceride molecules fit into a gram, and that depends mainly on chain length. Short chains make light molecules, so more of them fit in a gram, and that gram needs more lye.
This is why you can never swap oils without recalculating, and why a SAP value from your own lot's certificate beats a table value (Module 4).
Converting KOH and NaOH SAP values
One mole of KOH and one mole of NaOH each supply one hydroxide. So to convert a KOH SAP value into NaOH, scale by the ratio of their molar masses: 56.1056 ÷ 39.997 = 1.4028 [S147]. The shop calculator rounds this to 1.403, stores every oil's SAP value as g KOH per g, and divides by 1.403 for bar soap [S1]. The two factors differ by about 0.02%, far less than natural variation between oil lots.
What a soap molecule is
A soap molecule has two very different ends [S139]:
- The head: the carboxylate group (–COO⁻) with its sodium or potassium partner. It is ionic and hydrophilic, attracted to water.
- The tail: the long hydrocarbon chain of the fatty acid, 12 to 18 carbons in most soaps [S143]. It is nonpolar and hydrophobic, avoiding water and dissolving in oils.
Molecules with a water-loving head and an oil-loving tail are surfactants (surface-active agents) [S143]. Soap is the oldest of them.
Micelles and how soap cleans
Most grime on skin is oily, and water alone can't lift it. In water, soap molecules cluster into micelles: spherical groups with the tails tangled together inside and the charged heads facing the water [S139]. Oil and grease dissolve in that oily core. The micelle carries the grease into the water, and it rinses away [S139].
Hard water and soap scum
Hard water carries dissolved calcium and magnesium [S151]. Those ions swap in for sodium, turning soluble sodium soap into insoluble calcium and magnesium soaps. That insoluble material is the ring around a bathtub and the grey tinge on white laundry [S139]. Soap tied up as scum can't clean, so hard water needs a lot more soap to produce a lather [S151]. Synthetic detergents were developed partly to solve this: their sulfonate heads do not form insoluble salts with calcium and magnesium [S139].
The same chemistry happens inside your batch if you mix lye with hard tap water. Dissolved calcium and iron have also been shown to speed up orange spotting in soap [S92]. That is one reason this course uses distilled water (Modules 2 and 4).
Why soap is alkaline
Fatty acids are weak acids. Most carboxylic acids have a dissociation constant around 10⁻⁴ to 10⁻⁵, so only a small fraction of their molecules give up a proton in water [S141]. Sodium hydroxide is a strong base. The salt of a weak acid and a strong base makes a basic solution: its anion takes protons from water and releases hydroxide ions [S142]. Dissolve soap in water and the same thing happens. The carboxylate pulls protons from water and leaves hydroxide behind, so soap solutions are alkaline [S142][S145].
This is a property of soap itself. It is not a sign of leftover lye. Even a perfectly balanced bar is alkaline.
Typical numbers. Published measurements agree that bar soap sits well above neutral:
| Measurement | pH | Source |
|---|---|---|
| Review of skin cleansers: soap | typically 8.5–11.0 | [S143] |
| 64 soaps from shops, 1% solutions: most samples, including the one homemade soap | 9–10 | [S144] |
| Twelve cold process tallow bars (some with non-soap additives) from a 2026 study | 9.75–10.43 | [S145] |
| Healthy skin | slightly acidic, about 4.0–6.0 (one study gives 5.4–5.9) | [S143][S144] |
So a true soap can't match skin's pH. Products near pH 5.5 to 7 are synthetic detergents ("syndets"), not soap [S143]. Never describe a soap as "pH balanced" or "neutral". Module 19 covers claims, and Module 15 covers testing a finished bar.
Fatty acids: from structure to bar quality
Module 4 profiles the eight soap fatty acids and the oils that carry them. Here is the chemistry behind those profiles, in four rules:
- Chain length sets solubility and lather. Short saturated chains (lauric C12, myristic C14) make more soluble soaps that lather quickly and clean strongly. Longer C16–C18 chains (palmitic, stearic) make a longer-lasting bar, but solubility and quick lather fall as chains grow [S78]. Chains of 10 carbons or fewer can smell and irritate skin [S78].
- Straight chains pack; bent chains don't. Saturated chains are straight and pack tightly, so they melt high. Each cis double bond puts a bend in the chain, so the molecules pack loosely and melt lower [S77]. Saturated soaps (lauric, myristic, palmitic, stearic) therefore give hardness; oleic, linoleic and linolenic soaps give softer, more conditioning bars [S78][S86].
- Double bonds invite oxygen. Unsaturated chains oxidize during saponification, curing and storage, causing off odours and discoloration [S78]. Susceptibility rises steeply with the number of double bonds [S79]. Shelf life falls from oleic (one double bond) to linoleic (two) to linolenic (three).
- Ricinoleic acid is the odd one out. It has 18 carbons, one double bond and a hydroxyl (–OH) group on carbon 12 [S83]. That extra polar group is unusual among soap fatty acids. Calculators count castor's ricinoleic acid towards bubbly and creamy lather and conditioning [S86].
| Fatty acid | Structure | Main contribution |
|---|---|---|
| Lauric, myristic | C12:0, C14:0 | Hardness, strong cleansing, quick bubbly lather |
| Palmitic, stearic | C16:0, C18:0 | Hardness, long-lasting bar, stable creamy lather |
| Ricinoleic | C18:1 + OH | Lather, conditioning |
| Oleic | C18:1 | Mildness, conditioning, good shelf life |
| Linoleic, linolenic | C18:2, C18:3 | Conditioning, but oxidize fastest |
Structures: [S77][S83]. Contributions: [S78][S86].
Too much lye: why it is dangerous
Saponification uses lye stoichiometrically: a fixed amount of hydroxide for each gram of fat. Once every ester link is broken, any extra NaOH has nothing left to react with. It stays in the bar as free sodium hydroxide, the same corrosive chemical you protect yourself from in Module 2 [S2]. A bar like this is called lye-heavy.
Soap standards treat free caustic alkali as a defect. India's toilet soap standard caps it at 0.05% of the soap by mass [S150], and the East African standard at 0.1%, alongside the requirement that toilet soap must not irritate skin [S149]. These are not Canadian rules, but they show the scale: well-made soap should have essentially no free lye. The authors of a 2026 soap study note that excess free caustic alkali makes soap harsh and irritating to skin [S145], and alkaline soaps in general can damage the skin's barrier [S143].
Superfat: the safety margin
A superfat is the part of the oils you choose to leave unreacted, by weighing a little less lye than those oils could use up [S1]. The calculator calls 5% a common starting point and treats the superfat as a safety margin that should stay above 1% [S1]. The researchers in the 2018 cold process study used 6% [S78].
The margin covers real uncertainty:
- SAP values vary. Oils differ by harvest, refining and supplier. Module 4 showed a tallow lot at the bottom of its Codex range wiping out a 5% superfat entirely.
- Weighing errors happen. A 5% superfat on the 500 g batch absorbs a 3.4 g overweigh before the bar goes lye-heavy (67.71 − 64.33 g), but not the 10 g error above.
- Purity varies. See below.
Module 6 covers choosing a superfat. The rule for now: always use one, and never treat it as permission to weigh carelessly.
Lye purity
Lye is not always 100% hydroxide. One lab grade of NaOH is more than 97% sodium hydroxide with less than 3% sodium carbonate [S3]. NaOH and KOH both absorb moisture and carbon dioxide from the air [S7], slowly turning into carbonate [S4]. Impure or old lye therefore delivers less sodium hydroxide than you weighed. That makes the bar softer and more superfatted, not lye-heavy. The calculator lets you account for purity [S1].
Keep lye sealed (Module 2) so its purity stays where your supplier's certificate says it is.
A very short history
Soap-like materials made from fats and ashes date back to the Babylonians, around 2800 BC by one chemistry text [S139] and 3000–2000 BC by a 2022 review [S143]. Wood ash supplied the alkali until the early 1800s, when the Leblanc process made sodium carbonate widely available [S139]. Mass production followed in the 19th century [S143].
Putting it together
A 500 g olive batch is still soft and greasy after two days. Is it lye-heavy? Lye-heavy means too much hydroxide for the fat. A soft, oily bar points the other way: too little lye, or lye weakened by absorbing carbon dioxide in a poorly sealed tub [S4][S7]. A pure olive bar is also naturally slow to firm up (Module 4). Diagnose (Module 15); never add lye on a guess.
Key terms
- Triglyceride: glycerol joined to three fatty acids by ester links.
- Ester: the link between an acid's C=O carbon and an alcohol's oxygen.
- Saponification: splitting esters with a strong base, giving carboxylate salts (soap) and an alcohol (here glycerol).
- Glycerin (glycerol): the three-carbon alcohol released by saponification; it stays in cold process soap.
- Carboxylate head / hydrocarbon tail: the water-loving and oil-loving ends of a soap molecule.
- Surfactant: a molecule with a hydrophilic head and a hydrophobic tail.
- Micelle: a cluster of soap molecules with tails inside and heads facing the water.
- Hard water: water carrying calcium and magnesium, which form insoluble soap scum.
- SAP value: mg KOH needed to neutralize the free acids and saponify the esters in 1 g of fat.
- 1.403: the shop calculator's factor for converting KOH to NaOH (molar-mass ratio 1.4028).
- Lye-heavy: containing more lye than the fats can use; effective superfat below zero.
- Superfat: the share of oil left unsaponified on purpose, your safety margin.
Summary
- Fats are triglycerides. A strong base breaks their three ester links: 1 fat + 3 NaOH → 3 soap + 1 glycerol [S139][S140].
- Saponification runs one way and needs about a day; fresh soap is still caustic [S78][S20][S21].
- NaOH makes bars; KOH makes soft and liquid soap and is at least as corrosive [S78][S143][S7].
- A SAP value is mg KOH per gram of fat [S146]. Shorter chains mean more lye per gram. Convert KOH to NaOH by dividing by 1.403 [S1].
- Soap molecules have a carboxylate head and a hydrocarbon tail, and they lift grease in micelles. Calcium and magnesium in hard water turn soap into scum [S139][S151].
- Soap is alkaline because it is the salt of a weak acid and a strong base; typical bars measure about pH 9–10 [S142][S143][S144].
- Excess lye stays as free, corrosive NaOH. Always use a superfat, weigh carefully and keep Module 2's PPE on [S1][S2].