StatsSolve logo
Statistics & probability tools
Binomial theorem • Pascal's triangle • Coefficients • Series

Binomial Expansion Calculator

Expand (a + b)n term by term with exact coefficients, pull out any single term, or switch to series mode for negative and fractional powers. Every step of the working is written out for you.

Last updated October 21, 2026  •  Written by Mark, StatsSolve  •  Free, no sign-up

1 1 1 1 2 1 1 3 3 1 (a + b)³ = a³ + 3a²b + 3ab² + b³

Binomial Theorem Expansion Calculator

Enter the two terms and the power. Letters, fractions and decimals all work, and results update as you type.

StatsSolve Statistics Tool

Terms can be numbers (5, -2/3, 0.5), letters (x, -y) or both (2x, 3y, x^2).

The series is (a + bx)^n. Leave x blank to see only the expansion.

Quick:
Size of each coefficient
PositiveNegative
Term number, k + 1
Step-by-step workingWorking appears here.
Term table
Same calculation in other toolsSyntax appears here.
SummarySummary appears here.
n
Exact up to n = 100

Big-integer fractions keep every coefficient whole and exact, even C(100, 50) with its 29 digits.

x
Letters, fractions and powers

Type 2x, −y, x^2 or 3/4 and the calculator multiplies out the powers and signs for you.

∞
Series for any power

Negative and fractional powers give a binomial series with the range of x where it is valid and an error check.

What Does a Binomial Expansion Calculator Do?

A binomial expansion calculator multiplies out a power of a two-term expression such as (2x − 3)4 and writes the answer as a sum of simple terms: 16x⁴ − 96x³ + 216x² − 216x + 81. It does the same job as multiplying the bracket by itself four times, only without the arithmetic slips.

The tool on this page works in two ways. For a whole-number power it returns the complete expansion with every binomial coefficient, a term-by-term table and the matching row of Pascal's triangle. For a negative or fractional power, such as (1 + x)−2 or √(1 + x), it returns the first terms of the infinite series and tells you the range of x where that series is valid.

You can type plain numbers, fractions, decimals, or terms with a letter, like 3x, −y or x^2. Coefficients are kept as exact fractions, so nothing is rounded along the way.

How Do You Use This Binomial Expansion Calculator?

Pick a mode, fill in the two terms and the power, and the answer appears as you type.

  1. Whole-number power. Enter the first term, the second term and n, a whole number from 0 to 100. Terms can be numbers (5, -2/3, 0.5), variables (x, y) or both (2x, -3y, x^2).
  2. Optional: one term. Type a term number r to get only the r-th term, for example the 4th term of (2x + 3)6.
  3. Any power. Switch to the series mode, enter (a + bx)n with a and b as numbers and n as an integer, fraction or decimal, choose how many terms to show, and optionally give an x value to test the approximation.

The result cards show the expansion itself, the number of terms, the sum of the coefficients and the largest coefficient. The working lists the general term and every term's arithmetic, and the bar chart shows how the coefficients rise and fall across the expansion.

What Is the Binomial Theorem?

The binomial theorem says that (a + b)n equals the sum, for k from 0 to n, of C(n, k) × an−k × bk. Here C(n, k) = n! / (k!(n − k)!) is the binomial coefficient, the number of ways to choose k items from n.

Two patterns hold in every expansion. The power of a falls from n to 0 while the power of b rises from 0 to n, so the two exponents in each term always add up to n. And there are always n + 1 terms.

The reason the coefficients are counting numbers is that multiplying out n copies of (a + b) means picking a or b from each bracket. A term with k copies of b can be built in C(n, k) different ways, and that count is the coefficient. Isaac Newton extended the idea in the 1660s to negative and fractional powers, where the sum no longer stops and becomes an infinite series. The binomial distribution calculator uses exactly these coefficients for its probabilities.

How Do You Expand (a + b)n Step by Step?

Write the general term, then plug in k = 0, 1, 2 and so on up to n. Each step needs one coefficient, one power of the first term and one power of the second.

  1. Write the formula: C(n, k) × (first term)n−k × (second term)k.
  2. Find the coefficients C(n, 0) to C(n, n) from Pascal's triangle or the factorial formula.
  3. Put the powers in: the first term counts down from n, the second counts up from 0.
  4. Multiply each coefficient by the numeric parts of the two terms. Watch the signs when the second term is negative: odd powers of a negative number stay negative.
  5. Add the terms in order and collect any that share the same variable power.

A quick check at the end: put every variable equal to 1 and compare. If your expansion of (2x − 3)4 is right, its coefficients must add up to (2 − 3)4 = 1. The calculator reports that sum for you.

Worked Example: Expand (2x − 3)4

Here n = 4, the first term is 2x and the second term is −3. The coefficients from row 4 of Pascal's triangle are 1, 4, 6, 4, 1.

  • k = 0: 1 × (2x)4 × (−3)0 = 16x⁴
  • k = 1: 4 × (2x)3 × (−3) = 4 × 8x³ × (−3) = −96x³
  • k = 2: 6 × (2x)2 × 9 = 216x²
  • k = 3: 4 × (2x) × (−27) = −216x
  • k = 4: 1 × 1 × 81 = 81

So (2x − 3)4 = 16x⁴ − 96x³ + 216x² − 216x + 81. The coefficients add up to 16 − 96 + 216 − 216 + 81 = 1, which matches (2 − 3)4. Enter 2x, −3 and n = 4 in the calculator to see the same result.

Worked Example: Two Variables in (3x + 2y)5

With two letters, each term carries a power of both. For n = 5 the coefficients are 1, 5, 10, 10, 5, 1, and the numeric parts multiply as 35−k × 2k.

The result is 243x⁵ + 810x⁴y + 1080x³y² + 720x²y³ + 240xy⁴ + 32y⁵. For example, the third term is 10 × 27 × 4 = 1080. Substituting x = y = 1 gives 243 + 810 + 1080 + 720 + 240 + 32 = 3125 = 55, exactly (3 + 2)5.

The same method handles powers on the variables. For (x² + 3)3 the terms are x⁶ + 9x⁴ + 27x² + 27. Just type x^2 as the first term.

How Do You Find a Single Term or Coefficient?

You do not need the whole expansion to find one term. The (k + 1)-th term of (a + b)n is C(n, k) × an−k × bk, and that is all the work.

Take the 4th term of (2x + 3)6. That means k = 3, so the term is C(6, 3) × (2x)3 × 33 = 20 × 8x³ × 27 = 4320x³. The coefficient of x³ in the whole expansion is therefore 4320.

For exam-style questions such as “find the coefficient of x³ in (2 + x)7”, set the power of x equal to k and solve for the term. Here k = 3 gives C(7, 3) × 24 = 35 × 16 = 560. The full coefficient list for (2 + x)7 is 128, 448, 672, 560, 280, 84, 14, 1, and 560 sits in the x³ position.

What Is Pascal's Triangle and How Does It Give the Coefficients?

Pascal's triangle is a table where each number is the sum of the two above it, and row n lists C(n, 0) to C(n, n). Those are exactly the coefficients in the expansion of (a + b)n.

nCoefficients of (a + b)nSum
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
101, 10, 45, 120, 210, 252, 210, 120, 45, 10, 11024

The triangle is quick up to about n = 10. After that the factorial formula is easier, and the calculator uses exact big-integer arithmetic, so even C(100, 50) = 100,891,344,545,564,193,334,812,497,256 comes out in full.

Which Patterns Do the Binomial Coefficients Follow?

A few properties let you check an expansion at a glance.

  • Symmetry. C(n, k) = C(n, n − k), so the row reads the same forwards and backwards.
  • Row sum. The coefficients of row n add up to 2n. Row 10 gives 1024.
  • Alternating sum. For n ≥ 1, the coefficients with alternating signs add up to 0. This is (1 − 1)n.
  • Number of terms. There are n + 1 of them, unless like terms merge, as in (x + x)n.
  • Middle term. When n is even, the largest coefficient is C(n, n/2). For n = 20 that is 184,756. When n is odd, the two middle coefficients are equal.

With a minus sign in the bracket, the signs of the expanded terms alternate. With both terms positive, every term is positive.

How Is the Binomial Theorem Different From FOIL?

FOIL is the binomial theorem for n = 2, and nothing more. Multiplying (a + b)(a + b) by first, outer, inner and last terms gives a² + 2ab + b², and the middle 2 is C(2, 1) from row 2 of Pascal's triangle.

FOIL stops being practical at n = 3. The cube takes two rounds of multiplying, and a fifth power takes four. The theorem gives the same result in one pass. Three identities worth memorizing are:

  • (a + b)² = a² + 2ab + b²
  • (a − b)² = a² − 2ab + b²
  • (a + b)³ = a³ + 3a²b + 3ab² + b³

For example, 103³ = (100 + 3)³ = 1,000,000 + 3(10,000)(3) + 3(100)(9) + 27 = 1,092,727. The theorem turns that kind of mental arithmetic into four easy products.

How Do You Expand a Negative or Fractional Power?

For a power that is not a whole number, the binomial series (1 + x)n = 1 + nx + n(n−1)x²/2! + n(n−1)(n−2)x³/3! + … goes on forever, and it only works when |x| < 1.

The generalized coefficient is C(n, k) = n(n − 1)…(n − k + 1) / k!, which is still defined when n is negative or a fraction. For a bracket that does not start with 1, factor the first number out: (a + bx)n = an(1 + (b/a)x)n. The series then converges for |x| < |a/b|.

Two results come up constantly. (1 + x)−1 = 1 − x + x² − x³ + …, the geometric series. And (1 + x)−2 = 1 − 2x + 3x² − 4x³ + 5x⁴ − …. For (1 + 2x)−3 the coefficients are 1, −6, 24, −80, 240, because C(−3, k) alternates in sign and 2k multiplies each one.

If n is a positive whole number the series stops by itself after n + 1 terms. That is the ordinary expansion, and the calculator shows it that way.

Worked Example: Approximating the Square Root of 1.04

Write √1.04 as (1 + x)1/2 with x = 0.04. The series has coefficients 1, 1/2, −1/8, 1/16, −5/128, so (1 + x)1/2 = 1 + x/2 − x²/8 + x³/16 − ….

With three terms: 1 + 0.02 − 0.0002 = 1.0198. Adding the fourth term, +0.000004, gives 1.019804. The exact value is 1.019803903, so three terms are already right to four decimal places.

Another check: (4 + x)1/2 at x = 0.2. Factor out 41/2 = 2 to get 2(1 + 0.05)1/2. Four terms give 2.049391, and the exact √4.2 is 2.049390. Enter a = 4, b = 1, n = 1/2 and x = 0.2 in the series mode to reproduce both numbers.

The series is good when |x| is small. Try x = 1.5 in (1 + x)1/2 and the partial sums wander away from the true value, which is the warning the calculator prints when you leave the valid range.

How Is Binomial Expansion Related to the Binomial Distribution?

The coefficients of (p + q)n are the same counts that appear in binomial probabilities. If p is the chance of success and q = 1 − p, the term C(n, k) pk qn−k is the probability of exactly k successes in n trials.

Because (p + q)n = 1n = 1, the expansion also explains why the probabilities add up to 1. For a fair coin flipped 10 times, p = q = 0.5, and every probability is a coefficient from row 10 divided by 210 = 1024. For example, exactly 5 heads has probability 252/1024 = 0.2461.

You can work out those probabilities with the binomial probability calculator, or see the whole distribution at once on the binomial distribution calculator, or add up tail probabilities on the binomial CDF calculator. When the number of trials is small and the population is limited, the hypergeometric calculator counts the same kind of selections without replacement.

Where Is the Binomial Theorem Used?

  • Algebra. Expanding brackets, simplifying polynomial identities and finding a coefficient without multiplying everything out.
  • Probability. The binomial distribution, and counting outcomes in repeated trials. The related geometric distribution asks how long until the first success.
  • Approximation. Quick estimates of powers and roots near 1. For example, 1.0110 ≈ 1 + 10(0.01) + 45(0.0001) + 120(0.000001) = 1.10462, against a true value of 1.104622.
  • Counting. The sum of the coefficients in row n is 2n, the number of subsets of an n-element set.
  • Calculus and series. Binomial series appear in power-series derivations, error estimates and physics formulas that use (1 + x)n for small x.

