Binomial Formula Calculator: Expand (a + b)^n
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A binomial formula calculator expands a power such as (a + b)^n into its equivalent polynomial, using the binomial theorem. Enter the two terms a and b and the nonnegative integer exponent n; the calculator returns each term with its coefficient, including the correct powers of a and b.
Formula
The binomial theorem is:
(a + b)n = Σk=0n C(n,k)an−kbk
Here, a and b are the two terms in the binomial, n is a nonnegative integer exponent, k is the term index from 0 through n, and C(n,k), also written as n choose k, is the binomial coefficient. The coefficient is calculated by C(n,k) = n! / (k!(n−k)!), where ! denotes factorial. The displayed outputs are the first three terms, for k = 0, 1, and 2. The complete expansion has n + 1 terms; for exponents greater than 2, further terms follow the same pattern.
Worked Example
Use the default inputs a = 2, b = 3, and n = 4. The full expansion is:
(2 + 3)4 = Σk=04 C(4,k)24−k3k
- k = 0: C(4,0) × 24 × 30 = 1 × 16 × 1 = 16.
- k = 1: C(4,1) × 23 × 3 = 4 × 8 × 3 = 96.
- k = 2: C(4,2) × 22 × 32 = 6 × 4 × 9 = 216.
- k = 3: C(4,3) × 2 × 33 = 4 × 2 × 27 = 216.
- k = 4: C(4,4) × 20 × 34 = 1 × 1 × 81 = 81.
So (2 + 3)4 = 16 + 96 + 216 + 216 + 81 = 625. The first three calculator outputs are 16, 96, and 216. As a check, evaluating the original expression gives 54 = 625.
How the Binomial Expansion Works
Every term follows a predictable rule: the power of a decreases by one as the power of b increases by one. In each term, those two exponents add up to n. The coefficient is selected from row n of Pascal’s triangle, counting the top row as row 0. For n = 4, that row is 1, 4, 6, 4, 1.
This relationship is useful for expanding powers without multiplying a binomial by itself repeatedly. It also explains why there are exactly n + 1 terms and why the coefficients read the same forward and backward: C(n,k) = C(n,n−k).
When to Use a Binomial Formula Calculator
Use the expansion when you need an exact polynomial form, want to check algebra, or need a particular coefficient or term. For example, the coefficient of x3 in (x + 2)5 is found at k = 3: C(5,3) × 12 × 23 = 10 × 8 = 80. The corresponding term is 80x2, not 80x3, because the exponent of the first term is n − k. If the binomial is (2 + x)5 instead, the x3 term is 80x3. Pay attention to which part is a and which is b.
The binomial theorem also appears in probability and combinatorics. For example, the coefficients count ways of selecting k items from n when order does not matter. In an algebra expansion, however, the coefficient alone is not the whole term: it must be multiplied by the relevant powers of both binomial terms.
Common Errors and Calculator Limits
- Misplacing the powers: the term is C(n,k)an−kbk, not C(n,k)akbn−k under this indexing convention.
- Forgetting parentheses: (a + b)n is not the same as a + bn. The exponent applies to the entire binomial.
- Using a noninteger exponent: the finite binomial expansion and integer-indexed coefficients here require n to be a nonnegative integer. Noninteger powers have a different, generally infinite series under suitable conditions.
- Confusing signs: for (a − b)n, use b as the negative term or replace each b contribution with (−b)k; signs alternate accordingly.
- Rounding too early: keep exact integer coefficients and powers where possible, and round only a final decimal result. Large exponents can produce very large values.
This calculator’s three output lines show only the first three terms, not the entire expansion when n exceeds 2. Continue the pattern for the remaining values of k, or use an algebra system that displays all terms if you need the complete polynomial. The result is exact for ordinary algebraic inputs; if a and b are decimals, the displayed numerical terms may be subject to rounding.
Frequently Asked Questions
What is the binomial formula?
The binomial theorem states that (a + b)n equals the sum of C(n,k)an−kbk for every integer k from 0 to n, when n is a nonnegative integer.
How many terms does a binomial expansion have?
For exponent n, the expansion has n + 1 terms. For example, a fourth power has five terms, corresponding to k = 0, 1, 2, 3, and 4.
How do I find a specific term?
Number terms starting at k = 0 for the first term. Substitute that k into C(n,k)an−kbk. If you are given a term’s position starting at 1, subtract 1 to get k.
Does the formula work for subtraction?
Yes. Write a − b as a + (−b), then apply the same theorem. The factor (−b)k makes odd-k terms negative and even-k terms positive.
Why is C(n,k) also called a combination?
It counts the number of ways to choose k items from n when the order of selection does not matter. This count supplies the coefficient because the same powers can arise from multiple selections during multiplication.
Related
Formula used
in a | First term a | - | 2 | in b | Second term b | - | 3 | in n | Exponent n | - | 4 | 0 out term0 | First term | - | ncr(n,0)*a^n*b^0 | 0 out term1 | Second term | - | ncr(n,1)*a^(n-1)*b | 0 out term2 | Third term | - | ncr(n,2)*a^(n-2)*b^2 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.