What is the binomial expansion?
Type a binomial in brackets to a whole power, such as (x + 2)^5. The binomial expansion calculator multiplies it out by the binomial theorem and shows each term, the binomial coefficients, and any one term you pick.
- Expansion
- x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32
(x + 2)^5 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.
- Binomial coefficients
- 1, 5, 10, 10, 5, 1
- Number of terms
- 6
- Each term
- Term 1: C(5, 0) × x⁵ × 2⁰ = x⁵; Term 2: C(5, 1) × x⁴ × 2¹ = 10x⁴; Term 3: C(5, 2) × x³ × 2² = 40x³; Term 4: C(5, 3) × x² × 2³ = 80x²; Term 5: C(5, 4) × x¹ × 2⁴ = 80x; Term 6: C(5, 5) × x⁰ × 2⁵ = 32
Expansion: x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32. (x + 2)^5 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.
How is each term found?
How to calculate
Expands a typed binomial power such as (x + 2)^5 or (3x − y)^4 by the binomial theorem, with every term and the binomial coefficients in exact fractions.
Example with the default inputs (Binomial power (x + 2)^5): (x + 2)^5 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.
Method: (a + b)^n = Σ C(n, k) a^(n−k) b^k, k = 0 to n, with C(n, k) = n! ÷ (k!(n − k)!).
- The bracket holds two terms that are not like terms. Coefficients are exact fractions: 0.5 is 1/2.
- n is a whole number from 0 to 30.
Worked examples
Each example is checked against the calculator on every build.
- Binomial power (x + 2)^5 gives Expansion x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32, Binomial coefficients 1, 5, 10, 10, 5, 1, Number of terms 6.Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem ((x + y)^n = Σ C(n, k) x^(n−k) y^k), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem
- Binomial power (3x - y)^4, Show term number 2 gives Expansion 81x^4 - 108x^3 y + 54x^2 y^2 - 12x y^3 + y^4, Chosen term −108x³ y.Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem, Example 2b ((3x − y)⁴ = 81x⁴ − 108x³y + 54x²y² − 12xy³ + y⁴), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem
- Binomial power (x + 2y)^16, Show term number 10 gives Chosen term 5857280x⁷ y⁹, Number of terms 17.Source: OpenStax, Algebra and Trigonometry 2e, §13.6 Binomial Theorem, Example 3 (the tenth term of (x + 2y)¹⁶ is 5,857,280x⁷y⁹), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-6-binomial-theorem
- Binomial power (1 - x)^3 gives Expansion -x^3 + 3x^2 - 3x + 1, Each term Term 1: C(3, 0) × 1³ × (−x)⁰ = 1; Term 2: C(3, 1) × 1² × (−x)¹ = −3x; Term 3: C(3, 2) × 1¹ × (−x)² = 3x²; Term 4: C(3, 3) × 1⁰ × (−x)³ = −x³.
How it works
For the typed (a + b)^n:
- Binomial coefficient: C(n, k) = n! ÷ (k!(n − k)!), worked out exactly.
- Term k + 1 (k = 0 to n): C(n, k) × a^(n−k) × b^k.
- Expansion: the sum of the n + 1 terms.
- Chosen term r (1 to n + 1): C(n, r − 1) × a^(n−r+1) × b^(r−1).
Input. One bracket with two terms, to a whole power: (x + 2)^5, (3x − y)^4, (1 − x)^3. a is the first term as typed and b the second; a minus sign belongs to its term. Terms hold numbers, letters a to z except e, whole powers and products. A term that is 0 is left out, so the bracket must keep two terms, and the two may not be like terms (the same letters to the same powers, such as x and 2x, or two numbers). n is a whole number from 0 to 30. The term number is optional; when given it must be 1 to n + 1. Anything else gets a message instead of an answer.
Exact arithmetic. Every coefficient is an exact fraction: 0.5 is 1/2.
Output format. The expansion is written with the highest total power first, then letters in alphabetical order, then the number; a fraction comes after the letters. Letters in a product are separated by a space (108x^3 y). The chosen term is written the same way, with powers as superscripts and a true minus sign (−108x³ y). The coefficients are C(n, 0) to C(n, n), separated by commas. The steps list each term as C(n, k) × a^(n−k) × b^k in the order k = 0 to n, with a or b in brackets when it is negative, a fraction, or more than one factor, powers as superscripts (including 0 and 1) and true minus signs.
Worked examples by hand
(x + 2)^5. Coefficients 1, 5, 10, 10, 5, 1; powers of 2: 1, 2, 4, 8, 16, 32. Terms: x^5, 10x^4, 40x^3, 80x^2, 80x, 32: x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.
(3x − y)^4 (OpenStax Example 2b). 81x^4 − 108x^3y + 54x^2y^2 − 12xy^3 + y^4; term 2 is −108x^3y.
(x + 2y)^16, term 10 (OpenStax Example 3). C(16, 9) × x^7 × (2y)^9 = 11,440 × 512 x^7y^9 = 5,857,280x^7y^9; 17 terms in all.
(1 − x)^3. a = 1, b = −x. Terms 1, 3(−x) = −3x, 3x^2, −x^3: −x^3 + 3x^2 − 3x + 1.
Other questions people ask
How do I expand (x + 2)^5?
Use the coefficients 1, 5, 10, 10, 5, 1 (row 5 of Pascal’s triangle) with falling powers of x and rising powers of 2: x^5 + 5(2)x^4 + 10(4)x^3 + 10(8)x^2 + 5(16)x + 32 = x^5 + 10x^4 + 40x^3 + 80x^2 + 80x + 32.
What formula does binomial expansion use?
The binomial theorem: (a + b)^n = Σ C(n, k) a^(n−k) b^k for k = 0 to n, where C(n, k) = n! ÷ (k!(n − k)!).
How many terms does (a + b)^n have?
n + 1. (x + 2y)^16 has 17 terms.
How do I expand a binomial with a minus sign?
Treat the minus as part of the second term. In (1 − x)^3, b = −x, so the odd powers are negative: 1 − 3x + 3x^2 − x^3.
How do I find just one term?
Fill in the term number. Term r is C(n, r − 1) a^(n−r+1) b^(r−1); the tenth term of (x + 2y)^16 is 5,857,280x^7y^9.
Can I expand (x + y + z)^n here?
No. This page takes two terms in the bracket. For a longer sum, use the polynomial or combine like terms calculator, which multiply out any bracket.