What Mistakes Do People Make When Expanding Binomials?

  • Raising only part of a term to the power. In (2x)3 the 2 is cubed too, giving 8x³, not 2x³.
  • Losing the minus sign. In (x − 2)n the second term is −2, so odd powers stay negative. Treat the bracket as (x + (−2))n.
  • Forgetting the coefficient. Writing x⁴ + x³y + … without 1, 4, 6, 4, 1 gives a wrong answer that still looks tidy.
  • Using n terms instead of n + 1. A power of 5 gives six terms.
  • Using the series outside its range. The infinite expansion of (1 + x)−1 is invalid for |x| ≥ 1.
  • Assuming (a + b)n = an + bn. It is not. (a + b)2 has a middle term 2ab, which is the classic slip.

How Do You Compute Binomial Coefficients in Excel, R and Python?

Most tools have a built-in function for C(n, k). Use it to check any single coefficient from the table above.

TaskExcel / SheetsRPythonTI-84
C(n, k)=COMBIN(n, k)choose(n, k)math.comb(n, k)n nCr k
Generalized C(n, k), any n—choose(-2, 3)scipy.special.binom(-2, 3)—
Full expansion——sympy.expand((2*x-3)**4)—

Excel's COMBIN only accepts non-negative whole numbers. R's choose and SciPy's binom accept negative and fractional n, which is what the binomial series needs: choose(1/2, 2) returns −0.125.

Frequently Asked Questions

What is a binomial expansion calculator?

It expands a power of a two-term expression, (a + b)ⁿ, into a sum of terms using the binomial theorem. For a whole-number power it lists every term with its coefficient. For a negative or fractional power it gives the first terms of the infinite series.

What is the formula for binomial expansion?

(a + b)ⁿ = Σ C(n, k) · aⁿ⁻ᵏ · bᵏ, with k running from 0 to n, where C(n, k) = n! / (k!(n − k)!). The (k + 1)-th term is C(n, k) aⁿ⁻ᵏ bᵏ.

How many terms are there in a binomial expansion?

A whole-number power n gives n + 1 terms. (x + y)⁵ has six terms. Terms merge if they share the same variable power, as in (x + 2x)ⁿ.

How do I find the coefficient of a particular term?

Use the general term C(n, k) aⁿ⁻ᵏ bᵏ and pick k to match the variable power. In (2 + x)⁷ the x³ term has k = 3, so its coefficient is C(7, 3) × 2⁴ = 560.

Can the power be negative or a fraction?

Yes, in series mode. (1 + x)⁻² = 1 − 2x + 3x² − 4x³ + … and (1 + x)^(1/2) = 1 + x/2 − x²/8 + x³/16 − …. These series are only valid when |x| < 1, or |x| < |a/b| for (a + bx)ⁿ.

What is the sum of the coefficients in a binomial expansion?

Put every variable equal to 1. The sum of the coefficients of (a + b)ⁿ is then (a + b)ⁿ with plain numbers. For (x + y)ⁿ it is 2ⁿ, and for (2x − 3)⁴ it is (2 − 3)⁴ = 1.

What is the difference between a binomial expansion and a binomial distribution?

The expansion is an algebra identity for multiplying out (a + b)ⁿ. The binomial distribution uses the same coefficients as counts: C(n, k) pᵏ qⁿ⁻ᵏ is the probability of k successes in n trials, and (p + q)ⁿ = 1 shows why the probabilities total 1.

How accurate is this binomial expansion calculator?

Whole-number expansions use exact big-integer fractions, so no rounding occurs, and the results match Python's math.comb and fractions module. Series coefficients are exact fractions where possible and double-precision decimals otherwise.

Sources: NIST Digital Library of Mathematical Functions, section 1.2 Elementary Algebra (binomial coefficients and the binomial theorem). Python documentation, math.comb. SciPy documentation, scipy.special.binom. R documentation, choose.