Home › Calculators › Binomial Expansion Calculator

Binomial Expansion Calculator

Enter the two terms and the power to expand (a + b)ⁿ. Terms can be numbers, fractions, decimals or variables with powers such as 3x², −2y or 1/x. You get the full expansion with exact fractional coefficients, a table of every term, the coefficients from Pascal's triangle, the middle term and any term number you ask for.

Last updated:

e.g. x, 2x, 3x^2, x^2y, 1/2, -y

Use a minus sign for (a − b), e.g. -3 or -2y

Whole number from 0 to 100

1 = first term; leave empty to skip

Enter your values to see the result.
Advertisement
Advertisement

How to use the Binomial Expansion Calculator

  1. Type the first term a, such as x, 2x or 3x^2.
  2. Type the second term b; use a minus sign for (a − b), for example -3 or -2y.
  3. Enter the power n (a whole number) and, if you need one term only, its term number.
  4. Press Expand to see the full expansion and the steps.
  5. Use the table to check each term, or copy the result.

The binomial theorem with an example

(a + b)ⁿ = C(n,0)aⁿ + C(n,1)aⁿ⁻¹b + C(n,2)aⁿ⁻²b² + … + C(n,n)bⁿ, where C(n, k) = n! / (k!(n − k)!).

Example: (2x + 3)⁴ uses row 4 of Pascal's triangle, 1, 4, 6, 4, 1:

  • 1 · (2x)⁴ = 16x⁴
  • 4 · (2x)³ · 3 = 96x³
  • 6 · (2x)² · 3² = 216x²
  • 4 · 2x · 3³ = 216x
  • 1 · 3⁴ = 81

So (2x + 3)⁴ = 16x⁴ + 96x³ + 216x² + 216x + 81. Check: the coefficients add up to (2 + 3)⁴ = 625.

Binomial coefficients for small powers

nCoefficients(a + b)ⁿ
21, 2, 1a² + 2ab + b²
31, 3, 3, 1a³ + 3a²b + 3ab² + b³
41, 4, 6, 4, 1a⁴ + 4a³b + 6a²b² + 4ab³ + b⁴
51, 5, 10, 10, 5, 1a⁵ + 5a⁴b + 10a³b² + 10a²b³ + 5ab⁴ + b⁵
61, 6, 15, 20, 15, 6, 1a⁶ + 6a⁵b + 15a⁴b² + 20a³b³ + 15a²b⁴ + 6ab⁵ + b⁶

Tips

  • Finding the term with a given power: for (x² − 1/x)⁹ the general term has x to the power 2(9 − k) − k = 18 − 3k. The constant term needs 18 − 3k = 0, so k = 6 and it is term 7. Enter 7 as the term number to see it.
  • Keep brackets around the whole term when raising it to a power: (2x)³ = 8x³, not 2x³. That is the most common mistake in hand expansions.
  • Alternating signs appear whenever the second term is negative.

Frequently asked questions

What is the binomial theorem?

The binomial theorem says (a + b)ⁿ = Σ C(n, k)·aⁿ⁻ᵏ·bᵏ for k = 0 to n, where C(n, k) = n! / (k!(n − k)!) is a binomial coefficient. The expansion has n + 1 terms, the powers of a fall from n to 0 while the powers of b rise from 0 to n, and the exponents in each term add up to n.

How do I find a specific term in a binomial expansion?

The (k + 1)th term is Tₖ₊₁ = C(n, k)·aⁿ⁻ᵏ·bᵏ. For example, the 4th term of (x + 2)⁶ uses k = 3: C(6, 3)·x³·2³ = 20·x³·8 = 160x³. Enter the term number in the optional field to get it directly.

How is Pascal's triangle related to binomial expansion?

Row n of Pascal's triangle (starting from row 0) lists the coefficients C(n, 0), C(n, 1), …, C(n, n). Each number is the sum of the two above it. Row 5 is 1, 5, 10, 10, 5, 1, which are the coefficients of (a + b)⁵.

How do I expand (a − b)ⁿ?

Treat it as (a + (−b))ⁿ. The coefficients are the same, but the signs alternate: terms with odd powers of b are negative. For example, (x − 1)³ = x³ − 3x² + 3x − 1. In the calculator, just enter the second term with a minus sign.

What is the middle term?

If n is even there is one middle term, term n/2 + 1, which has the largest binomial coefficient. If n is odd there are two middle terms, terms (n + 1)/2 and (n + 3)/2, with equal binomial coefficients.

What is the sum of the coefficients?

Set every variable to 1. For (2x + 3)⁴ the coefficients add up to (2 + 3)⁴ = 625. The binomial coefficients alone always add up to 2ⁿ.

Can I use a negative or fractional power?

