Understanding the soap lye calculator — concept and principle
This calculator works out how much sodium hydroxide (for bar soap) or potassium hydroxide (for liquid soap) is needed to saponify a blend of oils, using each oil's saponification (SAP) value, a superfat and the lye purity, and how much water to dissolve it in. Soap makers use it to formulate safe recipes.
How it is calculated
KOH needed (g) = Σ oil (g) × SAP ÷ 1,000
NaOH = KOH × 39.997 ÷ 56.106
Lye to weigh = full amount × (1 − superfat) ÷ purity
Water = lye × (100 − c) ÷ c, for lye concentration c (%)
- SAP values in mg KOH per g of oil; preset values are mid-points of Codex ranges.
The principle
Saponification splits fats (triglycerides) with a strong base into soap and glycerol. The SAP value measures how much KOH one gram of a particular fat consumes; it depends on the fat's average chain length. NaOH reacts mole for mole with the same fatty acids, so its amount follows from the ratio of molar masses. A superfat deliberately leaves some oil unreacted, making the bar milder and covering natural variation in SAP values.
Worked example
Default inputs: 600 g olive (SAP 190), 250 g coconut (256.5), 150 g palm (199.5); superfat 5%; NaOH 100% pure; 33% lye concentration.
- KOH for full saponification = 600 × 0.190 + 250 × 0.2565 + 150 × 0.1995 = 208.1 g; average SAP = 208.1.
- NaOH = 208.05 × 39.997 ÷ 56.106 = 148.3 g.
- With 5% superfat: 148.3 × 0.95 = 140.9 g of lye to weigh.
- Water = 140.9 × 67 ÷ 33 = 286.1 g; total oils 1,000 g; batch 1,427 g.
| Oil 1 weight (g) | Lye to weigh (g) |
|---|---|
| 150 | 83 |
| 300 | 102.3 |
| 450 | 121.6 |
| 600 | 140.9 |
| 750 | 160.2 |
| 900 | 179.5 |
| 1,200 | 218.1 |
How to read the result
Weigh lye and oils precisely on a scale; small errors in lye change the finished soap a lot. Superfats of a few percent are common for bar soap. Coconut oil has a high SAP value because its fatty acids are short, so it needs more lye per gram than olive oil.
Common mistakes
- Using KOH SAP values directly for NaOH without the molar-mass conversion.
- Forgetting the purity of commercial KOH, which is often below 100%.
- Measuring by volume instead of weight.
Frequently asked questions
What is a SAP value?
The milligrams of KOH needed to saponify one gram of oil.
Why use a superfat?
It leaves some free oil for a milder soap and covers variation in oils.
Why does coconut oil need more lye?
Its fatty acids are shorter, so each gram contains more molecules to react.
Can I use KOH for bar soap?
KOH makes soft or liquid soap; NaOH makes hard bars.
Sources: Codex Alimentarius, Standard for Named Vegetable Oils (CODEX-STAN 210-1999) and Standard for Olive Oils (CODEX STAN 33), as reproduced by FAO