Skip to content

Binomial expansion calculator

Enter a, b, and n to expand (ax + b)ⁿ into a standard polynomial in x. Negative b values produce the correct alternating signs.

Enter (ax + b)ⁿ

Processed in your browser.

Coefficient of x in ax + b; enter a finite number.

Constant term in ax + b; use a negative number for subtraction.

A whole number from 0 through 20.

Binomial expansion result

Enter the coefficients, then select Calculate.

How to expand (ax + b)ⁿ

This calculator applies the finite binomial theorem to a linear binomial in x. It returns one expanded polynomial and its descending coefficient list without parsing a general expression.

  1. Enter a, the coefficient multiplying x. For x + 3 use a = 1; for −x + 3 use a = −1.
  2. Enter b, the constant term. To expand a difference such as (2x − 3)⁴, enter b = −3.
  3. Enter n as a whole number from 0 through 20, then select Calculate.
  4. Confirm the displayed source binomial and expansion. Copy the labeled polynomial if needed; editing a field clears the prior result.

The finite binomial theorem used by the calculator

For a nonnegative whole number n, (ax + b)ⁿ equals the sum from k = 0 to n of C(n,k)(ax)ⁿ⁻ᵏbᵏ. The binomial coefficient C(n,k), read “n choose k,” supplies the familiar Pascal-triangle pattern. The power of x starts at n and falls by one in each term, while the power of b rises from zero to n.

After substituting the numeric a and b, the coefficient of xⁿ⁻ᵏ is C(n,k)aⁿ⁻ᵏbᵏ. The calculator computes all n + 1 positions, combines zero positions into standard notation, and also reports the complete descending list. It does not repeatedly parse or multiply a typed expression.

Worked examples with positive and negative constants

For (2x − 3)⁴, the row 1, 4, 6, 4, 1 is combined with powers of 2 and −3. The expansion is 16x⁴ − 96x³ + 216x² − 216x + 81, and the descending list is 16, -96, 216, -216, 81. The odd powers of a negative b create negative terms; even powers create positive terms.

For (x + 1)³, coefficients 1, 3, 3, 1 give x³ + 3x² + 3x + 1. Coefficients equal to 1 are shown conventionally as x³ or x rather than 1x³ or 1x, while −1 is shown with a minus sign. The coefficient list still contains the numeric ones.

Zero coefficients and the zero exponent

The boundary n = 0 returns 1, including when a or b is zero, following the finite polynomial convention used by this tool. When a = 0 and n is positive, the result reduces to the constant bⁿ. When b = 0 and n is positive, only the leading term aⁿxⁿ remains. Zero-valued middle terms disappear from the readable polynomial but stay represented by their positions in the coefficient list.

This handling keeps the displayed powers and signs compact without losing the input-to-output mapping. It also avoids treating a missing term as a shifted power, which is important if you copy the list into the polynomial calculator.

Supported range, precision, and excluded expansions

The exponent must be an integer from 0 through 20. a and b must be finite numbers. Integer inputs are accepted only within the exact safe range, and the answer is rejected if any integer coefficient leaves that range. Decimal coefficients use browser numeric arithmetic and are displayed with at most two decimal places; meaningful smaller nonzero coefficients use scientific notation. Use smaller a or b if the result exceeds the supported finite or exact range.

The tool expands only (ax + b)ⁿ in the single variable x. It does not accept negative or fractional exponents, multiple variables, nested expressions, a general formula string, infinite binomial series, factoring, roots, or graphs. Those exclusions keep the input predictable and every returned term tied directly to the stated theorem.

Frequently asked questions

How do I enter (ax − b)ⁿ?

Enter the second term as a negative number. For (2x − 3)⁴, use a = 2, b = −3, and n = 4.

Why are there at most n + 1 coefficient positions?

The finite theorem has one term for each k from 0 through n. Some displayed terms may vanish when their coefficient is zero.

What happens when n is zero?

The calculator returns 1. This is the n = 0 boundary of the finite theorem used for polynomial expansion.

Can n be negative or a fraction?

No. Those cases require an infinite series or other definitions and are outside this finite expansion tool.

Why was a large input rejected?

At least one coefficient was nonfinite or an integer could no longer be represented exactly. Reduce a, b, or n and calculate again.