No. For a negative or fractional exponent the binomial series never ends, so there is no finite expansion. This calculator handles whole powers from 0 to 100.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Pascal's Triangle GeneratorGenerate Pascal's triangle up to row 30, highlight a row and expand (ax + by)ⁿ.Permutation and Combination CalculatorCalculate nPr and nCr, with or without repetition, as exact big numbers.Binomial Distribution CalculatorBinomial probabilities P(X = k), at most, at least or between, with mean, variance and chart.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Weighted Average CalculatorCalculate a weighted mean from values and weights, step by step.Average CalculatorMean, weighted average, median, sum, min and max of any list.Standard Deviation CalculatorStandard deviation, variance, mean, median, mode and quartiles.A/B Test Significance CalculatorCheck if your A/B test result is statistically significant.Z-Score CalculatorZ-score from a value, mean and SD, plus percentile and p-value; or the value from z.Probability CalculatorFind and, or, not, conditional and at-least-once probabilities from P(A) and P(B).Mean Median Mode CalculatorFind the mean, median, mode, range, min, max, sum and count of a list of numbers.Confidence Interval CalculatorConfidence interval and margin of error for a mean or a proportion, with steps.Sample Size CalculatorHow many survey responses you need for a given confidence level and margin of error.Percentile CalculatorValue at any percentile, percentile rank of a score, quartiles, IQR and outliers.Correlation Coefficient CalculatorPearson r and Spearman rank correlation with significance and interpretation.Average Order Value CalculatorAverage order value from revenue and orders, plus the revenue impact of raising AOV.Normal Distribution CalculatorNormal probabilities P(X < x), between two values and inverse percentiles, on a shaded bell curve.Poisson Distribution CalculatorPoisson probabilities for a rate λ: exactly k, at most, at least or between, with a chart.T-Test CalculatorOne-sample, two-sample (Welch/pooled) and paired t-tests with p-value and CI.Chi-Square CalculatorChi-square goodness-of-fit and independence tests with p-value and expected counts.P-Value CalculatorOne- or two-tailed p-values from z, t, chi-square or F statistics, with critical values.Variance CalculatorSample and population variance and standard deviation with a step-by-step deviations table.Five Number Summary CalculatorMin, Q1, median, Q3, max, IQR and fences of a data set, with a box plot.Outlier CalculatorFind outliers with 1.5×/3× IQR fences, z-scores or modified z-scores; get the cleaned data.Geometric Mean CalculatorGeometric, harmonic, arithmetic and quadratic means compared, or average growth from % changes.Expected Value CalculatorExpected value, variance and standard deviation from outcomes and their probabilities.One-Way ANOVA CalculatorOne-way ANOVA for 2-10 groups: SS, df, MS, F statistic, p-value, effect size and full table.Bayes Theorem CalculatorPosterior P(A|B) from P(A), P(B|A) and P(B|not A), with a probability tree and table.Box Plot MakerPaste data to draw box-and-whisker plots with quartiles, IQR and outliers. Download PNG or SVG.Coefficient of Variation CalculatorCV % from a dataset (sample or population) with mean, SD and a two-dataset comparison.Critical Value CalculatorCritical values of z, t, chi-square and F for any alpha, tails and degrees of freedom.Dice Probability CalculatorOdds of rolling a sum (exactly, at least, at most) with any dice, plus the full distribution.Effect Size Calculator (Cohen's d)Cohen's d, Hedges' g and Glass's delta from two means, SDs and sample sizes, with CI.Frequency Table GeneratorMake a frequency, relative and cumulative frequency table from numbers or categories.Histogram MakerPaste numbers, choose bins and get a histogram, frequency table and PNG download.Margin of Error CalculatorSurvey margin of error from sample size, confidence and proportion, with population correction.Moving Average CalculatorSimple, exponential and weighted moving averages of a data series, with table and line chart.Odds Ratio and Relative Risk CalculatorOdds ratio, relative risk, risk difference, 95% CIs and p-values from a 2x2 table.Standard Error CalculatorStandard error of the mean from data or SD and n, plus SE of a proportion, with CIs.Descriptive Statistics CalculatorPaste data and get mean, median, mode, quartiles, SD, skewness, kurtosis and a histogram.Empirical Rule Calculator68-95-99.7 rule ranges from a mean and standard deviation, with a shaded bell curve.Z-Table (Standard Normal Table)Interactive z-table: find the area for any z-score, or the z-score for a probability.Average Rate of Change CalculatorAverage rate of change of f(x), two points or a data table over [a, b], with the secant line.Combinations GeneratorList every k-combination of your items, with or without repetition, and copy or export them.Covariance CalculatorSample and population covariance of paired X and Y data, with a step table and scatter plot.Grouped Data CalculatorMean, median, mode, variance and standard deviation from class intervals and frequencies.Inverse Normal Distribution CalculatorinvNorm: find the x or z value for a left, right, central or two-tail area, with a shaded curve.Permutations GeneratorList all permutations of letters, words or items, with k-permutations and repeats, and export them.Statistical Power CalculatorPower or required sample size for t-tests, proportions and correlations, with a power curve.T Distribution CalculatorStudent's t probabilities and critical values for any df, with the area shaded on the curve.T-Table (Student's t Distribution)Interactive t-table: critical t-values for any df and α, p-values, and a printable full table.Z-Test CalculatorOne-sample, two-sample and proportion z-tests with z, p-value, decision and shaded curve.Shannon Entropy CalculatorEntropy of text, data or probabilities in bits, nats or hartleys with a frequency table.
See all 52 Statistics & Probability Calculators →