Binomial Expansion Calculator

Math Updated 16 Jun 2026

Expand (a + b)^n using the binomial theorem. Enter the two terms a and b and the power n, and this calculator lists every term, the numerical value, the matching row of Pascal's triangle, and the term count.

Formula

(a+b)^n = Σ C(n,k)·a^(n−k)·b^k for k=0..n · C(n,k) = n!/(k!(n−k)!)
  • The binomial theorem expands (a + b)^n into a sum of n+1 terms, one for each k from 0 to n.
  • Each term is C(n,k)·a^(n−k)·b^k: the binomial coefficient times a to a decreasing power times b to an increasing power.
  • The coefficients C(n,0), C(n,1), …, C(n,n) are exactly row n of Pascal's triangle.
  • Across every term the exponents of a and b always add up to n.
  • This calculator caps n at 8 to keep the expansion readable; larger powers follow the same pattern.

Example Calculation

Inputs
  • a (first term): 1
  • b (second term): 1
  • n (power, max 8): 4

Suppose you enter: a (first term) = 1, b (second term) = 1, n (power, max 8) = 4. The calculator applies the formula ((a+b)^n = Σ C(n,k)·a^(n−k)·b^k for k=0..n · C(n,k) = n!/(k!(n−k)!)) and shows all output values below. Change any input field to immediately see how the result changes.

Frequently asked questions

What is the binomial theorem?
It is a formula for expanding a power of a sum, (a + b)^n, into a sum of terms of the form C(n,k)·a^(n−k)·b^k without multiplying the bracket out by hand.
Where do the coefficients come from?
The coefficients are the binomial coefficients C(n,k), which are exactly the numbers in row n of Pascal's triangle.
How many terms does the expansion have?
An expansion of (a + b)^n always has n + 1 terms, one for each value of k from 0 up to n.
What pattern do the exponents follow?
The power of a starts at n and decreases to 0, while the power of b starts at 0 and increases to n. In every term the two exponents add up to n.
Why is n limited to 8?
The cap keeps the displayed expansion and Pascal's row easy to read. The same theorem applies for any whole-number power.