Lye calculator for cold process soap
This lye calculator works out how much sodium hydroxide (NaOH) or potassium hydroxide (KOH) and water your soap recipe needs. For 700 g olive oil and 300 g coconut oil with 5 % superfat you need 142.2 g NaOH and 288.7 g water at a 33 % lye solution. The saponification values come from the Codex Alimentarius standards for edible oils and fats.
Source: Codex Alimentarius – CODEX STAN 210-1999 Standard for Named Vegetable Oils, amended 2015, Table 2: saponification value (read 09.10.2026). Updated: .
How it is calculated
Lye = oil × SAP value × (1 − superfat). The saponification (SAP) value says how many milligrams of potassium hydroxide one gram of oil binds. For sodium hydroxide multiply by 39.997 ÷ 56.106 = 0.7129 – the ratio of the molar masses of NaOH and KOH.
SAP values of common oils
| Oil or fat | SAP value (Codex range) | NaOH per 100 g oil (mid value) |
|---|---|---|
| Olive oil (virgin) | 184–196 mg KOH/g | 13.54 g |
| Coconut oil | 248–265 mg KOH/g | 18.29 g |
| Palm oil | 190–209 mg KOH/g | 14.22 g |
| Sunflower oil | 188–194 mg KOH/g | 13.62 g |
| Lard | 192–203 mg KOH/g | 14.08 g |
| Tallow | 190–202 mg KOH/g | 13.97 g |
The ranges are from Codex Alimentarius: CXS 210-1999 for named vegetable oils, the Codex olive oil standard and CXS 211-1999 for lard and tallow. Natural oils vary, so the calculator uses the middle of each range and shows the lye amount for the lowest and highest values. A superfat of a few percent leaves some oil free – it covers that variation and makes the soap milder.
Examples
- 700 g olive oil + 300 g coconut oil, 5 % superfat, 33 % lye solution: 142.2 g NaOH and 288.7 g water (range 137.6–146.8 g NaOH).
- Castile soap, 1000 g olive oil, 5 % superfat: 128.7 g NaOH, 261.3 g water.
- Liquid soap, 700 g olive + 300 g coconut, KOH 90 % pure, 3 % superfat, 30 % solution: 226.3 g KOH, 528.0 g water.
- 1000 g coconut oil without superfat: 182.9 g NaOH.
To scale a recipe up or down, the proportion calculator helps; the mass percent calculator shows the strength of a solution.
Safety and limits
Sodium and potassium hydroxide burn skin and eyes. Wear goggles and gloves, work in a ventilated room, pour the lye slowly into cold water and keep children and pets away. The SAP values describe food-grade oils; fragrance oils, additives and oils not listed (such as castor or shea butter) need the value from your supplier. Use the result as an estimate and check it before you make soap.
Frequently asked questions
How do I calculate lye for soap?
Multiply each oil by its SAP value, add them up, convert to NaOH with 0.7129 and subtract the superfat. 1000 g olive oil with 5 % superfat needs 128.7 g NaOH.
What is the SAP value of olive oil?
Codex gives 184–196 mg KOH per gram for virgin olive oil; the middle value 190 equals 0.1354 g NaOH per gram of oil.
How much water do I use with lye?
With a 33 % lye solution, water = lye × 67 ÷ 33 – about twice the lye. 142.2 g NaOH takes 288.7 g water.
What superfat should I use?
Follow your recipe; the calculator starts at 5 %. A superfat leaves part of the oil free and also covers the natural spread of the SAP values.
NaOH or KOH?
Sodium hydroxide makes hard bar soap, potassium hydroxide soft or liquid soap. KOH needs about 1.4 times as much as NaOH by weight.
Why does the calculator show a range?
Codex lists each oil as a range. With the lowest and highest values, 700 g olive and 300 g coconut oil need 137.6–146.8 g NaOH.
Sources and legal basis
- Codex Alimentarius – CODEX STAN 210-1999 Standard for Named Vegetable Oils, amended 2015, Table 2: saponification value (read 09.10.2026)
- Codex Alimentarius Volume 8, Fats, Oils and Related Products (2nd ed. 2001): olive oil standard and CODEX-STAN 211-1999 Named Animal Fats – saponification values (read 09.10.2026)
As of: · Editorial policy
Related tools
- Mass Percent CalculatorMass percent calculator: mass fraction from solute and solvent mass, the solute mass needed, ppm, per mille and a mixing cross for two solutions, with values.
- Density calculator: density, mass and volumeCalculate density, mass or volume with ρ = m/V – step-by-step, with unit conversion from g/cm³ to kg/m³ and lb/ft³ and densities of water, metals and plastics.
- Cups to grams converterConvert cups, tablespoons and teaspoons to grams for flour, sugar, butter, milk, rice and more – US cups, metric cups and USDA weights. Grams to cups too.
- Proportion CalculatorSolve direct and inverse proportion problems (rule of three) online: find x from a ↔ b and c, with the unit value and step-by-step working.
- kg to lbs converterConvert kg to lbs and back: 1 kg = 2.2046 lb. Shows pounds and ounces, stone and pounds, grams, tons and a kg to lbs chart – exact to the legal definition.
- Brick calculatorBrick calculator: number of bricks with waste and mortar needed for a wall from length, height, openings, brick size and joint. UK, US and metric bricks.
- Road trip cost calculatorRoad trip cost calculator: gas, driving time, lodging, food and tolls for the whole trip, with cost per person and per mile. Free, no sign-up needed.
- U-value calculatorU-value calculator: work out the thermal transmittance of a wall, roof or floor from layer thickness and conductivity, with heat loss and annual energy.
- Hectares to acres converterHectares to acres: multiply by 2.4711, so 10 ha = 24.71 acres. Convert hectares to acres or acres to hectares, with square meters, square feet and a chart.