Skip to content
MoneyDeck

Binomial Expansion Calculator

Expand (ax + by)ⁿ term by term and find any specific term

Updated · Free, no signup

Leave blank for a constant.

Leave blank to expand (ax + b)ⁿ, or enter y for (ax + by)ⁿ.

Term r uses k = r − 1 (terms are counted from 1).

Expansion

16x^4 - 96x^3 + 216x^2 - 216x + 81

Term r

216x^2

Coefficient of term r

216

Binomial coefficient C(n, r − 1)

6

Number of terms

5

Sum of coefficients (a + b)ⁿ

1

  • (2x − 3)^4 has 5 terms; term 3 uses C(4, 2) = 6.
  • The middle term is term 3, which has the largest binomial coefficient C(4, 2) = 6.
  • Because b is negative, the signs of the terms alternate.

Binomial coefficients C(n, k)

Every term of the expansion

TermC(n, k)aⁿ⁻ᵏ · bᵏTerm value
111616x^4
24-24−96x^3
3636216x^2
44-54−216x
518181

About the Binomial Expansion Calculator

This binomial expansion calculator multiplies out expressions of the form (ax + by)ⁿ using the binomial theorem. Enter the coefficient and variable of each part of the binomial and the power n, and it returns the fully expanded polynomial, a table of every term with its binomial coefficient, and the exact r-th term on its own.

It is meant for algebra, pre-calculus and A-level students working through binomial theorem questions — expanding (2x − 3)⁵, finding the coefficient of x⁴ in (x + 2)⁹, or locating the middle or constant term — and for teachers who want a quick answer key. Leave the second variable blank to expand a binomial with a constant, such as (x + 5)⁶.

Coefficients are computed with exact whole-number arithmetic, so even large powers (up to n = 30) give exact results with no rounding. Negative coefficients are handled automatically: the signs alternate when the second term is negative.

How to use the binomial expansion calculator

  1. 1Enter the coefficient and variable of the first term, e.g. 2 and x for 2x.
  2. 2Enter the coefficient of the second term (negative for subtraction) and leave its variable blank for a constant.
  3. 3Enter the power n.
  4. 4Choose which term number r you want isolated.
  5. 5Read the full expansion and check the table for each coefficient.

Formula and method

(a + b)ⁿ = Σ (k = 0 … n) C(n, k) · aⁿ⁻ᵏ · bᵏ, C(n, k) = n! ÷ (k! (n − k)!)

The binomial theorem expands a power of a two-term sum into n + 1 terms. Term number r (counting from 1) uses k = r − 1: it equals C(n, k) times the first term raised to n − k times the second term raised to k. The powers of the first term fall from n to 0 while the powers of the second rise from 0 to n, so every term has total degree n.

The binomial coefficients C(n, k) are the numbers in row n of Pascal’s triangle and are symmetric: C(n, k) = C(n, n − k). Setting every variable to 1 shows that the coefficients of the expansion add up to (a + b)ⁿ. When b is negative, odd powers of b are negative, so the signs alternate.

n
The power (a non-negative whole number)
k
Index of the term, from 0 to n (term number r = k + 1)
C(n, k)
Binomial coefficient “n choose k”
a, b
The two terms of the binomial, including coefficients

Worked examples

Expand (2x − 3)⁴

Using C(4, k) = 1, 4, 6, 4, 1: 1·2⁴x⁴ = 16x⁴, 4·2³·(−3)x³ = −96x³, 6·2²·9x² = 216x², 4·2·(−27)x = −216x and (−3)⁴ = 81. The coefficients add up to (2 − 3)⁴ = 1.

Coefficient of x⁴ in (x + 2)⁹

x⁴ appears when k = 5 (term 6): C(9, 5)·2⁵ = 126 × 32 = 4,032. The sum of all coefficients is 3⁹ = 19,683.

Two variables: (x + y)⁵

With both coefficients equal to 1 the coefficients are just row 5 of Pascal’s triangle: 1, 5, 10, 10, 5, 1, which add up to 2⁵ = 32.

Frequently asked questions

What is the binomial theorem?+

It is the rule (a + b)ⁿ = Σ C(n, k) aⁿ⁻ᵏ bᵏ for k = 0 to n. It lets you expand any whole-number power of a two-term expression without multiplying the brackets out by hand.

How do I find a specific term in a binomial expansion?+

The (k + 1)-th term is C(n, k) · aⁿ⁻ᵏ · bᵏ. For the term containing xᵐ in (ax + b)ⁿ, solve n − k = m for k, then evaluate that single term. This calculator does it when you set the term number r = k + 1.

How many terms are in the expansion of (a + b)ⁿ?+

There are n + 1 terms. When n is even there is a single middle term (term n/2 + 1); when n is odd there are two middle terms with equal binomial coefficients.

How is Pascal’s triangle related to binomial expansion?+

Row n of Pascal’s triangle lists the binomial coefficients C(n, 0) … C(n, n). Each entry is the sum of the two above it, which mirrors how multiplying by one more (a + b) combines neighbouring terms.

How do I find the sum of the coefficients?+

Set every variable equal to 1. The sum of the coefficients of (ax + by)ⁿ is therefore (a + b)ⁿ — for example (2x − 3)⁴ has coefficients summing to (−1)⁴ = 1.

What about negative or fractional powers?+

For negative or fractional n the expansion becomes an infinite series that only converges for |b/a| < 1 (the generalised binomial series). This tool covers whole-number powers, which always give a finite polynomial.

Related tools