Binomial Theorem Calculator - Expand (a+b)^n + Steps

Expanding

(2x  3)4

Try an example:

Leave a variable blank for a plain number (like the −3 in 2x − 3). Use ^ for powers, e.g. x^2.

Full expansion

16x496x3 + 216x2216x + 81

Number of terms

5

Sum of all coefficients

1 = (2 3)4

Binomial coefficients — row 4 of Pascal’s triangle

1
11
121
1331
14641

These are the C(4, k) values — every coefficient before the variable powers get multiplied in.

See every term, step by step
Each term of the expansion with its binomial coefficient and full coefficient
kC(4, k)CoefficientTerm
011616x4
149696x3
26216216x2
34216216x
418181

Find one term without expanding everything

2

Term 2  (k = 1)

96x3

T2 = C(4, 1) · (first term)3 · (second term)1 = 4 · …

How to Use This Calculator

  1. Type the first term into 1st coefficient and 1st variable — for 2x, that’s a 2 and an x.
  2. Type the second term into 2nd coefficient and 2nd variable. For a subtraction like 2x − 3, use −3 and leave the variable blank.
  3. Set the Power (n) — the exponent on the whole bracket (0 to 20).
  4. Read the full expansion at the top, then open the step-by-step table to see how each coefficient is built from C(n, k).
  5. Drag the Find one term slider to pull out a single term — handy when a problem only asks for, say, the 4th term or one coefficient.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Binomial Theorem Calculator: How to Expand (a + b)ⁿ Term by Term

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Binomial theorem calculator showing Pascal's triangle rows feeding the coefficients of an expanded (a+b)^n polynomial.

A binomial theorem calculator expands (a + b)ⁿ into all n + 1 of its terms at once, so you never have to multiply the bracket out by hand. Squaring (a + b) is easy enough. But (a + b)⁵ already has six terms, and (2x − 3)⁸ has coefficients running into the thousands with signs flipping every step. The binomial theorem replaces that grind with one formula, and this page shows how it works: where the coefficients come from, how to read a single term straight out of the middle without expanding the rest, and the two sign traps that ruin more exam answers than anything else.

The Formula, and What Each Piece Counts

The binomial theorem says that for any non-negative whole number n,

(a + b)ⁿ = ∑ C(n, k) · aⁿ⁻ᵤ · bᵤ  for k = 0 to n

Three things happen in lockstep as k climbs from 0 to n. The power of a slides down from n to 0, the power of b climbs from 0 to n, and the two exponents always add up to n. That last fact is a free error-check: in any term of (a + b)⁸, the a-power and the b-power must total 8, so a term like a⁵b⁴ is impossible — the exponents there add to 9. The multiplier out front, C(n, k), is the binomial coefficient, read “n choose k.” It counts how many of the n brackets you took a b from, which is exactly why it equals the same combination you’d compute in probability.

Spelled out, C(n, k) = n! / (k! (n − k)!), a ratio of factorials. For C(8, 3) that’s 8! / (3! · 5!) = 40320 / (6 · 120) = 56. Order doesn’t matter here, which is the whole difference between a combination and a permutation — picking b from brackets 1, 4, 7 gives the same term as picking 7, 4, 1.

Pascal’s Triangle or the Combination Formula?

There are two honest ways to get those coefficients, and which one wins depends entirely on the size of n. Both give identical numbers — row n of Pascal’s triangle is the list C(n, 0), C(n, 1), …, C(n, n).

When to use Pascal's triangle versus the combination formula
MethodHow it worksBest when
Pascal’s triangleStart each row with 1, then add the two numbers above to fill the middle: 1, then 1 1, then 1 2 1, then 1 3 3 1…n is small (say 6 or less) and you want every coefficient at a glance.
Combination formulaCompute C(n, k) = n! / (k!(n − k)!) directly for whichever k you need.n is large, or you only want one term and don’t care about the rest.

Building the triangle down to row 12 by hand is tedious and one slip early on poisons every row beneath it. The formula sidesteps that — it’s what an nCr calculator uses, and it’s how the tool above stays exact even at n = 20, where the middle coefficient C(20, 10) is 184,756. For anything you’d actually do on paper, though, the triangle is faster up to about row 6.

Expanding (2x − 3)⁴ Step by Step

Watch what happens when the terms aren’t a tidy a and b. Here a = 2x, b = −3, and n = 4, so the coefficients from row 4 are 1, 4, 6, 4, 1. The key move most people fumble is that the whole term gets raised to the power, coefficient and all — it’s (2x)⁴, not 2x⁴.

  • k = 0: 1 · (2x)⁴ · (−3)⁰ = 1 · 16x⁴ · 1 = 16x⁴
  • k = 1: 4 · (2x)⁵ · (−3)₁ = 4 · 8x⁵ · (−3) = −96x⁵
  • k = 2: 6 · (2x)₂ · (−3)₂ = 6 · 4x₂ · 9 = 216x₂
  • k = 3: 4 · (2x)₁ · (−3)₃ = 4 · 2x · (−27) = −216x
  • k = 4: 1 · (2x)⁰ · (−3)⁴ = 1 · 1 · 81 = 81

