Binomial Expansion Calculator

Expand (a + b)ⁿ step by step with the Binomial Theorem, find any term or coefficient, calculate C(n, k), and explore Pascal's Triangle.

Expand (a + b)ⁿ into a polynomial with the Binomial Theorem.

Brackets, then ^ and a whole-number power. Terms like 2x, −3y, x^2, x/2 or 1/3 are fine.

Examples

Expansion of (x + 2)⁴

(x + 2)⁴ = x⁴ + 8x³ + 24x² + 32x + 16
Number of terms
5
Degree
4
Binomial coefficients
1, 4, 6, 4, 1
Sum of the coefficients
81 (the value when every variable is 1)

Coefficient table

Each term of the expansion with its k, binomial coefficient and simplified value
TermkC(n,k)aⁿ⁻ᵏ · bᵏTerm value
T₁01x⁴ · 1x⁴
T₂14x³ · 28x³
T₃26x² · 424x²
T₄34x · 832x
T₅411 · 1616

Step-by-Step Solution

  1. Step 1 — Identify a, b and n

    Write the binomial as (a + b)^n.

    a = x

    b = 2

    n = 4

  2. Step 2 — Write the Binomial Theorem

    There are n + 1 = 5 terms. In each one the power of a goes down from 4 to 0 while the power of b goes up from 0 to 4.

    (a + b)⁴ = C(4,0)a⁴ + C(4,1)a³b + C(4,2)a²b² + C(4,3)ab³ + C(4,4)b⁴

  3. Step 3 — Find the binomial coefficients

    These are row 4 of Pascal's Triangle, C(4,k) = 4!/(k!(4 − k)!).

    C(4,0), C(4,1), C(4,2), C(4,3), C(4,4)

    = 1, 4, 6, 4, 1

  4. Step 4 — Substitute a and b

    T₁ = C(4,0) · x⁴

    T₂ = C(4,1) · x³ · 2

    T₃ = C(4,2) · x² · 2²

    T₄ = C(4,3) · x · 2³

    T₅ = C(4,4) · 2⁴

  5. Step 5 — Simplify each term

    T₁ = 1 · x⁴ = x⁴

    T₂ = 4 · x³ · 2 = 8x³

    T₃ = 6 · x² · 4 = 24x²

    T₄ = 4 · x · 8 = 32x

    T₅ = 1 · 16 = 16

  6. Step 6 — Final expanded form

    (x + 2)⁴ = x⁴ + 8x³ + 24x² + 32x + 16

Pascal's Triangle

01
111
2121
31331
row 4 →14641

Each number is the sum of the two above it. Row 4 gives C(4,0), C(4,1), …, C(4,4).

Binomial Theorem formulas

Binomial Theorem(a + b)ⁿ = Σ C(n,k) · aⁿ⁻ᵏ · bᵏ, k = 0 to n
Binomial coefficientC(n,k) = n! / (k! · (n − k)!)
General termTₖ₊₁ = C(n,k) · aⁿ⁻ᵏ · bᵏ (k starts at 0)
Number of termsn + 1
Middle termn even: term n/2 + 1; n odd: terms (n + 1)/2 and (n + 3)/2
Sum of coefficientsC(n,0) + C(n,1) + … + C(n,n) = 2ⁿ

Here n is the power, k the term index (starting at 0), a the first term, b the second term (including its sign), and C(n,k) the binomial coefficient.

C(n, k) counts choices, which the Combination Calculator explains in detail, alongside the Permutation Calculator and the Factorial Calculator. To go the other way and find the roots of an expanded polynomial, use the Polynomial Root Calculator or, for degree 2, the Quadratic Formula Calculator. Powers of single numbers are quickest in the Exponent Calculator or the Scientific Calculator.

This binomial expansion calculator expands expressions like (x + 2)⁵, (2x − 3)⁴ or (3x − 2y)⁴ using the Binomial Theorem and shows every step: a, b and n, the binomial coefficients from Pascal's Triangle, the substitution, and each simplified term. The results are exact, including fractional coefficients.

It can also find a single term, the middle term or terms, or the coefficient of a power such as x³ without expanding everything. It calculates binomial coefficients C(n, k), draws Pascal's Triangle, and evaluates an expansion at chosen values to check that it equals the original expression.

Worked Calculation Examples

ScenarioResultCalculation Step
Expand (x + 2)³x³ + 6x² + 12x + 8Row 3 of Pascal’s Triangle is 1, 3, 3, 1: x³ + 3x²(2) + 3x(2²) + 2³.
Expand (x − 3)⁴x⁴ − 12x³ + 54x² − 108x + 81b = −3. Coefficients 1, 4, 6, 4, 1 times powers of −3 (1, −3, 9, −27, 81).
Expand (2x + 1)⁵32x⁵ + 80x⁴ + 80x³ + 40x² + 10x + 1Coefficients 1, 5, 10, 10, 5, 1 times powers of 2x: 32x⁵, 16x⁴, 8x³, 4x², 2x, 1.
Expand (3x − 2y)⁴81x⁴ − 216x³y + 216x²y² − 96xy³ + 16y⁴a = 3x and b = −2y, so each term is C(4,k)(3x)⁴⁻ᵏ(−2y)ᵏ.
4th term of (x + 2)⁶160x³k = 3: C(6,3)x³·2³ = 20 · 8x³ = 160x³.
C(10, 4)21010!/(4!·6!) = (10·9·8·7)/(4·3·2·1) = 5040/24 = 210.

What Is Binomial Expansion?

A binomial is an expression with two terms, such as x + 2 or 3x − 2y. Binomial expansion means multiplying out a power of a binomial, (a + b)ⁿ, into a sum of separate terms. For example (x + 2)³ = (x + 2)(x + 2)(x + 2) = x³ + 6x² + 12x + 8.

Multiplying the brackets one by one works for small powers but quickly becomes long. The Binomial Theorem gives every term of the result directly.

What Is the Binomial Theorem?

For any whole number n ≥ 0: (a + b)ⁿ = C(n,0)aⁿ + C(n,1)aⁿ⁻¹b + C(n,2)aⁿ⁻²b² + … + C(n,n)bⁿ, where C(n,k) = n!/(k!(n − k)!).

There are n + 1 terms. The power of a starts at n and goes down by one each term, the power of b starts at 0 and goes up by one, and the two powers in every term add up to n. The coefficients C(n,k) are the numbers in row n of Pascal's Triangle.

How to Expand a Binomial

Take (x + 2)⁴. Here a = x, b = 2 and n = 4. The coefficients from row 4 of Pascal's Triangle are 1, 4, 6, 4, 1.

Substitute into the theorem: 1·x⁴ + 4·x³·2 + 6·x²·2² + 4·x·2³ + 1·2⁴. Simplify each term: x⁴ + 8x³ + 24x² + 32x + 16.

With a minus sign, include it in b. For (x − 2)³, b = −2, and its powers alternate in sign: x³ + 3x²(−2) + 3x(−2)² + (−2)³ = x³ − 6x² + 12x − 8. With a coefficient, raise the whole term to the power: in (2x + 3)², a² = (2x)² = 4x², giving 4x² + 12x + 9.

How to Find a Specific Term

The (k + 1)th term is Tₖ₊₁ = C(n,k) · aⁿ⁻ᵏ · bᵏ. Because k starts at 0, the rth term uses k = r − 1.

For the 4th term of (x + 2)⁶, k = 3: T₄ = C(6,3) · x³ · 2³ = 20 · 8x³ = 160x³.

To find the coefficient of a particular power, such as x³ in (2x + 3)⁵, set the power of x in the general term equal to 3: 5 − k = 3, so k = 2. Then T₃ = C(5,2)(2x)³(3)² = 10 · 8x³ · 9 = 720x³, and the coefficient is 720.

Binomial Coefficients

The binomial coefficient C(n,k), read “n choose k” and also written ⁿCₖ, counts the ways to choose k items from n. It equals n!/(k!(n − k)!). For example C(10,4) = 10!/(4!·6!) = (10·9·8·7)/(4·3·2·1) = 210.

Useful facts: C(n,0) = C(n,n) = 1; C(n,k) = C(n,n − k), which is why each row of Pascal's Triangle is symmetric; and the coefficients in row n add up to 2ⁿ.

What Is Pascal's Triangle?

Pascal's Triangle starts with 1 at the top. Each row begins and ends with 1, and every other number is the sum of the two numbers above it. Row 4 is 1, 4, 6, 4, 1 and row 5 is 1, 5, 10, 10, 5, 1.

Row n (counting the top row as row 0) lists C(n,0), C(n,1), …, C(n,n), exactly the coefficients of (a + b)ⁿ. For small powers, reading a row of the triangle is the quickest way to get the coefficients.

How to Find the Middle Term

The expansion of (a + b)ⁿ has n + 1 terms. If n is even, n + 1 is odd and there is one middle term, term n/2 + 1 (k = n/2). If n is odd there are two middle terms, terms (n + 1)/2 and (n + 3)/2.

For (x + 2)⁴ the middle term is the 3rd: T₃ = C(4,2)x²·2² = 24x². For (x + 2)⁵ the middle terms are the 3rd and 4th: 40x³ and 80x². When a and b are equal in size, the middle coefficient is the largest in the row.

Binomial Expansion vs FOIL

FOIL (first, outer, inner, last) multiplies two binomials, so it handles (a + b)² = a² + 2ab + b². For higher powers you would have to FOIL repeatedly and collect like terms each time. The Binomial Theorem generalises this to any whole-number power in one step: its coefficients C(n,k) already count how many times each combination appears.

Where Binomial Expansion Is Used

Algebra and calculus: expanding powers, simplifying polynomials, and deriving the power rule for derivatives from (x + h)ⁿ.

