Binomial Expansion Calculator Formula
Understand the math behind the binomial expansion calculator. Each variable explained with a worked example.
Formulas Used
Total
total = pow(a + b, n)Coeff
coeff = n >= k ? factorial(n) / (factorial(k) * factorial(n - k)) : 0Term Val
term_val = n >= k ? (factorial(n) / (factorial(k) * factorial(n - k))) * pow(a, n - k) * pow(b, k) : 0Variables
| Variable | Description | Default |
|---|---|---|
a | Value of a | 2 |
b | Value of b | 3 |
n | Exponent n | 4 |
k | Term k (0-indexed) | 2 |
How It Works
Binomial Expansion
Binomial Theorem
(a + b)^n = sum of C(n,k) × a^(n-k) × b^k for k = 0 to n
Individual Term
The k-th term (0-indexed): C(n,k) × a^(n-k) × b^k
Example: (2 + 3)⁴ = 5⁴ = 625
Worked Example
Find the k=2 term of (2+3)^4.
- 01C(4,2) = 6
- 02a^(4-2) = 2² = 4
- 03b^2 = 3² = 9
- 04Term value = 6 × 4 × 9 = 216
- 05(2+3)⁴ = 5⁴ = 625
Frequently Asked Questions
What is the binomial theorem?
The binomial theorem provides a formula for expanding (a+b)^n as a sum of terms involving powers of a and b, weighted by binomial coefficients.
How many terms in a binomial expansion?
(a+b)^n has exactly n+1 terms, corresponding to k = 0, 1, 2, ..., n.
What is the middle term?
When n is even, the middle term is at k = n/2. When n is odd, there are two middle terms at k = (n-1)/2 and k = (n+1)/2.
Learn More
Guide
How to Calculate Permutations and Combinations - Complete Guide
Learn how to calculate permutations and combinations with clear formulas and examples. Understand when order matters, factorials, and real-world counting problems.
Ready to run the numbers?
Open Binomial Expansion Calculator