Put together: 16x⁴ − 96x⁵ + 216x₂ − 216x + 81. Notice the signs alternate, which always happens when b is negative — the odd powers of a negative b stay negative, the even powers turn positive. There’s a quick sanity check built into the numbers: set x = 1 and every term collapses to its coefficient, so 16 − 96 + 216 − 216 + 81 should equal (2 − 3)⁴ = (−1)⁴ = 1. It does. If the middle term still feels shaky, expanding a simple square first with the FOIL calculator is a good warm-up before trusting the fourth power.

Pulling Out a Single Term Without the Full Expansion

Exam questions love to ask for just one piece — “find the coefficient of x⁵ in (2x + 1)⁸” — and expanding all nine terms to answer it is a waste. The general term does it in one line:

Tᵤ₊₁ = C(n, k) · aⁿ⁻ᵤ · bᵤ

For the coefficient of x⁵ in (2x + 1)⁸, the a-power must be 5, so n − k = 5 gives k = 3. Then the term is C(8, 3) · (2x)⁵ · 1₃ = 56 · 32x⁵ · 1 = 1,792x⁵. The coefficient is 1,792, found without touching the other eight terms. One caution on the indexing: the term where k = 3 is the 4thterm, because k starts at 0. If a question asks for “the 4th term,” use k = 3; the slider in the calculator above uses the same 1-based term numbering so you can check yourself. This shortcut is the backbone of how the binomial distribution calculator picks out the probability of exactly k successes.

Pascal’s Triangle: The First Eight Rows

Keep this handy and you can write out any expansion up to the eighth power from memory. Each row is symmetric, each starts and ends in 1, and each row sums to 2ⁿ.

Rows 0 through 8 of Pascal's triangle
nCoefficients (row n)Row sum (2ⁿ)
011
11, 12
21, 2, 14
31, 3, 3, 18
41, 4, 6, 4, 116
51, 5, 10, 10, 5, 132
61, 6, 15, 20, 15, 6, 164
71, 7, 21, 35, 35, 21, 7, 1128
81, 8, 28, 56, 70, 56, 28, 8, 1256

That row-sum pattern isn’t a coincidence — setting a = b = 1 in the theorem turns (1 + 1)ⁿ into the sum of every coefficient, so the coefficients of any binomial power always add to 2ⁿ. It’s the same identity the calculator reports as “sum of all coefficients.”

Where Binomial Expansion Earns Its Keep

This isn’t just an algebra drill. Flip a fair coin 8 times and the chance of exactly 3 heads is C(8, 3) · (½)₃ · (½)⁵ — a single term of ((½) + (½))⁸. That’s the entire logic behind binomial probability, where each term counts the ways an event can land k times. The theorem also powers fast approximations: for small x, (1 + x)ⁿ ≈ 1 + nx because the later terms shrink to almost nothing, which is how engineers estimate (1.02)₁⁰ without a calculator. And it’s a natural next step after ordinary polynomial arithmetic once the powers grow past a plain square. For the deeper story — including how the theorem stretches to fractional and negative exponents as an infinite series — the binomial theorem has a long history worth reading.

The Sign Traps a Binomial Theorem Calculator Handles Automatically

  • Forgetting the coefficient gets raised too. In (2x − 3)⁴, the first term is (2x)⁴ = 16x⁴, not 2x⁴. The 2 is inside the power, so it becomes 2⁴ = 16. Dropping it is the single most common mistake.
  • Losing track of a negative b. When the second term is negative, its odd powers stay negative and its even powers go positive, so the signs alternate. Treating (−3)₃ as +27 instead of −27 flips a term the wrong way.
  • Confusing “term number” with k. The general term uses k starting at 0, so the 4th term is k = 3, not k = 4. Plug in the wrong one and you get an adjacent term.
  • Adding exponents that don’t total n. Every term of (a + b)ⁿ must have its a-power and b-power sum to n. If they don’t, you’ve slipped somewhere — this is the fastest way to catch an error before you finish.

The calculator above avoids all four automatically: it raises each full term to its power, keeps negative signs exact, numbers the terms from 1 the way exam questions do, and guarantees the exponents in every term add to n. Type in any binomial — two variables, a variable and a number, positive or negative coefficients — and read the expansion, the Pascal row, and any single term you need.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.