molecalculator

Moles & Molar Mass

Binomial Expansion Formula Calculator

Calculator No. 01-9373 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

This calculator works out the full expansion of a binomial expression (a + b)n or a specific term in that expansion. You enter the power n and, optionally, the term number k you want, and you get the coefficients and the expanded form. The result is shown as a polynomial with numeric coefficients, using the binomial theorem.

Formula

The binomial theorem states that for any whole number n:

(a + b)n = Σk=0n C(n, k) · an−k · bk

where C(n, k) is the binomial coefficient, read as “n choose k”, and equals:

C(n, k) = n! / (k! · (n − k)!)

In this calculator, the inputs are:

  • n – the power (a whole number, 0 or positive).
  • k – the term number you want, counting from 1. The first term corresponds to k = 1, the last to k = n + 1.

The coefficient of the k-th term is C(n, k−1). The full term is C(n, k−1) · an−k+1 · bk−1. The calculator gives you the coefficient and the term with the variables a and b kept symbolic.

Worked Example

Using the default values: n = 5, k = 3.

We want the third term of (a + b)5.

Step 1: Find the binomial coefficient. For the k-th term, we need C(n, k−1) = C(5, 2).

C(5, 2) = 5! / (2! · 3!) = 120 / (2 · 6) = 120 / 12 = 10.

Step 2: Determine the powers of a and b. For term k, the exponent of a is n − (k−1) = 5 − 2 = 3, and the exponent of b is k−1 = 2.

So the term is 10 · a3 · b2.

Step 3: The calculator’s first output is the coefficient 10, and the second output shows “10 · a^3 · b^2”, matching our result.

Assumptions

  • n is a whole number (0, 1, 2, …). The binomial theorem for non-integer exponents requires an infinite series, which is not what this calculator does.
  • a and b are treated as symbolic variables; the calculator does not substitute numeric values for them.
  • The term number k is between 1 and n+1. If you enter k outside that range, the result is not defined.

How to Use the Binomial Expansion Calculator

Enter the power n and the term number k. The calculator returns the coefficient and the term. If you want the whole expansion, you would need to compute all terms from k = 1 to n+1. For example, for n = 3, the terms are:

  • k=1: C(3,0) a3 = 1 a3
  • k=2: C(3,1) a2 b = 3 a2 b
  • k=3: C(3,2) a b2 = 3 a b2
  • k=4: C(3,3) b3 = 1 b3

So (a + b)3 = a3 + 3a2b + 3ab2 + b3.

When to Use the Binomial Theorem

You use the binomial expansion when you need to expand a power of a binomial without multiplying it out manually. Common situations include:

  • Finding a specific term in a high power, like the 5th term of (x + 2)10.
  • Approximating expressions when n is large but the binomial is simple.
  • Working with probability distributions, especially the binomial distribution, where coefficients appear directly.
  • Simplifying algebraic expressions in calculus or series work.

The theorem also works when a or b are numbers, not just variables. For instance, (1 + 0.05)12 can be expanded term by term to get an exact value without a calculator.

Common Mistakes and How to Avoid Them

  • Mixing up term number and exponent. The first term has k = 1, not k = 0. If you want the term with br, then the term number is r+1.
  • Forgetting that n choose k uses k, not k−1. In the formula, the coefficient for the term with br is C(n, r), so for the k-th term you use C(n, k−1).
  • Using a negative or fractional n. The standard binomial theorem as taught in algebra requires n to be a non-negative integer. For other n, the expansion is an infinite series with different convergence conditions.
  • Ignoring the sign when a or b is negative. For example, (x − 2)4 means b = −2, so the signs of terms alternate. The coefficient formula still works, but you must include the negative sign in b.
  • Rounding coefficients incorrectly. Coefficients are integers for whole-number n, so no rounding is needed. If you compute with a calculator, make sure you use exact factorial arithmetic.

Limits of the Formula

The binomial theorem as implemented here only applies to whole-number exponents. For fractional or negative exponents, you need the generalized binomial series, which is infinite and only converges under certain conditions (usually |b/a| < 1). Also, the calculator gives the term symbolically; it does not simplify powers of numbers. For example, if a = 2 and b = 3, the term 10 · 23 · 32 would be 10 · 8 · 9 = 720, but the calculator shows “10 · a^3 · b^2”, leaving the substitution to you.

Frequently Asked Questions

How do I find the coefficient of a specific term?

Use the formula C(n, k−1) where k is the term number. For instance, in (x + y)7, the 4th term has coefficient C(7, 3) = 35. The term is 35 · x4 · y3.

What is the middle term of an even power?

If n is even, there is one middle term, with k = n/2 + 1. For n = 6, the middle term is the 4th term, coefficient C(6, 3) = 20. If n is odd, there are two middle terms, with k = (n+1)/2 and k = (n+3)/2.

Can I use this for (a − b)n?

Yes. Write (a − b)n as (a + (−b))n. Then the k-th term is C(n, k−1) · an−k+1 · (−b)k−1, which gives alternating signs when b is positive.

Why does the calculator need a term number k?

Because the full expansion has n+1 terms. The calculator gives you one term at a time so you can quickly extract a specific coefficient without generating the whole polynomial. If you need the full expansion, compute all terms from k=1 to n+1.

What if n is large, like 20 or 50?

The formula works for any non-negative integer n, but the coefficients become very large. The calculator uses exact integer arithmetic, so it returns the correct coefficient even for large n. For n = 50, the coefficients are up to 50 digits long, but the calculator handles them.

Does this work for non-integer exponents?

No. The standard binomial theorem with finite sum only applies to whole-number n. For fractional or negative exponents, you need the infinite binomial series, which is beyond this calculator’s scope.

Related Concepts

The binomial coefficients C(n, k) are the same numbers that appear in Pascal’s triangle. Each row of Pascal’s triangle gives the coefficients for a given n. For n = 5, the row is 1, 5, 10, 10, 5, 1, which matches the coefficients of (a + b)5. This connection is useful for quick manual expansion for small n.

The binomial theorem also underlies the binomial distribution in statistics, where the probability of exactly k successes in n trials is C(n, k) pk (1−p)n−k. The coefficient is the same as in the algebraic expansion.

For practical calculations, you can also use the nCr function on most scientific calculators, which directly gives the binomial coefficient.

Related

Formula used
in n | Power n (whole number) | - | 5 | 0
in k | Term number k (1 to n+1) | - | 3 | 1
out coef | Coefficient of term k | - | ncr(n, k-1) | 0
out term | Term k as a+b form | - | ncr(n, k-1) * a^(n-k+1) * b^(k-1) | 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 with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →