{
  "id": "cosmetic-formula",
  "version": "e73d959d4028",
  "status": "published",
  "name": "Cosmetic Formula Calculator",
  "question": "How do I weigh a cosmetic formula?",
  "summary": "Turns a cosmetic or skincare formula in percent (w/w) into grams for any batch size, tops it up with water to 100% if you like, and lists the ingredients in label order.",
  "category": "chemistry",
  "subcategory": "solutions",
  "url": "https://www.acalculator.org/chemistry/cosmetic-formula-calculator",
  "markdown": "https://www.acalculator.org/chemistry/cosmetic-formula-calculator.md",
  "kind": "function",
  "method": "weight of an ingredient = batch weight × its percent ÷ 100. With top-up water: water % = 100 − the sum of the listed percents.",
  "assumptions": [
    "Percents are by weight (w/w) of the finished batch, the usual way cosmetic formulas are written.",
    "Label order is descending weight, then ingredients at 1% or less in the order typed (21 CFR 701.3(f))."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "w": {
        "title": "Batch size",
        "description": "The total weight of product you want to make.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "mass",
        "minimum": 0.000001,
        "maximum": 1000000
      },
      "qs": {
        "title": "Top up with water to 100%",
        "description": "Add water for whatever the listed ingredients leave below 100%.",
        "type": "boolean"
      },
      "items": {
        "title": "Ingredients",
        "description": "One row per ingredient: its name and its percent of the batch weight (w/w).",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "i": {
              "title": "Ingredient",
              "description": "The ingredient’s name, as you want it in the list.",
              "type": "string",
              "maxLength": 40
            },
            "p": {
              "title": "Percent (w/w)",
              "description": "The ingredient’s share of the batch weight.",
              "type": "number",
              "x-unit": "percent",
              "exclusiveMinimum": 0,
              "maximum": 100
            }
          }
        }
      }
    }
  },
  "outputs": {
    "summary": {
      "label": "Batch",
      "description": "How many ingredients and the batch weight in grams.",
      "format": "text"
    },
    "grams": {
      "label": "Weigh out",
      "description": "Each ingredient’s weight in grams, in label order, to 4 significant figures.",
      "format": "text"
    },
    "waterG": {
      "label": "Water (g)",
      "description": "The water that tops the formula up to 100%.",
      "format": "number"
    },
    "waterPct": {
      "label": "Water (%)",
      "description": "The water’s share of the batch.",
      "format": "number"
    },
    "listed": {
      "label": "Listed ingredients (%)",
      "description": "The percents you typed, added up.",
      "format": "number"
    },
    "batchG": {
      "label": "Batch (g)",
      "description": "The batch size in grams.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "w": "250 g",
      "qs": true,
      "items": [
        {
          "name": "Sweet almond oil",
          "pct": 15
        },
        {
          "name": "Emulsifying wax",
          "pct": 5
        },
        {
          "name": "Glycerin",
          "pct": 3
        },
        {
          "name": "Preservative",
          "pct": 1
        },
        {
          "name": "Fragrance",
          "pct": 0.5
        }
      ]
    },
    "outputs": {
      "summary": "6 ingredients, 250 g in all",
      "grams": "Water: 188.8 g (75.5%); Sweet almond oil: 37.5 g (15%); Emulsifying wax: 12.5 g (5%); Glycerin: 7.5 g (3%); Preservative: 2.5 g (1%); Fragrance: 1.25 g (0.5%)",
      "waterG": 188.75,
      "waterPct": 75.5,
      "listed": 24.5,
      "batchG": 250
    },
    "text": "Weigh out: Water: 188.8 g (75.5%); Sweet almond oil: 37.5 g (15%); Emulsifying wax: 12.5 g (5%); Glycerin: 7.5 g (3%); Preservative: 2.5 g (1%); Fragrance: 1.25 g (0.5%)."
  },
  "examples": [
    {
      "given": {
        "w": 0.25,
        "qs": true,
        "items": [
          {
            "name": "Sweet almond oil",
            "pct": 15
          },
          {
            "name": "Emulsifying wax",
            "pct": 5
          },
          {
            "name": "Glycerin",
            "pct": 3
          },
          {
            "name": "Preservative",
            "pct": 1
          },
          {
            "name": "Fragrance",
            "pct": 0.5
          }
        ]
      },
      "expect": {
        "summary": "6 ingredients, 250 g in all",
        "waterG": 188.75,
        "waterPct": 75.5,
        "grams": "Water: 188.8 g (75.5%); Sweet almond oil: 37.5 g (15%); Emulsifying wax: 12.5 g (5%); Glycerin: 7.5 g (3%); Preservative: 2.5 g (1%); Fragrance: 1.25 g (0.5%)"
      },
      "source": "FDA, Cosmetics Labeling Guide (ingredients in descending order of predominance; those at 1% or less in any order after them, 21 CFR 701.3(f)), https://www.fda.gov/cosmetics/cosmetics-labeling-regulations/cosmetics-labeling-guide; hand calculation in content.mdx: 250 × 15% = 37.5 g; water 100 − 24.5 = 75.5% = 188.75 g"
    },
    {
      "given": {
        "w": 0.1,
        "qs": false,
        "items": [
          {
            "name": "Shea butter",
            "pct": 40
          },
          {
            "name": "Coconut oil",
            "pct": 60
          }
        ]
      },
      "expect": {
        "listed": 100,
        "waterG": 0,
        "grams": "Coconut oil: 60 g (60%); Shea butter: 40 g (40%)"
      },
      "source": "FDA, Cosmetics Labeling Guide (ingredients in descending order of predominance; those at 1% or less in any order after them, 21 CFR 701.3(f)), https://www.fda.gov/cosmetics/cosmetics-labeling-regulations/cosmetics-labeling-guide; hand calculation in content.mdx: 100 g × 60% = 60 g, × 40% = 40 g, heaviest first"
    }
  ],
  "sources": [
    "FDA, Cosmetics Labeling Guide: ingredients declared in descending order of predominance; those at not more than 1% may follow in any order (21 CFR 701.3(f)(2)). Retrieved 2026-10-03. https://www.fda.gov/cosmetics/cosmetics-labeling-regulations/cosmetics-labeling-guide",
    "NIST Special Publication 811, Appendix B.8: 1 oz = 28.349523125 g; 1 lb = 453.59237 g. Retrieved 2026-10-03. https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b8"
  ],
  "related": [
    "soap",
    "concentration",
    "dilution"
  ],
  "changelog": []
}
