# What is the binomial theorem result?

Expands (a + b)^n by the binomial theorem, with the binomial coefficients, every term C(n, k) a^(n−k) b^k, and any one term on its own, in exact fractions.

- Page: https://www.acalculator.org/math/binomial-theorem-calculator
- JSON spec: https://www.acalculator.org/math/binomial-theorem-calculator.json
- Version: 426b335b0cd8

## Default answer

Example with the default inputs (First term a x, Second term b y, Power n 5): The expansion has 6 terms: x^5 + 5x^4 y + 10x^3 y^2 + 10x^2 y^3 + 5x y^4 + y^5.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| a | First term a | First term a: one term, such as 3x, −y, 2 or x^2/2. |
| b | Second term b | Second term b: one term, such as 3x, −y, 2 or x^2/2. |
| n | Power n | The whole-number power, 0 to 30. |
| r | Show term number | Optional: which term to show on its own, 1 to n + 1. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | (a + b)^n | The expansion, every term added. |
| 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)!); term k + 1 is C(n, k) a^(n−k) b^k.

## Assumptions

- a and b are single 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. a = x, b = y, n = 5 gives result = x^5 + 5x^4 y + 10x^3 y^2 + 10x^2 y^3 + 5x y^4 + y^5, coefficients = 1, 5, 10, 10, 5, 1, count = 6. Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem, Example 2a ((x + y)⁵ = x⁵ + 5x⁴y + 10x³y² + 10x²y³ + 5xy⁴ + y⁵), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem.
2. a = 3x, b = -y, n = 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. a = x, b = 2y, n = 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. a = x, b = 0.5, n = 3 gives result = x^3 + 3x^2/2 + 3x/4 + 1/8, steps = Term 1: C(3, 0) × x³ × (1/2)⁰ = x³; Term 2: C(3, 1) × x² × (1/2)¹ = 3x²/2; Term 3: C(3, 2) × x¹ × (1/2)² = 3x/4; Term 4: C(3, 3) × x⁰ × (1/2)³ = 1/8.

## FAQ

### What is the binomial theorem?

For a whole number n, (a + b)^n = C(n, 0)a^n + C(n, 1)a^(n−1)b + … + C(n, n)b^n. Each term is C(n, k) a^(n−k) b^k for k = 0 to n, so there are n + 1 terms.

### How do I work out a binomial coefficient?

C(n, k) = n! ÷ (k!(n − k)!). For example C(5, 3) = 120 ÷ (6 × 2) = 10. The coefficients of (a + b)^n are row n of Pascal’s triangle: 1, 5, 10, 10, 5, 1 for n = 5.

### How do I find one term without expanding everything?

Term number r + 1 is C(n, r) a^(n−r) b^r. The tenth term of (x + 2y)^16 has r = 9: C(16, 9) x^7 (2y)^9 = 11,440 × 512 x^7 y^9 = 5,857,280x^7y^9.

### What happens with a minus sign, as in (3x − y)^4?

Take b = −y. Odd powers of −y are negative, so the signs alternate: 81x^4 − 108x^3y + 54x^2y^2 − 12xy^3 + y^4.

### Why must a and b be single terms?

The theorem is for a binomial, a sum of two terms. If a or b is itself a sum, expand it in stages, or use the polynomial or combine like terms calculator. If a and b are like terms (x and 2x), add them first: (3x)^n.

### What is the largest power the calculator takes?

n can be 0 to 30. The answer then has up to 31 terms, and every coefficient is exact.

## 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 1: C(5, 3) = 10; Example 2: (x + y)^5 and (3x − 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)
