{
  "id": "ksp",
  "version": "a9c52f731f03",
  "status": "published",
  "name": "Ksp Calculator",
  "question": "What is the Ksp?",
  "summary": "Finds the solubility product Ksp of a slightly soluble salt from its molar solubility (or its solubility in g/L and molar mass), or the molar solubility from Ksp, for a salt that dissolves into p cations and q anions.",
  "category": "chemistry",
  "subcategory": "solutions",
  "url": "https://www.acalculator.org/chemistry/ksp-calculator",
  "markdown": "https://www.acalculator.org/chemistry/ksp-calculator.md",
  "kind": "function",
  "method": "Ksp = [M]^p × [X]^q = (p × s)^p × (q × s)^q = p^p × q^q × s^(p + q); s = (Ksp ÷ (p^p × q^q))^(1 ÷ (p + q)); s in mol/L = solubility in g/L ÷ molar mass.",
  "assumptions": [
    "The salt dissolves into p cations and q anions in pure water, with no common ion, and the ions do not react further (no hydrolysis or complex ions).",
    "Concentrations stand for activities, as in introductory chemistry."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "find": {
        "title": "Find",
        "description": "The solubility product from the solubility, or the molar solubility from Ksp.",
        "type": "string",
        "enum": [
          "ksp",
          "s"
        ]
      },
      "p": {
        "title": "Cations per formula unit (p)",
        "description": "How many cations one formula unit gives: 1 for CaF₂, 2 for Ag₂CrO₄.",
        "type": "integer",
        "minimum": 1,
        "maximum": 5
      },
      "q": {
        "title": "Anions per formula unit (q)",
        "description": "How many anions one formula unit gives: 2 for CaF₂, 1 for Ag₂CrO₄.",
        "type": "integer",
        "minimum": 1,
        "maximum": 5
      },
      "u": {
        "title": "Solubility in",
        "description": "Moles per liter, or grams per liter with the molar mass.",
        "type": "string",
        "enum": [
          "mol",
          "g"
        ]
      },
      "s": {
        "title": "Solubility",
        "description": "How much salt dissolves in a liter of saturated solution, in the unit chosen above.",
        "type": "number",
        "minimum": 1e-20,
        "maximum": 10000
      },
      "ksp": {
        "title": "Ksp",
        "description": "The solubility product, such as 3.9e-11 for CaF₂.",
        "type": "number",
        "minimum": 1e-100,
        "maximum": 1000000
      },
      "mm": {
        "title": "Molar mass (g/mol)",
        "description": "The molar mass of the salt, to convert between grams and moles.",
        "type": "number",
        "minimum": 0.001,
        "maximum": 100000
      }
    }
  },
  "outputs": {
    "result": {
      "label": "Answer",
      "description": "Ksp or the molar solubility, to 6 significant figures.",
      "format": "text"
    },
    "kspValue": {
      "label": "Ksp",
      "description": "The solubility product.",
      "format": "number"
    },
    "molar": {
      "label": "Molar solubility (mol/L)",
      "description": "Moles of salt that dissolve per liter of saturated solution.",
      "format": "number"
    },
    "grams": {
      "label": "Solubility (g/L)",
      "description": "Grams of salt that dissolve per liter, from the molar mass.",
      "format": "number"
    },
    "cation": {
      "label": "Cation concentration (mol/L)",
      "description": "The cation concentration at saturation, p × s.",
      "format": "number"
    },
    "anion": {
      "label": "Anion concentration (mol/L)",
      "description": "The anion concentration at saturation, q × s.",
      "format": "number"
    },
    "expression": {
      "label": "Ksp in terms of s",
      "description": "The product of the ion concentrations written with the molar solubility s.",
      "format": "text"
    },
    "salt": {
      "label": "Salt type",
      "description": "The salt written as MpXq, such as MX₂.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "find": "ksp",
      "p": 1,
      "q": 2,
      "u": "mol",
      "s": 0.000215,
      "ksp": 6.3e-9
    },
    "outputs": {
      "result": "Ksp = 3.97535 × 10⁻¹¹",
      "kspValue": 3.97535e-11,
      "molar": 0.000215,
      "cation": 0.000215,
      "anion": 0.00043,
      "expression": "Ksp = s × (2s)² = 4s³",
      "salt": "MX₂"
    },
    "text": "Ksp = 3.97535 × 10⁻¹¹ for an MX₂ salt, where Ksp = s × (2s)² = 4s³."
  },
  "examples": [
    {
      "given": {
        "find": "ksp",
        "p": 1,
        "q": 2,
        "u": "mol",
        "s": 0.000215
      },
      "expect": {
        "kspValue": 3.97535e-11,
        "anion": 0.00043,
        "result": "Ksp = 3.97535 × 10⁻¹¹"
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Example 15.2 Calculation of Ksp from Equilibrium Concentrations: Ksp = 3.98 × 10⁻¹¹; Python 3"
    },
    {
      "given": {
        "find": "ksp",
        "p": 1,
        "q": 2,
        "u": "mol",
        "s": 0.000131
      },
      "expect": {
        "kspValue": 8.992364e-12
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Check Your Learning after Example 15.2: Ksp = 8.99 × 10⁻¹²; Python 3"
    },
    {
      "given": {
        "find": "s",
        "p": 1,
        "q": 1,
        "u": "mol",
        "ksp": 6.3e-9
      },
      "expect": {
        "molar": 0.00007937253933193772
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Example 15.3 Determination of Molar Solubility from Ksp: 7.9 × 10⁻⁵ M; Python 3"
    },
    {
      "given": {
        "find": "s",
        "p": 1,
        "q": 2,
        "u": "mol",
        "ksp": 0.0000013
      },
      "expect": {
        "molar": 0.006875344335370707
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Example 15.4 Determination of Molar Solubility from Ksp: 6.9 × 10⁻³ M; Python 3",
      "tolerance": 1e-12
    },
    {
      "given": {
        "find": "s",
        "p": 1,
        "q": 2,
        "u": "mol",
        "ksp": 1.1e-18
      },
      "expect": {
        "molar": 6.50295723425694e-7
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Example 15.6 Determination of Molar Solubility from Ksp: 6.5 × 10⁻⁷ M; Python 3",
      "tolerance": 1e-12
    },
    {
      "given": {
        "find": "ksp",
        "p": 1,
        "q": 1,
        "u": "g",
        "s": 0.0000046,
        "mm": 323.19
      },
      "expect": {
        "kspValue": 2.0258152412594542e-16
      },
      "source": "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution (Ksp from molar solubility and the reverse), https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution, Example 15.5 Calculation of Ksp from Solubility: 2.0 × 10⁻¹⁶; Python 3",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "OpenStax, Chemistry 2e, §15.1 Precipitation and Dissolution: the dissolution MpXq(s) ⇌ pM(aq) + qX(aq) and its Ksp, Example 15.2 (CaF₂: Ksp = 3.98 × 10⁻¹¹) and its Check Your Learning (Mg(OH)₂: 8.99 × 10⁻¹²), Example 15.3 (CuBr: 7.9 × 10⁻⁵ M), Example 15.4 (Ca(OH)₂: 6.9 × 10⁻³ M), Example 15.5 (PbCrO₄: 2.0 × 10⁻¹⁶), Example 15.6 (Hg₂Cl₂: 6.5 × 10⁻⁷ M) and its Check Your Learning (MgF₂: 1.2 × 10⁻³ M), Example 15.13 (CdS with a common ion). https://openstax.org/books/chemistry-2e/pages/15-1-precipitation-and-dissolution (retrieved 2026-10-19)"
  ],
  "related": [
    "equilibrium-constant",
    "molarity",
    "molar-mass",
    "gibbs-free-energy"
  ],
  "changelog": []
}
