Math & Statistics

Binomial Expansion Calculator

Type a binomial such as (2x + 3)^4 to expand it with the binomial theorem. Every term is worked out from its binomial coefficient, the Pascal's triangle row is shown, and you can pick out any single term by its position.

Free, runs in your browserUpdated October 2026
Write it as (a + b)^n with a whole-number power from 0 to 40. Terms can be numbers, variables and powers such as 2x, -3y^2, x/2 or (1/2)x.
Term
Examples
Expansion
–
Number of terms–
Sum of coefficients–
Requested term–
Middle term–

Step-by-step expansion

    TermkC(n, k)First partSecond partTerm value
    Binomial Expansion Calculator diagram: (2x + 3)^4 expands to 16x⁴ + 96x³ + 216x² + 216x + 81
    How the Binomial Expansion Calculator works: Expand (a + b)ⁿ term by term with the binomial theorem

    How to Use the Binomial Expansion Calculator

    How to use the Binomial Expansion Calculator: binomial input, term number and expansion result
    Numbered steps on the Binomial Expansion Calculator. Follow them in order.
    1. Type the binomial as (a + b)^n, for example (2x + 3)^4.
    2. Enter a term number to pick out a single term.
    3. Or tap an example such as (x − 2y)^6.
    4. Read the full expansion, then each term worked out below.

    Type the binomial in the form (a + b)^n, for example (2x + 3)^4 or (x − 2y)^6. Each of the two terms can be a number, a variable, a power of a variable or a product such as 3ab. Fractions are allowed as x/2, (1/2)x or 3/4, and decimals such as 0.1 are converted to exact fractions, so the coefficients are always exact.

    The expansion appears at once with the number of terms, the sum of the coefficients and the middle term. Enter a term number to pick out a single term, which is handy for questions such as “find the third term” or “find the coefficient of x²”. The working below the tool lists the Pascal’s triangle row, every term calculated from the binomial theorem and a table you can copy into your notes.

    The Binomial Theorem

    (a + b)ⁿ = Σ C(n, k) · aⁿ⁻ᵏ · bᵏ, for k = 0, 1, …, n
    C(n, k) = n! ÷ (k! · (n − k)!)
    General term: Tₖ₊₁ = C(n, k) · aⁿ⁻ᵏ · bᵏ

    The power of the first term falls from n to 0 while the power of the second rises from 0 to n, and the two powers always add up to n. The coefficients C(n, k), read “n choose k”, are the numbers in row n of Pascal’s triangle. When the second term is negative, its odd powers are negative, so the signs alternate.

    Worked Example: (2x + 3)⁴

    Here a = 2x, b = 3 and n = 4, so the coefficients come from row 4 of Pascal’s triangle: 1, 4, 6, 4, 1.

    • k = 0: 1 · (2x)⁴ · 3⁰ = 16x⁴
    • k = 1: 4 · (2x)³ · 3 = 4 · 8x³ · 3 = 96x³
    • k = 2: 6 · (2x)² · 3² = 6 · 4x² · 9 = 216x²
    • k = 3: 4 · 2x · 27 = 216x
    • k = 4: 1 · 1 · 81 = 81

    So (2x + 3)⁴ = 16x⁴ + 96x³ + 216x² + 216x + 81. Check: setting x = 1 gives 5⁴ = 625, and 16 + 96 + 216 + 216 + 81 = 625.

    Pascal’s Triangle Rows

    nCoefficients C(n, k)Sum (2ⁿ)
    21, 2, 14
    31, 3, 3, 18
    41, 4, 6, 4, 116
    51, 5, 10, 10, 5, 132
    61, 6, 15, 20, 15, 6, 164
    71, 7, 21, 35, 35, 21, 7, 1128

    Each number is the sum of the two above it. For larger n, the formula n! ÷ (k!(n − k)!) is faster, and the calculator uses exact whole-number arithmetic so even row 40 is correct.

    Finding a Specific Term

    The term number is one more than k, because counting starts at k = 0. The third term of (2x + 3)⁴ uses k = 2: C(4, 2) · (2x)² · 3² = 216x². To find the coefficient of a given power, choose k so the powers match, then read off the number in front. When n is even there is one middle term, Tₙₐ₂₊₁; when n is odd there are two.

    Where Binomial Expansion Is Used

    Beyond algebra homework, the binomial theorem gives quick approximations such as (1 + x)ⁿ ≈ 1 + nx for small x, which is how compound growth over a short time is estimated. The same coefficients C(n, k) count combinations, so they appear in the binomial probability distribution: the chance of k successes in n trials is C(n, k)pᵏ(1 − p)ⁿ⁻ᵏ.

    Tips and Limits

    • Put a power on the whole bracket, as in (x + 1)^5. Expressions with three or more terms inside the brackets need the multinomial theorem instead.
    • The power must be a whole number from 0 to 40. Negative and fractional powers lead to infinite series, which this tool does not expand.
    • Variables inside the terms may have whole-number powers, such as x^2, but not negative ones such as 1/x.
    • Terms that are like terms, such as 2x and 3x, should be combined before expanding.

    Frequently asked questions

    What is the binomial theorem?

    It states that (a + b)^n equals the sum of C(n, k) times a to the power n minus k times b to the power k, for k from 0 to n. It expands any whole-number power of a binomial.

    How many terms are in a binomial expansion?

    An expansion of (a + b)^n has n + 1 terms. For example, (x + 1)^5 has six terms, from x to the fifth power down to the constant 1, as long as a and b are not like terms.

    How do I find a specific term?

    The term number is k + 1, so the fourth term uses k = 3. Substitute into C(n, k) times a^(n minus k) times b^k. Enter the term number in the calculator to see it directly.

    How is Pascal's triangle related to binomial expansion?

    Row n of Pascal's triangle lists the binomial coefficients C(n, 0) to C(n, n). Each entry is the sum of the two above it, which matches how the coefficients grow from one power to the next.

    What happens when one term is negative?

    Write the binomial as a sum with a negative term, such as (x + (minus 2))^n. Odd powers of the negative term are negative, so the signs of the expansion alternate between plus and minus.

    How do I check a binomial expansion?

    Set every variable equal to 1. The sum of the coefficients must equal (a + b)^n evaluated at those values. For (2x + 3)^4, the coefficients add to 5^4, which is 625.