soapformulator
EN
Reference

Every formula, and where it comes from

The calculator is a thin layer over a small, open formula library. This page is that library written out. Conventions are labelled as conventions; constants carry their source.

On this page

Saponification and lye

SAP_NaOH (mg/g) = SAP_KOH × 39.997 ÷ 56.106                # molar masses, IUPAC 2013
KOH_100 (g)     = Σ oilᵢ (g) × SAP_KOHᵢ ÷ 1000               # SAP defined as mg KOH per g fat
KOH_sf          = KOH_100 × (1 − superfat ÷ 100)
NaOH to weigh   = KOH_sf × (1 − f_KOH) × 39.997 ÷ 56.106 ÷ (purity_NaOH ÷ 100)
KOH to weigh    = KOH_sf × f_KOH ÷ (purity_KOH ÷ 100)
superfat from a given lye = (1 − lye_supplied_KOHeq ÷ KOH_100) × 100

Water, three ways, and master batches

water = oils × p ÷ 100                    # p = water as % of oils (38 is the old default)
water = lye × (100 − c) ÷ c               # c = lye concentration % (33 is our default)
water = lye × r                           # r = water : lye ratio
c = lye ÷ (lye + water) × 100;  r = water ÷ lye;  p = water ÷ oils × 100

Master batch at strength s %:
solution = lye ÷ (s ÷ 100);  water_in = solution − lye;  water_add = water − water_in

Liquids replacing water:
plain water = max(0, water − Σ liquidᵢ × water%ᵢ ÷ 100)
  • Dunn, Kevin M. Scientific Soapmaking: The Chemistry of the Cold Process. Clavicula Press, 2010. Lye solution concentration and its effect on trace and gel.
  • Community convention: "full water" = 38 % of oil weight, the default that most hobby calculators have used since the 2000s; roughly a 27–28 % lye solution for a typical bar recipe. — A convention, not a chemical constant. Lye concentration is the better control variable because it does not drift with the oil blend.

Acids and fatty liquids

NaOH consumed (g) = mass × purity × n × 39.997 ÷ M_acid
  citric acid (anhydrous, triprotic, M 192.124):  0.6246 g NaOH per g   (0.8760 g KOH)
  citric acid monohydrate (M 210.139):            0.5710
  acetic acid (M 60.052):                         0.6660   → 5 % vinegar: 0.0333 per g
  lactic acid (M 90.078):                         0.4440
effective superfat = (oils × sf ÷ 100 + fat from milks) ÷ (oils + fat from milks) × 100

Deriving a saponification value from composition

M̄_fatty acid   = Σ wᵢ ÷ Σ(wᵢ ÷ Mᵢ)             # wᵢ = mass % of each acid: the number average
M_triglyceride = 3 × M̄_fatty acid + 38.049     # glycerol 92.094 less three waters
SAP (mg KOH/g) = 3 × 56 106 ÷ M_triglyceride    # three KOH per triglyceride

free fatty acids (stearic acid, lauric acid and the like) take one KOH each:
SAP = 56 106 ÷ M̄_fatty acid

Validated on the 36 Codex oils where the saponification range and the
fatty-acid ranges come from the same standard:
  median absolute error  0.84 %
  90th percentile        2.44 %
  worst                  3.57 %
  bias                  +0.55 %   # high: unsaponifiable matter
A derived value therefore carries a ±3 % band, and is offered only where the
published profile sums to between 95 % and 115 %.

How well the published data pins the lye down

KOH_low  = Σ(oilᵢ × SAP_minᵢ ÷ 1000)       # every oil at the bottom of its published range
KOH_high = Σ(oilᵢ × SAP_maxᵢ ÷ 1000)       # ...and at the top
KOH_mid  = Σ(oilᵢ × SAP_repᵢ ÷ 1000)       # what the lye is actually weighed from

supplied (as KOH equivalent) = KOH_mid × (1 − sf ÷ 100)

superfat actually achieved:
  worst case = (1 − supplied ÷ KOH_low)  × 100   # fat needs LESS lye than was weighed
  best case  = (1 − supplied ÷ KOH_high) × 100   # fat needs MORE, so more is left unsaponified

smallest nominal superfat whose worst case clears a floor f:
  sf ≥ (1 − (1 − f) × KOH_low ÷ KOH_mid) × 100

Fatty-acid profile, soap qualities, iodine and INS

profile = Σ (oilᵢ ÷ total oils) × fatty acidsᵢ           # mass-weighted percent
hardness     = lauric + myristic + palmitic + stearic        (29–54)
cleansing    = lauric + myristic                             (12–22)
conditioning = oleic + linoleic + linolenic + ricinoleic     (44–69)
bubbly       = lauric + myristic + ricinoleic                (14–46)
creamy       = palmitic + stearic + ricinoleic               (16–48)
iodine value = Σ wᵢ × IVᵢ                                    (41–70)
INS          = Σ wᵢ × (SAP_KOHᵢ − IVᵢ)                       (136–165, ideal 160)
  • Community convention for soap qualities, in continuous use in hobby lye calculators since c. 2005: hardness = lauric + myristic + palmitic + stearic; cleansing = lauric + myristic; conditioning = oleic + linoleic + linolenic + ricinoleic; bubbly lather = lauric + myristic + ricinoleic; creamy lather = palmitic + stearic + ricinoleic. Recommended bands: hardness 29–54, cleansing 12–22, conditioning 44–69, bubbly 14–46, creamy 16–48, and iodine value 41–70. — A convention, not a measurement. It ignores superfat, water, cure and additives, and treats every fatty acid in a group as equal. The iodine value itself is measured (AOCS Cd 1-25); the 41–70 band beside it belongs to this convention, not to the method.
  • AOCS Official Method Cd 1-25, "Iodine Value of Fats and Oils, Wijs Method". g I₂ absorbed per 100 g of fat; a measure of unsaturation.
  • McDaniel, Robert S. Essentially Soap. Krause Publications, 2000. INS = saponification value (mg KOH/g) − iodine value; recommended range 136–165, ideal 160.

