{
  "id": "oxidation-number",
  "version": "5ae15df2e297",
  "status": "published",
  "name": "Oxidation Number Calculator",
  "question": "What are the oxidation numbers?",
  "summary": "Assigns the oxidation number of every element in a chemical formula or ion by the standard rules (fluorine −1, group 1 +1, group 2 +2, hydrogen ±1, oxygen −2, halogens −1) and the sum rule, with each step.",
  "category": "chemistry",
  "subcategory": "stoichiometry",
  "url": "https://www.acalculator.org/chemistry/oxidation-number-calculator",
  "markdown": "https://www.acalculator.org/chemistry/oxidation-number-calculator.md",
  "kind": "function",
  "method": "Rules in priority order: F −1; group 1 metals +1; group 2 metals +2; H +1 with any nonmetal, −1 with metals only; O −2; Cl, Br, I, At −1 unless O, F or a halogen above them is present. The sum of all oxidation numbers equals the charge; the one element with no rule comes from it. If every element has a rule and the sum is off, the lowest-priority element comes from the sum (refused when two elements share that priority).",
  "assumptions": [
    "An element alone (O₂, S₈) is 0; an ion of one element shares its charge equally (Fe³⁺ +3, O₂²⁻ −1).",
    "Metals, metalloids and nonmetals as classified in OpenStax’s periodic table (metalloids: B, Si, Ge, As, Sb, Te, At).",
    "When an element sits in two different places in a formula (N in NH₄NO₃), the page gives only its average.",
    "A formula with two or more elements that no rule fixes (CuSO₄, HCN), or a wrong sum with the lowest priority shared (NaK), is refused as ambiguous."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "f": {
        "title": "Formula",
        "description": "A chemical formula or ion, such as KMnO4, H2O2 or Cr2O7^2-. Write a charge after ^, in superscripts, or after a space.",
        "type": "string",
        "maxLength": 100
      }
    }
  },
  "outputs": {
    "result": {
      "label": "Oxidation numbers",
      "description": "Each element with its oxidation number, in the order of the formula.",
      "format": "text"
    },
    "steps": {
      "label": "Steps",
      "description": "The rule behind each value, and the sum rule for the element left over.",
      "format": "text"
    },
    "species": {
      "label": "Formula",
      "description": "The formula as read, with subscripts and charge.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "KMnO4"
    },
    "outputs": {
      "result": "K +1, Mn +7, O −2",
      "steps": "K: group 1 metal: +1; Mn: from the total, (+1) + Mn + 4 × (−2) = 0, so Mn = +7; O: oxygen: −2",
      "species": "KMnO₄"
    },
    "text": "Oxidation numbers in KMnO₄: K +1, Mn +7, O −2."
  },
  "examples": [
    {
      "given": {
        "f": "H2S"
      },
      "expect": {
        "result": "H +1, S −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Example 4.5 (a): H +1, S −2"
    },
    {
      "given": {
        "f": "SO3^2-"
      },
      "expect": {
        "result": "S +4, O −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Example 4.5 (b): S +4"
    },
    {
      "given": {
        "f": "Na2SO4"
      },
      "expect": {
        "result": "Na +1, S +6, O −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Example 4.5 (c): Na +1, S +6"
    },
    {
      "given": {
        "f": "KNO3"
      },
      "expect": {
        "result": "K +1, N +5, O −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Check Your Learning after Example 4.5 (a): N +5"
    },
    {
      "given": {
        "f": "AlH3"
      },
      "expect": {
        "result": "Al +3, H −1"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Check Your Learning after Example 4.5 (b): Al +3"
    },
    {
      "given": {
        "f": "NH4^+"
      },
      "expect": {
        "result": "N −3, H +1"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Check Your Learning after Example 4.5 (c): N −3"
    },
    {
      "given": {
        "f": "H2PO4^-"
      },
      "expect": {
        "result": "H +1, P +5, O −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions, Check Your Learning after Example 4.5 (d): P +5"
    },
    {
      "given": {
        "f": "Cr2O7^2-"
      },
      "expect": {
        "result": "Cr +6, O −2"
      },
      "source": "LibreTexts, Jim Clark, Oxidation States (Oxidation Numbers), https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Electrochemistry/Redox_Chemistry/Oxidation_States_(Oxidation_Numbers): 2n + 7(−2) = −2, so chromium is +6"
    },
    {
      "given": {
        "f": "H2O2"
      },
      "expect": {
        "result": "H +1, O −1"
      },
      "source": "LibreTexts, Jim Clark, Oxidation States (Oxidation Numbers), https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Electrochemistry/Redox_Chemistry/Oxidation_States_(Oxidation_Numbers): in H₂O₂ each hydrogen is +1, so each oxygen is −1"
    },
    {
      "given": {
        "f": "OF2"
      },
      "expect": {
        "result": "O +2, F −1"
      },
      "source": "LibreTexts, Jim Clark, Oxidation States (Oxidation Numbers), https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Electrochemistry/Redox_Chemistry/Oxidation_States_(Oxidation_Numbers): in F₂O fluorine takes priority at −1, so oxygen is +2"
    },
    {
      "given": {
        "f": "Fe3O4"
      },
      "expect": {
        "result": "Fe +8/3 (average), O −2"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions (sum rule); hand calculation in content.mdx: 3 × Fe + 4 × (−2) = 0, Fe = +8/3"
    },
    {
      "given": {
        "f": "KMnO4"
      },
      "expect": {
        "result": "K +1, Mn +7, O −2",
        "species": "KMnO₄"
      },
      "source": "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions (guidelines for assigning oxidation numbers), https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions (sum rule); hand calculation in content.mdx: (+1) + Mn + 4 × (−2) = 0, Mn = +7"
    }
  ],
  "sources": [
    "OpenStax, Chemistry 2e, §4.2 Classifying Chemical Reactions: the guidelines for assigning oxidation numbers (elements 0, monatomic ions their charge, hydrogen +1 with nonmetals and −1 with metals, oxygen −2 with its exceptions, halogens, the sum rule), Example 4.5 (H₂S, SO₃²⁻, Na₂SO₄) and its Check Your Learning (KNO₃ N +5, AlH₃ Al +3, NH₄⁺ N −3, H₂PO₄⁻ P +5). https://openstax.org/books/chemistry-2e/pages/4-2-classifying-chemical-reactions (retrieved 2026-10-19)",
    "LibreTexts, Jim Clark, Oxidation States (Oxidation Numbers) (CC BY-NC): group 1 metals always +1, group 2 always +2, fluorine always −1, the peroxide and F₂O exceptions with fluorine taking priority, Cr₂O₇²⁻ (Cr +6). https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Electrochemistry/Redox_Chemistry/Oxidation_States_(Oxidation_Numbers) (retrieved 2026-10-19)",
    "OpenStax, Chemistry 2e, §2.5 The Periodic Table, Figure 2.26: metals, metalloids (B, Si, Ge, As, Sb, Te, At) and nonmetals (H, He, C, N, O, F, Ne, P, S, Cl, Ar, Se, Br, Kr, I, Xe, Rn). https://openstax.org/books/chemistry-2e/pages/2-5-the-periodic-table (retrieved 2026-10-19)"
  ],
  "related": [
    "formal-charge",
    "electronegativity",
    "chemical-equation-balancer",
    "net-ionic-equation"
  ],
  "changelog": []
}
