{
  "id": "degree-of-unsaturation",
  "version": "fa25822fc960",
  "status": "published",
  "name": "Degree of Unsaturation Calculator",
  "question": "What is the degree of unsaturation?",
  "summary": "Computes the degree of unsaturation (the number of rings plus π bonds) of a compound from the counts of carbon, hydrogen, nitrogen, halogen and oxygen atoms in its molecular formula.",
  "category": "chemistry",
  "subcategory": "stoichiometry",
  "url": "https://www.acalculator.org/chemistry/degree-of-unsaturation-calculator",
  "markdown": "https://www.acalculator.org/chemistry/degree-of-unsaturation-calculator.md",
  "kind": "function",
  "method": "Degree of unsaturation = (2C + 2 + N − H − X) ÷ 2, where X is the number of halogen atoms; oxygen is ignored.",
  "assumptions": [
    "The compound is a neutral molecule: carbon forms 4 bonds, nitrogen 3, oxygen 2, and hydrogen and the halogens 1.",
    "Each ring or π bond takes 2 hydrogens away from the saturated formula CnH2n+2; a double bond counts 1 and a triple bond 2.",
    "A formula that gives a half or a negative value has no answer, and so does a formula with no atoms."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "c": {
        "title": "Carbon atoms (C)",
        "description": "The number of carbon atoms in the molecular formula.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "h": {
        "title": "Hydrogen atoms (H)",
        "description": "The number of hydrogen atoms in the molecular formula.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "n": {
        "title": "Nitrogen atoms (N)",
        "description": "The number of nitrogen atoms in the molecular formula.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "x": {
        "title": "Halogen atoms (F, Cl, Br, I)",
        "description": "The number of fluorine, chlorine, bromine and iodine atoms together.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "o": {
        "title": "Oxygen atoms (O)",
        "description": "The number of oxygen atoms; they do not change the result.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      }
    }
  },
  "outputs": {
    "dou": {
      "label": "Degree of unsaturation",
      "description": "Rings plus π bonds: (2C + 2 + N − H − X) ÷ 2.",
      "format": "integer"
    },
    "formula": {
      "label": "Molecular formula (X = halogen)",
      "description": "The formula typed, in the order C, H, N, O, X.",
      "format": "text"
    },
    "equivalent": {
      "label": "Equivalent hydrocarbon",
      "description": "C carbons and H + X − N hydrogens: the hydrocarbon with the same degree of unsaturation.",
      "format": "text"
    },
    "saturated": {
      "label": "Saturated hydrocarbon",
      "description": "CnH2n+2, the alkane with the same number of carbons (H2 with no carbon).",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "c": 6,
      "h": 10,
      "n": 0,
      "x": 0,
      "o": 0
    },
    "outputs": {
      "dou": 2,
      "formula": "C6H10",
      "equivalent": "C6H10",
      "saturated": "C6H14"
    },
    "text": "C6H10 has a degree of unsaturation of 2."
  },
  "examples": [
    {
      "given": {
        "c": 6,
        "h": 10,
        "n": 0,
        "x": 0,
        "o": 0
      },
      "expect": {
        "dou": 2,
        "formula": "C6H10",
        "equivalent": "C6H10",
        "saturated": "C6H14"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (12 + 2 − 10) ÷ 2 = 2"
    },
    {
      "given": {
        "c": 4,
        "h": 6,
        "n": 0,
        "x": 2,
        "o": 0
      },
      "expect": {
        "dou": 1,
        "formula": "C4H6X2",
        "equivalent": "C4H8",
        "saturated": "C4H10"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (8 + 2 − 6 − 2) ÷ 2 = 1"
    },
    {
      "given": {
        "c": 5,
        "h": 8,
        "n": 0,
        "x": 0,
        "o": 1
      },
      "expect": {
        "dou": 2,
        "formula": "C5H8O",
        "equivalent": "C5H8"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (10 + 2 − 8) ÷ 2 = 2"
    },
    {
      "given": {
        "c": 5,
        "h": 9,
        "n": 1,
        "x": 0,
        "o": 0
      },
      "expect": {
        "dou": 2,
        "formula": "C5H9N",
        "equivalent": "C5H8"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (10 + 2 + 1 − 9) ÷ 2 = 2"
    },
    {
      "given": {
        "c": 0,
        "h": 4,
        "n": 2,
        "x": 0,
        "o": 0
      },
      "expect": {
        "dou": 0,
        "formula": "H4N2",
        "equivalent": "H2",
        "saturated": "H2"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (0 + 2 + 2 − 4) ÷ 2 = 0"
    },
    {
      "given": {
        "c": 6,
        "h": 6,
        "n": 0,
        "x": 0,
        "o": 0
      },
      "expect": {
        "dou": 4,
        "saturated": "C6H14"
      },
      "source": "OpenStax, Organic Chemistry, §7.2 Calculating the Degree of Unsaturation (C6H10 has 2; C4H6Br2 is equivalent to C4H8, 1; C5H8O to C5H8, 2; C5H9N to C5H8, 2), https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18); hand calculation in content.mdx: (12 + 2 − 6) ÷ 2 = 4"
    }
  ],
  "sources": [
    "OpenStax, Organic Chemistry (McMurry), §7.2 Calculating the Degree of Unsaturation: each ring or double bond is a loss of two hydrogens from CnH2n+2; add halogens to hydrogens, ignore oxygens, subtract nitrogens from hydrogens; examples C6H10, C4H6Br2, C5H8O, C5H9N. https://openstax.org/books/organic-chemistry/pages/7-2-calculating-the-degree-of-unsaturation (retrieved 2026-10-18)"
  ],
  "related": [
    "molar-mass",
    "empirical-formula",
    "chemical-equation-balancer",
    "atomic-mass"
  ],
  "changelog": []
}
