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

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).
| Method | How it works | Best when |
|---|---|---|
| Pascal’s triangle | Start 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 formula | Compute 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ⁿ.
| n | Coefficients (row n) | Row sum (2ⁿ) |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 1, 1 | 2 |
| 2 | 1, 2, 1 | 4 |
| 3 | 1, 3, 3, 1 | 8 |
| 4 | 1, 4, 6, 4, 1 | 16 |
| 5 | 1, 5, 10, 10, 5, 1 | 32 |
| 6 | 1, 6, 15, 20, 15, 6, 1 | 64 |
| 7 | 1, 7, 21, 35, 35, 21, 7, 1 | 128 |
| 8 | 1, 8, 28, 56, 70, 56, 28, 8, 1 | 256 |
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.



