{
  "id": "distributive-property",
  "version": "2c45b9bdbdf9",
  "status": "published",
  "name": "Distributive Property Calculator",
  "question": "What is the distributive property?",
  "summary": "Multiplies out a product such as 3(x + 4) or −2x(3x − 5) by the distributive property, a(b + c) = ab + ac, with each product shown and like terms combined in exact fractions.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/distributive-property-calculator",
  "markdown": "https://www.acalculator.org/math/distributive-property-calculator.md",
  "kind": "function",
  "method": "a(b + c) = ab + ac: every term of one factor times every term of the other, then like terms combined.",
  "assumptions": [
    "The input is one product of two factors, at least one of them a sum. Coefficients are exact fractions: 0.5 is 1/2."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "e": {
        "title": "Product",
        "description": "A factor times a bracket, such as 3(x + 4), −2x(3x − 5 + y) or (x − 1)(x² + x + 1).",
        "type": "string",
        "maxLength": 160
      }
    }
  },
  "outputs": {
    "result": {
      "label": "Expanded",
      "description": "The product multiplied out, with like terms combined.",
      "format": "math"
    },
    "distributed": {
      "label": "Each product",
      "description": "Every term of one factor times every term of the other, before like terms are combined.",
      "format": "math"
    },
    "steps": {
      "label": "Steps",
      "description": "Each product, the sum, and like terms combined.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "e": "3(x + 4)"
    },
    "outputs": {
      "result": "3x + 12",
      "distributed": "3x + 12",
      "steps": "3 × (x + 4) = 3 × x = 3x, 3 × 4 = 12; Add: 3x + 12"
    },
    "text": "3(x + 4) = 3x + 12."
  },
  "examples": [
    {
      "given": {
        "e": "3(x + 4)"
      },
      "expect": {
        "result": "3x + 12",
        "distributed": "3x + 12",
        "steps": "3 × (x + 4) = 3 × x = 3x, 3 × 4 = 12; Add: 3x + 12"
      },
      "source": "OpenStax, Prealgebra 2e, §7.3 Distributive Property, Example 7.17 (3(x + 4) = 3x + 12), https://openstax.org/books/prealgebra-2e/pages/7-3-distributive-property"
    },
    {
      "given": {
        "e": "(2x + 1)(3x^2 - x + 4)"
      },
      "expect": {
        "result": "6x^3 + x^2 + 7x + 4",
        "distributed": "6x^3 - 2x^2 + 8x + 3x^2 - x + 4"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials, Example 4 ((2x + 1)(3x² − x + 4) = 6x³ + x² + 7x + 4), https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials"
    },
    {
      "given": {
        "e": "-2x(3x - 5)"
      },
      "expect": {
        "result": "-6x^2 + 10x",
        "steps": "(−2x) × (3x − 5) = (−2x) × 3x = −6x², (−2x) × (−5) = 10x; Add: −6x² + 10x"
      },
      "source": "hand calculation in content.mdx: −2x × 3x = −6x², −2x × (−5) = 10x"
    },
    {
      "given": {
        "e": "6(10 + 3)"
      },
      "expect": {
        "result": "78",
        "distributed": "60 + 18"
      },
      "source": "hand calculation in content.mdx: 6 × 10 + 6 × 3 = 60 + 18 = 78 = 6 × 13"
    },
    {
      "given": {
        "e": "(x + 4)0.5"
      },
      "expect": {
        "result": "x/2 + 2"
      },
      "source": "hand calculation in content.mdx: the single factor 1/2 times each term, x/2 + 2"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §7.3 Distributive Property (a(b + c) = ab + ac; Example 7.17: 3(x + 4) = 3x + 12). https://openstax.org/books/prealgebra-2e/pages/7-3-distributive-property (retrieved 2026-10-05)",
    "OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials (multiply each term of the first polynomial by each term of the second; Example 4: (2x + 1)(3x² − x + 4) = 6x³ + x² + 7x + 4). https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials (retrieved 2026-10-05)"
  ],
  "related": [
    "foil",
    "combine-like-terms",
    "polynomial",
    "factoring",
    "simplify"
  ],
  "changelog": []
}
