# What is the binomial expansion?

Expands a typed binomial power such as (x + 2)^5 or (3x − y)^4 by the binomial theorem, with every term and the binomial coefficients in exact fractions.

- Page: https://www.acalculator.org/math/binomial-expansion-calculator
- JSON spec: https://www.acalculator.org/math/binomial-expansion-calculator.json
- Version: f1bcf7966aef

## Default answer

Example with the default inputs (Binomial power (x + 2)^5): (x + 2)^5 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| e | Binomial power | A binomial in brackets to a whole power from 0 to 30, such as (x + 2)^5. |
| r | Show term number | Optional: which term to show on its own, 1 to n + 1. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Expansion | The binomial power multiplied out. |
| term | Chosen term | Term number r: C(n, r − 1) a^(n − r + 1) b^(r − 1). |
| coefficients | Binomial coefficients | C(n, 0) to C(n, n): row n of Pascal’s triangle. |
| count | Number of terms | The expansion has n + 1 terms. |
| steps | Each term | Term k + 1 = C(n, k) × a^(n − k) × b^k for k = 0 to n. |

## Method

(a + b)^n = Σ C(n, k) a^(n−k) b^k, k = 0 to n, with C(n, k) = n! ÷ (k!(n − k)!).

## Assumptions

- The bracket holds two terms that are not like terms. Coefficients are exact fractions: 0.5 is 1/2.
- n is a whole number from 0 to 30.

## Worked examples

1. e = (x + 2)^5 gives result = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32, coefficients = 1, 5, 10, 10, 5, 1, count = 6. Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem ((x + y)^n = Σ C(n, k) x^(n−k) y^k), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem.
2. e = (3x - y)^4, r = 2 gives result = 81x^4 - 108x^3 y + 54x^2 y^2 - 12x y^3 + y^4, term = −108x³ y. Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem, Example 2b ((3x − y)⁴ = 81x⁴ − 108x³y + 54x²y² − 12xy³ + y⁴), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem.
3. e = (x + 2y)^16, r = 10 gives term = 5857280x⁷ y⁹, count = 17. Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem, Example 3 (the tenth term of (x + 2y)¹⁶ is 5,857,280x⁷y⁹), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem.
4. e = (1 - x)^3 gives result = -x^3 + 3x^2 - 3x + 1, steps = Term 1: C(3, 0) × 1³ × (−x)⁰ = 1; Term 2: C(3, 1) × 1² × (−x)¹ = −3x; Term 3: C(3, 2) × 1¹ × (−x)² = 3x²; Term 4: C(3, 3) × 1⁰ × (−x)³ = −x³.

## FAQ

### How do I expand (x + 2)^5?

Use the coefficients 1, 5, 10, 10, 5, 1 (row 5 of Pascal’s triangle) with falling powers of x and rising powers of 2: x^5 + 5(2)x^4 + 10(4)x^3 + 10(8)x^2 + 5(16)x + 32 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.

### What formula does binomial expansion use?

The binomial theorem: (a + b)^n = Σ C(n, k) a^(n−k) b^k for k = 0 to n, where C(n, k) = n! ÷ (k!(n − k)!).

### How many terms does (a + b)^n have?

n + 1. (x + 2y)^16 has 17 terms.

### How do I expand a binomial with a minus sign?

Treat the minus as part of the second term. In (1 − x)^3, b = −x, so the odd powers are negative: 1 − 3x + 3x^2 − x^3.

### How do I find just one term?

Fill in the term number. Term r is C(n, r − 1) a^(n−r+1) b^(r−1); the tenth term of (x + 2y)^16 is 5,857,280x^7y^9.

### Can I expand (x + y + z)^n here?

No. This page takes two terms in the bracket. For a longer sum, use the polynomial or combine like terms calculator, which multiply out any bracket.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem (C(n, r) = n! ÷ (r!(n − r)!); (x + y)^n = Σ C(n, k) x^(n−k) y^k; the (r + 1)th term is C(n, r) x^(n−r) y^r; Example 2b: (3x − y)^4 = 81x^4 − 108x^3y + 54x^2y^2 − 12xy^3 + y^4; Example 3: the tenth term of (x + 2y)^16 is 5,857,280x^7y^9). https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem (retrieved 2026-10-05)
