🔢 Binomial Expansion Calculator – Full Polynomial Expansion Using the Binomial Theorem
The Binomial Expansion Calculator instantly expands expressions of the form (a + b)ⁿ and (a − b)ⁿ into a complete polynomial using the Binomial Theorem. Whether you need the full expansion, a specific term, the binomial coefficient row from Pascal's triangle, or a step-by-step derivation, this tool handles it all.
📐 The Binomial Theorem
For any real numbers a and b and a non-negative integer n, the Binomial Theorem states:
(a + b)ⁿ = Σ[k=0 to n] C(n,k) · a^(n−k) · b^k
where C(n,k) = n! / (k! · (n−k)!)Each term in the expansion is determined by three factors: the binomial coefficient C(n,k), the power of the first term a^(n−k), and the power of the second term b^k. For a difference expression (a − b)ⁿ, odd-indexed terms carry a negative sign because (−b)^k = −b^k for odd k.
🧮 Quick Example: (x + 2)⁴
Applying the Binomial Theorem with a = x, b = 2, and n = 4:
| Term | k | C(4,k) | Expression |
|---|---|---|---|
| T₁ | 0 | 1 | x⁴ |
| T₂ | 1 | 4 | 8x³ |
| T₃ | 2 | 6 | 24x² |
| T₄ | 3 | 4 | 32x |
| T₅ | 4 | 1 | 16 |
Result: x⁴ + 8x³ + 24x² + 32x + 16
🔍 General Term Formula (Specific Term Finder)
You don't always need the entire expansion. The general term T(k+1) is:
T(k+1) = C(n,k) · a^(n−k) · b^kEnable the "Find specific term" toggle and enter the term number to extract exactly one term — useful for exam problems that ask "find the coefficient of x³" without requiring the full expansion.
🔺 Pascal's Triangle and Binomial Coefficients
The binomial coefficients for any exponent n form one row of Pascal's triangle. Each value C(n,k) is the sum of the two values directly above it in the triangle. For n = 5, the row is:
1 5 10 10 5 1A useful property: the sum of all binomial coefficients in row n always equals 2ⁿ. This follows from setting a = b = 1 in the Binomial Theorem.
➖ Difference Expansions: (a − b)ⁿ
For difference expressions, substitute −b for b. The sign of each term alternates: positive for even k, negative for odd k. Example: (x − y)³ = x³ − 3x²y + 3xy² − y³.
x = 2, y = 3) in the substitutions field to evaluate the polynomial numerically. This is especially useful for verifying expansions like (1 + 0.1)¹⁰ ≈ 2.5937.📚 Common Applications
- Algebra & Calculus — Expanding products, simplifying expressions, and deriving derivatives of polynomial powers.
- Probability & Statistics — The binomial coefficients C(n,k) directly give the number of ways to choose k successes from n trials in a binomial distribution.
- Number Theory — Proving divisibility results, e.g. showing that (1 + p)ⁿ ≡ 1 (mod p²).
- Approximations — For small x, (1 + x)ⁿ ≈ 1 + nx provides a first-order approximation widely used in physics and engineering.
⚙️ Supported Input Formats
The calculator accepts simple monomial terms for both a and b:
- Constants:
3,-2,0.5 - Single variables:
x,y,a - Monomials:
2x,3y,x^2,2x^3 - Multi-variable monomials:
xy,2x^2y
The exponent n can be any non-negative integer from 0 to 30. Larger exponents are capped to avoid generating polynomials with billions of terms.
💡 Accuracy and Limitations
Binomial coefficients are computed exactly using integer arithmetic, so there is no floating-point rounding for the combinatorial values. However, when the input terms contain decimal coefficients (e.g. 1.5x), the resulting term coefficients are floating-point numbers. For exponents above 20, some coefficient values may exceed the safe integer range of JavaScript, so results are rounded to the nearest integer.
Pro tip: Use the Steps tab to see every C(n,k) value and how each term is constructed — great for exam preparation and checking textbook work.