Probability and statistics: the binomial distribution P(X = k) = C(n,k)pᵏ(1 − p)ⁿ⁻ᵏ gives the terms of (p + (1 − p))ⁿ, and those terms add up to 1.

Combinatorics: C(n,k) counts subsets, and identities such as Σ C(n,k) = 2ⁿ come from expanding (1 + 1)ⁿ.

Approximation: for small x, (1 + x)ⁿ ≈ 1 + nx, the first two terms of the expansion.

Negative and Fractional Exponents

The finite Binomial Theorem is for whole-number powers n = 0, 1, 2, … With a negative or fractional power, such as (1 + x)⁻² or (1 + x)^(1/2), the expansion never stops: it becomes an infinite series (the generalised binomial series), which is only valid for some values of x (|x| < 1 for (1 + x)ⁿ). This calculator explains that case instead of producing a finite polynomial, which would be wrong.

How to Use the Binomial Expansion Calculator

  1. Type the binomial in brackets followed by the power, for example (x + 2)^5, (2x − 3y)^4 or (x/2 + 1/3)^3. Each part can be a number, a variable, or a number times variables with whole-number powers.
  2. Choose what you want: the full expansion, one term (by number, the middle term, or the coefficient of a power such as x³), a binomial coefficient C(n, k), a row of Pascal’s Triangle, or the value of the expansion at chosen values.
  3. Press Calculate or tap an example. Results are exact; fractions stay as fractions.
  4. Read the step-by-step solution: a, b and n, the Binomial Theorem, the coefficients from Pascal’s Triangle, the substitution, and each simplified term. The coefficient table lists every term with its k.
  5. Copy the answer as plain text (for example (x + 2)^4 = x^4 + 8x^3 + 24x^2 + 32x + 16), or use Evaluate to check the expansion at a value of x.

Frequently Asked Questions

What is binomial expansion?

Writing a power of a two-term expression, (a + b)ⁿ, as a sum of separate terms. For example (x + 2)³ = x³ + 6x² + 12x + 8.

What is the Binomial Theorem?

(a + b)ⁿ = Σ C(n,k)aⁿ⁻ᵏbᵏ for k = 0 to n, where C(n,k) = n!/(k!(n − k)!). It gives all n + 1 terms of the expansion directly.

How do I expand (a+b)^n?

Write n + 1 terms. In the (k + 1)th term, multiply C(n,k) by a to the power n − k and b to the power k, for k = 0, 1, …, n, then simplify each term.

How do I expand a binomial with a minus sign?

Treat the minus as part of the second term: (x − 2)ⁿ = (x + (−2))ⁿ. Odd powers of −2 are negative and even powers positive, so the signs alternate: (x − 2)³ = x³ − 6x² + 12x − 8.

How do I find a specific term?

Use Tₖ₊₁ = C(n,k)aⁿ⁻ᵏbᵏ with k = (term number) − 1. The 4th term of (x + 2)⁶ uses k = 3: C(6,3)x³·2³ = 160x³.

What is a binomial coefficient?

The number C(n,k) = n!/(k!(n − k)!) that multiplies the term aⁿ⁻ᵏbᵏ in the expansion of (a + b)ⁿ. For n = 4 the coefficients are 1, 4, 6, 4, 1.

What does n choose k mean?

The number of ways to choose k items from n when order does not matter, written C(n,k) or ⁿCₖ. For example 10 choose 4 = 210.

How does Pascal's Triangle help with binomial expansion?

Row n of the triangle lists the coefficients of (a + b)ⁿ. Row 5 is 1, 5, 10, 10, 5, 1, so (a + b)⁵ = a⁵ + 5a⁴b + 10a³b² + 10a²b³ + 5ab⁴ + b⁵.

How do I find the middle term?

There are n + 1 terms. If n is even, the middle term is term n/2 + 1; if n is odd, the two middle terms are terms (n + 1)/2 and (n + 3)/2.

How many terms are in a binomial expansion?

n + 1 for (a + b)ⁿ, before any like terms are combined. (x + 2)⁵ has 6 terms.

Can this calculator expand (2x+3)^n?

Yes. The coefficient is included in the power: (2x + 3)² = (2x)² + 2(2x)(3) + 3² = 4x² + 12x + 9.

Can I use variables other than x?

Yes. Any letters work, and each term can contain several variables, such as (3x − 2y)⁴ or (a + b)⁵.

Can the calculator handle negative coefficients?

Yes. Write them with a minus sign, for example (2x − 3)⁴ or (−x + 1)³; the signs of the terms are worked out exactly.

Can I expand a binomial with a fractional coefficient?

Yes. Enter terms like x/2 or 1/3; the results stay as exact fractions: (x/2 + 1/3)³ = x³/8 + x²/4 + x/6 + 1/27.

What happens if the exponent is negative?

The finite Binomial Theorem does not apply. (x + 1)⁻² is not a polynomial; it equals an infinite series valid only for |x| < 1, so the calculator explains this instead of giving a finite expansion.

Last updated: September 27, 2026.