🧮
🧮 Math & statistics

Binomial Expansion Calculator ((a x + b)ⁿ)

Results update as you type.

Your numbers

Understanding the binomial expansion calculator — concept and principle

This calculator expands (ax + b)ⁿ into a polynomial in x, listing every term from xⁿ down to the constant. It saves you from multiplying the bracket out n times by hand and is useful for algebra homework, probability (binomial distributions), approximations such as (1 + x)ⁿ ≈ 1 + nx, and checking coefficients in series work. The power n must be a whole number from 0 to 30.

Binomial expansion of (2x + 3) to the 4thEach term multiplies C(4,k), 2 to the 4−k and 3 to the k: 16, 96, 216, 216, 81.(2x + 3)⁴: each term = 3 pieces multipliedk = 0116116x⁴k = 148396x³k = 2649216x²k = 34227216xk = 4118181constC(4,k)× 2⁴⁻ᵏ× 3ᵏ=16x⁴ + 96x³ + 216x² + 216x + 81
Multiply each column top to bottom: binomial coefficient × power of 2 × power of 3.

How it is calculated

By the binomial theorem, (ax + b)ⁿ = Σ C(n, k) · aⁿ⁻ᵏ · bᵏ · xⁿ⁻ᵏ, summed over k = 0, 1, …, n.

The principle

Writing (ax + b)ⁿ as n identical brackets multiplied together, each term of the expanded product comes from picking either ax or b from every bracket. If you pick b from exactly k brackets, you get aⁿ⁻ᵏ bᵏ xⁿ⁻ᵏ, and there are C(n, k) different ways to choose which k brackets those are. Adding up all choices gives the theorem. The coefficients C(n, k) are exactly the numbers in row n of Pascal's triangle.

Worked example

  1. Default inputs: a = 2, b = 3, n = 4, so we expand (2x + 3)⁴.
  2. k = 0: C(4,0) · 2⁴ · 3⁰ = 1 · 16 · 1 = 16 → 16x^4.
  3. k = 1: C(4,1) · 2³ · 3¹ = 4 · 8 · 3 = 96 → 96x^3.
  4. k = 2: C(4,2) · 2² · 3² = 6 · 4 · 9 = 216 → 216x^2.
  5. k = 3: C(4,3) · 2¹ · 3³ = 4 · 2 · 27 = 216 → 216x.
  6. k = 4: C(4,4) · 2⁰ · 3⁴ = 81 → 81.
  7. Result: 16x^4 + 96x^3 + 216x^2 + 216x + 81.

How to read the result

Terms are listed from the highest power of x to the constant. A quick check: put x = 1. The coefficients must add up to (a + b)ⁿ; here 16 + 96 + 216 + 216 + 81 = 625 = 5⁴. If b is negative, the signs alternate and the calculator shows them with "−". For large n the coefficients grow very fast and are shown in rounded or exponential form.

Common mistakes

Keep in mind: The theorem in this form applies only to whole-number n. For fractional or negative powers the expansion becomes an infinite series that converges only for limited values of x.

Frequently asked questions

How do I find just one term, such as the x² term?

Choose k so that n − k = 2. For (2x + 3)⁴ that is k = 2, giving 6 · 4 · 9 = 216.

How is this connected to probability?

In the binomial distribution, the chance of k successes in n trials is C(n, k) pᵏ(1 − p)ⁿ⁻ᵏ, which is one term of (p + (1 − p))ⁿ = 1.

What about (a + b + c)ⁿ?

That needs the multinomial theorem, whose coefficients are n! ÷ (i! j! k!).

Sources: NIST Digital Library of Mathematical Functions, §26.3 Lattice Paths: Binomial Coefficients (dlmf.nist.gov) · Graham, R. L., Knuth, D. E., Patashnik, O., Concrete Mathematics, Chapter 5

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →