Saponification explained

Fat plus lye makes soap and glycerin. The interesting part is why coconut oil needs a third more lye than olive, and you can prove that from the fatty acids.

Saponification is the reaction at the center of soapmaking, and it is simple: a fat plus a strong alkali gives you soap plus glycerin. Everything a lye calculator does is arithmetic on top of that one sentence. The next question is the one worth understanding: why does one oil need half as much lye per gram as another? That's where saponification values come from, and it's why swapping an oil means recalculating rather than guessing.

What happens in the reaction

The oils you soap with are triglycerides: a small glycerol backbone with three fatty acid chains attached. Sodium hydroxide breaks those three chains off the backbone and takes their place. The chains, now paired with sodium, are soap. That's what a soap molecule is: a fatty acid salt. The freed backbone is glycerin, which stays in the bar and is a large part of why handmade soap feels different from many commercial bars, which are either synthetic detergent rather than soap, or soap made by a process that removes the glycerin to sell separately.

So one triglyceride consumes three molecules of alkali. The reaction starts the moment lye meets oil, and most of it is done within a day or two, sooner in soap that gels; there's no single figure, because it depends on the recipe and the temperature. Once it's done there is no lye left, which is why a properly made, cured bar is safe on skin even though it was made with something that would burn you. The superfat is what guarantees the lye runs out before the oil does.

Why every oil needs a different amount of lye

Because the reaction counts molecules, not grams. Each triglyceride takes three alkali molecules regardless of how big it is. So what matters is how many triglyceride molecules there are in a gram of your oil, and that depends on how heavy they are.

Fatty acid chains vary in length. Lauric acid, the dominant chain in coconut oil, weighs 200 g/mol. Stearic acid, common in shea and cocoa butter, weighs 284 g/mol, about 42% more. Light molecules mean more of them per gram, more of them means more lye. That's the entire mechanism, and it's why 1,000 g of coconut oil needs 183 g of sodium hydroxide to fully saponify while the same weight of olive oil needs only 135 g.

The formula, if you want it

A triglyceride weighs three fatty acids plus a glycerol backbone, minus the three waters lost when they joined: MW = 3 × MW(mean fatty acid) + 38.03. Saponifying one takes three potassium hydroxides, so the saponification value in mg KOH per gram of oil is 3 × 56,106 ÷ MW. Everything else on this page is that expression applied to real oils.

Proof, rather than assertion

Fatty acids determine the SAP value, and you can see it in the numbers. This site holds both for 94 oils (the published saponification value and the fatty-acid profile), so the claim is testable: work out the mean fatty acid weight from the profile, put it through the formula above, and see whether it lands on the published value.

It does. Of the 53 oils with a reasonably complete profile, 43 land within 3% of their published value:

OilMean fatty acid (g/mol)Published SAPPredicted from fatty acidsDifference
Cocoa butter275.7194194.6+0.3%
Castor oil297.1180181.1+0.6%
Beef tallow270.4200198.2-0.9%
Olive oil278.6190192.7+1.4%
Sunflower oil279.2189192.2+1.7%
Lard274.3198195.5-1.3%
Palm oil270.2199198.3-0.3%

SAP in mg KOH per gram. Published values: SoapCalc oil list. Predictions come from the fatty-acid profile alone, through the formula above; the two numbers never touch each other in the code.

Cocoa butter is predicted to within 0.3% from nothing but its fatty acids. That is the mechanism confirmed on real data, not a plausible story.

The misses are the interesting part

The other 10 don't land within 3%, and nor do the lauric oils whose profiles were too incomplete to include in that count. The misses go in two distinct directions, and each tells you something true about the oil or about the data.

Predicted too high: the oil isn't all fat

OilPublished SAPPredictedDifference
Shea butter179190.5+6.4%
Grapeseed oil181192.3+6.2%

When the fatty acids predict more lye than the oil consumes, part of that oil is not a triglyceride at all. Shea butter is the textbook case: it carries a substantial unsaponifiable fraction (plant sterols and triterpene alcohols, commonly 5–15%), which is inert to lye. The fatty acids in shea do behave exactly as the model says; there is just less fatty acid per gram than the profile implies. That unsaponifiable matter is also, incidentally, much of why shea is prized: it survives saponification and stays in the bar.

Predicted too low: the profile is incomplete

OilPublished SAPPredictedDifference
Coconut oil (76°)257237.1-7.8%
Palm kernel oil247233.5-5.5%

Every oil in that group is a lauric tropical fat, and they all need more lye than their listed fatty acids can account for. The reason is a limitation of the data rather than the chemistry: the standard eight-column fatty acid profile (lauric through linolenic, as in SoapCalc) has no column for the shorter acids. Coconut and palm kernel oil contain meaningful caprylic (C8) and capric (C10) acid, which weigh 144 and 172 g/mol; leaving them out makes the computed average too heavy and the prediction too light. The published SAP value, which was measured on the actual oil, includes them.

That's worth knowing beyond this page: the soap quality numbers (hardness, cleansing, bubbly) are sums of those same eight acids, so for coconut and palm kernel they are quietly working from an incomplete picture too. It doesn't make them useless, and it is a reason to treat them as comparative indices rather than measurements.

Murumuru butter used to sit in this table, predicted 15.3% low against SoapCalc's 275 despite a complete profile. That time the published value was wrong: suppliers' lab results put murumuru at 220–250 mg KOH/g, so this site uses 238, which the profile predicts to within 2.1%.

Where published SAP values come from, and why they vary

A saponification value is measured, not calculated: a lab saponifies a sample with a known excess of alkali and titrates back what's left. The result is specific to that sample. An oil is an agricultural product, so different crops, regions, seasons and refining processes give slightly different numbers. That's why this site lists a range alongside each value where we're confident of it: olive oil is published anywhere from 184 to 196 mg KOH per gram, and a calculator has to pick a single figure out of that spread (this site uses 190).

This is the real reason two calculators disagree by a gram or two, and the real reason superfat exists. A 5% superfat is, among other things, a bet that your oil isn't at the very bottom of its published range. The superfat guide works out exactly what happens when that bet loses.

Why SAP is quoted in KOH even for bar soap

Saponification values are laboratory measurements, and the lab standard uses potassium hydroxide, so the published number is milligrams of KOH per gram of oil, whether you're making liquid soap or bars. For sodium hydroxide the calculator scales it by the ratio of the two molecular weights, 40 ÷ 56.1 = 0.71301. That single constant is the only difference between the NaOH and KOH columns in any lye table, and it's why NaOH figures are always about 29% smaller.

What this means at the bench

  • Substituting an oil means recalculating. Swap palm for coconut at the same weight and you've under-dosed that oil's lye by 23% — the bar would be greasy and prone to going rancid. Run it through the lye calculator instead.
  • Pick the right variant. "Coconut oil" means 76° coconut at 257; fractionated coconut is 325, a completely different number for something sold under a similar name.
  • Don't chase precision the data doesn't have. Arguing over the third decimal place of a SAP value is pointless when the published range spans several percent. Weigh accurately, keep a sensible superfat, and the margin absorbs the rest.