Fragrance load, IFRA and allergens

f = oils × p ÷ 100                          # p = % of oils (PPO)
f = base × p ÷ (100 − p)                    # p = % of finished batch; base = everything but fragrance
% of finished product = f ÷ (base + f) × 100 ≤ certificate maximum for the product's IFRA category
blends (conservative): Σ loadᵢ ÷ maxᵢ ≤ 1
allergen % in product = Σ (fragrance % × allergen % in fragrance ÷ 100) ÷ (1 − cure mass loss)
declare if > 0.001 % leave-on, > 0.01 % rinse-off
suggested on a pick: 3 % of oils, or less to stay under the maximum: f = min(oils × 0.03, base × M ÷ (100 − M))

Mould sizing

V (mL) = l × w × h  |  π (d ÷ 2)² h  |  cavities × volume each     # 1 in³ = 16.387064 mL
batch (g) = V × ρ × fill                                        # ρ ≈ 1.0 g/mL, calibrate
oils = batch ÷ (1 + lye/oil + water/oil + additives/oil + fragrance/oil)
for comparison: the "in³ × 0.4 oz" rule assumes full water and 5 % superfat
  • Volume of a rectangular prism V = l × w × h; of a cylinder V = π × (d ÷ 2)² × h. 1 in³ = 16.387064 mL.
  • Empirical default. Fresh cold-process soap batter has a density close to water, ≈ 0.95–1.0 g/mL; the community rule "in³ × 0.4 = oz of oils" implies about 0.69 g/mL of oils, which is ≈ 1.05 g/mL of batter at 38 % water and 5 % superfat. Calibrate by weighing a filled mold once. — Density varies with whipping, fragrance, temperature and how full the mold is poured. Treat the default as a starting point and calibrate.

Liquid soap dilution

solids = oils + pure KOH                 # mass is conserved in saponification
paste concentration = solids ÷ paste × 100
water to add = solids ÷ (target ÷ 100) − paste
  • Conservation of mass in saponification: the soap and glycerol formed weigh exactly what the fat and hydroxide weighed. Solids in a paste are therefore taken as oils + pure lye; the remainder is water.
  • Failor, Catherine. Making Natural Liquid Soaps. Storey Publishing, 2000. Paste method, dilution ratios and sequestering.

Where a derived saponification value comes from

40 oils in the database have no saponification value in any primary document we could use. Rather than leave them out of the calculator or invent a number, the figure is calculated from the oil's own measured fatty-acid composition. That is not a guess: three moles of hydroxide saponify one mole of triglyceride, and the molar mass of the triglyceride follows from the chain lengths of the acids in it. Composition determines the value.

The question is how accurate it is, and that is measurable. The fair test is the Codex subset of the database, 36 named oils where the saponification range and the fatty-acid ranges were published by the same body from the same material. Against those, the method's median absolute error is 0.84 %, its ninetieth percentile 2.44 % and its worst case 3.57 %. It runs slightly high, by 0.55 % on average: it assumes pure fat, while a crude oil carries a little unsaponifiable matter that lowers the measured value. High is the lye-heavy direction, and the band a derived value carries covers it. The median published range in the same database is ±2.9 % of its own centre, so a derived value is about as well determined as one read off a standard.

Measured against the rest of the database the apparent error is larger: a median of 1.7 % and a worst case of 22 %. That is not the method failing. The largest disagreements are the same records the consistency check already flags as internally contradictory, where a published saponification value sits beside a composition that cannot produce it. Comparing against those conflates method error with data error, which is why the validation uses the Codex subset alone.

Every derived value is labelled as derived wherever it appears, carries a ±3 % band into the uncertainty panel, and is set aside entirely the moment you enter a measured value from your own lot.

Why the lye carries a range

A saponification value is not a constant. Codex gives coconut oil 248–265 mg KOH/g because the fat genuinely varies with origin, season and refining. Every soap calculator hides that by printing one number to one decimal place, which is false precision: the figure looks like a measurement of your oil and is really the midpoint of somebody else's survey.

Carried through, the band lands on the number that matters. Superfat is the margin between a mild bar and a caustic one, and it is exactly what the uncertainty eats. A recipe asking for 3 % superfat on ordinary olive and coconut oil can really be anywhere from −0.2 % to 6 %, and the negative end is a lye-heavy bar. That is not a reason to distrust the arithmetic; it is the reason the craft settled on about 5 % superfat, and as far as we can tell no calculator has ever shown the working behind that habit.

Taking every oil at the same end of its range at once is a bound, not a confidence interval. Real lots are not perfectly correlated, so the achievable spread is narrower, and the arithmetic says nothing about how likely either end is. The only thing that collapses it is a measurement: enter the saponification value from your lot's certificate of analysis and that oil stops contributing any uncertainty at all.

Conventions we label as conventions

The five "soap qualities" are sums of fatty-acid groups compared with bands that hobby calculators have used since the mid-2000s. They are useful for comparing recipes and useless for predicting an actual bar: they ignore superfat, water, cure, additives and process, and treat every acid in a group as equal. The 38 % "full water" default and the "× 0.4" mould rule are habits, not chemistry. We implement all of them exactly because makers compare in that language, and we say what they are.

Hear when something new ships

A short note whenever something new ships. No newsletter, nothing sold, one click to stop.