Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Binomial Theorem Calculator (Expansion, Coefficient of a Term, Pascal's Triangle)

Enter A, B and n of the expression (Ax+B)ⁿ to expand. The formula below is linked to the input fields, so you can also edit the formula directly. Use "Find" to choose between expanding every term and finding just one term.

Enter numbers using digits. Decimals, negative numbers and fractions such as 3/4 are fine. The exponent n is a whole number from 0 to 12.
Result and figure
Enter the coefficients and the exponent in the fields on the left and press "Calculate". The expanded expression and Pascal's triangle will appear here.

What you can do on this page

  • Expand \((Ax+B)^{n}\) (\(n\) from 0 to 12) with the binomial theorem and see the result in descending powers of \(x\) right away
  • If you only need the coefficient of \(x^{3}\), give the power of \(x\) (or the position of the term) and find just that one term
  • When you find one term, the value of the binomial coefficient \({}_n\mathrm{C}_k\) and the steps using \(\dfrac{n!}{k!\,(n-k)!}\) are shown too
  • Pascal's triangle is drawn down to row \(n\), with the row you used highlighted
  • \(A\) and \(B\) can be decimals, negative numbers or fractions such as 3/4. Coefficients are calculated exactly, as simplified fractions
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page handles the form \((Ax+B)^{n}\) (\(n\) is a whole number from 0 to 12). It does not handle fractional or negative exponents (the general binomial theorem) or expressions with three or more terms (the multinomial theorem).

What is this calculation used for?

The probability of k successes in n tries (quality control, polls, clinical trials)

Repeat a trial \(n\) times, where the chance \(p\) is the same every time and one result does not affect another. The probability that something happens exactly \(k\) times is \({}_n\mathrm{C}_k p^{k}(1-p)^{n-k}\). This is exactly one term of \((p + (1-p))^n\) expanded with the binomial theorem, and this kind of probability distribution is called the binomial distribution.
For example, if a production line always has a 3% defect rate and you sample 10 items, the chance of no defects at all is the \(k = 0\) term, \(0.97^{10} \approx 0.737\), or about 74%. Put the other way, checking 10 items finds a defect about 26% of the time. The same idea underlies deciding how many items to inspect, estimating the margin of error of a poll, and judging whether a new drug works.

Predicting traits in offspring (biology and agriculture)

When both parents have the gene pair \(\mathrm{Aa}\), their children's genotypes appear in the ratio \(\mathrm{AA} : \mathrm{Aa} : \mathrm{aa} = 1 : 2 : 1\). The 1, 2, 1 comes from each parent passing on \(\mathrm{A}\) or \(\mathrm{a}\) with probability \(\dfrac{1}{2}\) each: \(\left(\dfrac{1}{2}\mathrm{A} + \dfrac{1}{2}\mathrm{a}\right)^{2} = \dfrac{1}{4}\left(\mathrm{AA} + 2\,\mathrm{Aa} + \mathrm{aa}\right)\). These are the binomial coefficients, the same numbers as row \(n = 2\) of Pascal's triangle.
With more traits, or when you break it down by the number of children, it gets too hard to track by hand. The binomial theorem handles questions like "the chance that exactly 2 of 4 siblings have a trait" in one step. Plant and animal breeders and genetic counselors estimate expected ratios this way.

Quick estimates of compound interest and growth (money and economics)

Money growing at an annual rate \(r\) for \(n\) years is multiplied by \((1+r)^{n}\). Expanding this with the binomial theorem gives \(1 + nr + {}_n\mathrm{C}_2 r^{2} + \cdots\). The first part, \(1 + nr\), is simple interest, and the rest is "interest on interest".
For example, at 1% a year for 10 years, \(1.01^{10} = 1.10462\cdots\), but the first three terms alone, \(1 + 0.1 + 0.0045\), give 1.1045, almost the same value. The later terms get smaller and smaller, so this is handy for a rough mental estimate. Interest rates, inflation rates and population growth rates, anything that grows by the same percentage each year, all take this form.

Estimating the effect of small changes (engineering, physics, measurement)

In design and measurement, you often need to know quickly how much a result changes when something changes slightly. Expand with the binomial theorem and drop the small squared and higher terms, and you get the approximation \((1+x)^{n} \approx 1 + nx\).
For example, if each edge of a cube gets 1% longer, the volume becomes \((1+0.01)^{3} = 1.030301\) times as large, an increase of about 3%. The approximation gives \(1 + 3 \times 0.01 = 1.03\), almost the same answer. The rule of thumb "a 1% error in length means about a 3% error in volume" is used directly when setting part tolerances and estimating measurement errors.

Counting all the possible choices (combinations and counting)

When you freely decide "yes or no" for each of \(n\) options, the total number of combinations is \(2^{n}\). This is the binomial theorem with \(a = b = 1\), \(\sum_{k=0}^{n} {}_n\mathrm{C}_k = 2^{n}\), and it is also the sum of each row of Pascal's triangle.
For example, a pizza with 5 available toppings can be ordered \(2^{5} = 32\) ways, including a plain cheese pizza with no toppings. The row also gives the breakdown: exactly 2 toppings can be ordered in \({}_5\mathrm{C}_2 = 10\) ways. This idea is used whenever you count choices, such as menu combinations, survey answer patterns and software test cases.

Formulas and figures

The binomial theorem
Figure
Standard notation (the usual math form)
\((a+b)^{n}\) \(=\) \(\displaystyle\sum_{k=0}^{n}\) \({}_{n}\mathrm{C}_{k}\) \(a^{n-k}\) \(b^{k}\)
In words (symbols replaced with words)
⑤ \((a+b)^n\): \(n\) copies of \((a+b)\) multiplied together \(=\) ④ add them all up, with \(k\), the number of \(b\)s chosen, going from 0 to \(n\) ① \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\) ② \(a^{n-k}\): \((n-k)\) copies of \(a\) multiplied ③ \(b^{k}\): \(k\) copies of \(b\) multiplied
The formula in words
① Multiply the \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\)
② by \(a^{n-k}\): \((n-k)\) copies of \(a\) multiplied
③ and by \(b^{k}\): \(k\) copies of \(b\) multiplied
④ then add them all up, with \(k\), the number of \(b\)s chosen, going from 0 to \(n\)
⑤ and you get \((a+b)^n\): \(n\) copies of \((a+b)\) multiplied together
Quick example
Expanding \((a+b)^{3}\) (the coefficients 1, 3, 3, 1 are the values of \({}_3\mathrm{C}_0\) to \({}_3\mathrm{C}_3\)) gives
3 copies of \((a+b)\) multiplied together \(=\) add them all up, with the number of \(b\)s \(k\) going from 0 to 3 ways to choose \(k\) of 3 \((3-k)\) copies of \(a\) multiplied \(k\) copies of \(b\) multiplied
\((a+b)^{3} = {}_{3}\mathrm{C}_{0}a^{3} + {}_{3}\mathrm{C}_{1}a^{2}b + {}_{3}\mathrm{C}_{2}ab^{2} + {}_{3}\mathrm{C}_{3}b^{3}\)
\(= a^{3} + 3a^{2}b + 3ab^{2} + b^{3}\)
Key idea
\((a+b)^n\) means "write the parentheses \((a+b)\) \(n\) times and multiply them". To expand, you pick either \(a\) or \(b\) from each set of parentheses, multiply your picks together, and add up the results of every possible way of picking. The number of ways to choose which \(k\) of the \(n\) parentheses give you a \(b\) is \({}_n\mathrm{C}_k\). So the same kind of term \(a^{n-k}b^{k}\) appears \({}_n\mathrm{C}_k\) times, and when you combine them, the coefficient is \({}_n\mathrm{C}_k\). That is all the binomial theorem says. (In many US textbooks, \({}_n\mathrm{C}_k\) is written \(\binom{n}{k}\) and read "n choose k".) The figure above shows \((a+b)^2\) as the area of a square. There are two \(ab\) rectangles, which gives \(2ab\), so you can see the coefficients 1, 2, 1 with your own eyes.
The general term (the \((k+1)\)th term)
Figure
Standard notation (the usual math form)
\(T_{k+1}\) \(=\) \({}_{n}\mathrm{C}_{k}\) \(a^{n-k}\) \(b^{k}\)
In words (symbols replaced with words)
④ \(T_{k+1}\): the \((k+1)\)th term of the expansion \(=\) ① \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\) ② \(a^{n-k}\): \((n-k)\) copies of \(a\) multiplied ③ \(b^{k}\): \(k\) copies of \(b\) multiplied
The formula in words
① Multiply the \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\)
② by \(a^{n-k}\): \((n-k)\) copies of \(a\) multiplied
③ and by \(b^{k}\): \(k\) copies of \(b\) multiplied
④ and you get \(T_{k+1}\): the \((k+1)\)th term of the expansion
Quick example
The 3rd term (\(k = 2\)) of \((2x+3)^{5}\), with \(a = 2x\) and \(b = 3\), is
3rd term \(T_{3}\) \(=\) ways to choose 2 of 5 3 copies of \(2x\) multiplied 2 copies of 3 multiplied
\(T_{3} = {}_{5}\mathrm{C}_{2}(2x)^{3}\cdot 3^{2} = 10 \times 8x^{3} \times 9 = 720x^{3}\)
Key idea
The most common mistake with the binomial theorem is that the term number and \(k\) are off by one. The term with \(k = 0\) is the 1st term, so in the \((k+1)\)th term, \(k\) is "the term number minus 1". For the 3rd term, \(k = 2\). When a problem asks for "the coefficient of \(x^{3}\)", find \(k\) from the power of \(x\), not from the term number. In \((Ax+B)^n\), the power of \(x\) is \(n-k\), so solve \(n-k = 3\) to get \(k = n-3\). When \(a\) or \(b\) is a group such as \(2x\), raise the whole group to the power, as in \((2x)^{3} = 8x^{3}\). To avoid writing \(2x^{3}\) by mistake, always put parentheses around it before you calculate.
Calculating a binomial coefficient (the number of combinations)
Standard notation (the usual math form)
\({}_{n}\mathrm{C}_{k}\) \(=\) \(\dfrac{n!}{k!\,(n-k)!}\)
In words (symbols replaced with words)
② \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\) \(=\) ① \(\dfrac{\text{ways to line up all }n\text{ items }n!}{\text{orders of the }k\text{ chosen }k!\ \times\ \text{orders of the }(n-k)\text{ left }(n-k)!}\)
The formula in words
① The \(\dfrac{\text{ways to line up all }n\text{ items }n!}{\text{orders of the }k\text{ chosen }k!\ \times\ \text{orders of the }(n-k)\text{ left }(n-k)!}\)
② is the \({}_n\mathrm{C}_k\): ways to choose \(k\) of \(n\)
Quick example
The number of ways to choose 2 of 5, \({}_5\mathrm{C}_2\), is
ways to choose 2 of 5 \(=\) \(\dfrac{\text{ways to line up all 5 }5!}{\text{orders of the 2 chosen }2!\ \times\ \text{orders of the 3 left }3!}\)
\({}_{5}\mathrm{C}_{2} = \dfrac{5!}{2!\,(5-2)!} = \dfrac{120}{2 \times 6} = 10\)
\({}_{5}\mathrm{C}_{2} = \dfrac{5 \times 4}{2 \times 1} = 10\)
Key idea
A factorial is the product of every whole number from 1 up to that number (\(5! = 5 \times 4 \times 3 \times 2 \times 1 = 120\)). By definition \(0! = 1\), so \({}_n\mathrm{C}_0 = {}_n\mathrm{C}_n = 1\). Why divide? Think about lining things up. Put all \(n\) items in a row, and say the first \(k\) are "chosen" and the other \((n-k)\) are "not chosen". Then each of the \(n!\) orders gives a choice. But reordering the \(k\) chosen items (\(k!\) ways) or the \((n-k)\) items left (\((n-k)!\) ways) does not change who was chosen. Each choice is counted \(k!\,(n-k)!\) times, so dividing by that leaves just the number of choices. By hand, the second form above is faster: the top counts down from \(n\) for \(k\) numbers, and the bottom is \(k!\). For \({}_5\mathrm{C}_2\), that is \(\dfrac{5 \times 4}{2 \times 1} = 10\). Binomial coefficients are symmetric: \({}_n\mathrm{C}_k = {}_n\mathrm{C}_{n-k}\) (choosing \(k\) items is the same as choosing the \((n-k)\) items to leave out). For example, \({}_7\mathrm{C}_5\) is quicker as \({}_7\mathrm{C}_2 = 21\). This is also why the coefficients of an expansion read the same from both ends.
Pascal's triangle (the sum of two neighbors)
Figure
Standard notation (the usual math form)
\({}_{n-1}\mathrm{C}_{k-1}\) \(+\) \({}_{n-1}\mathrm{C}_{k}\) \(=\) \({}_{n}\mathrm{C}_{k}\)
In words (symbols replaced with words)
① \({}_{n-1}\mathrm{C}_{k-1}\): upper-left number in the row above \(+\) ② \({}_{n-1}\mathrm{C}_{k}\): upper-right number in the row above \(=\) ③ \({}_n\mathrm{C}_k\): the number just below them
The formula in words
① Add the \({}_{n-1}\mathrm{C}_{k-1}\): upper-left number in the row above
② and the \({}_{n-1}\mathrm{C}_{k}\): upper-right number in the row above
③ and you get \({}_n\mathrm{C}_k\): the number just below them
Quick example
Adding the 3 and 3 in row \(n = 3\) gives the 6 in row \(n = 4\)
upper left \({}_3\mathrm{C}_1 = 3\) \(+\) upper right \({}_3\mathrm{C}_2 = 3\) \(=\) just below \({}_4\mathrm{C}_2 = 6\)
\({}_{3}\mathrm{C}_{1} + {}_{3}\mathrm{C}_{2} = 3 + 3 = 6 = {}_{4}\mathrm{C}_{2}\)
Key idea
Pascal's triangle is the binomial coefficients arranged in a triangle, row by row from the top. Both ends of every row are 1, and each number inside is just the sum of the two numbers directly above it (upper left and upper right). You can build the coefficients with addition alone, without any factorials. The choosing idea also explains why this addition works. To choose \(k\) of \(n\) items, focus on one particular item. Either you choose it (then choose \((k-1)\) more from the other \((n-1)\)), or you do not (then choose all \(k\) from the other \((n-1)\)). The two cases are exactly the two numbers above. The numbers in each row add up to \(2^n\) (row \(n = 4\): \(1+4+6+4+1 = 16 = 2^4\)). This is the binomial theorem with \(a = b = 1\).
The binomial theorem says \((a+b)^n = \sum_{k=0}^{n} {}_n\mathrm{C}_k a^{n-k} b^{k}\): in the expansion, the coefficient of \(a^{n-k}b^{k}\) is \({}_n\mathrm{C}_k\). To find just one term, use the general term \({}_n\mathrm{C}_k a^{n-k} b^{k}\) and choose \(k\) from the power of \(x\). The coefficients match row \(n\) of Pascal's triangle.

Symbols and terms

Symbols

\({}_n\mathrm{C}_k\) n C k, or n choose k The number of ways to choose \(k\) things from \(n\) (the number of combinations). In the binomial theorem it becomes a coefficient of the expansion, so it is also called a binomial coefficient. \(\mathrm{C}\) is the first letter of "combination". It is also written \(\binom{n}{k}\), nCk or C(n, k).
\(n!\) n factorial The product of every whole number from 1 to \(n\) (\(4! = 4 \times 3 \times 2 \times 1 = 24\)). It looks like an exclamation mark, but it is the math symbol for "factorial". By definition, \(0! = 1\).
\(a,\ b\) a, b The two terms inside the parentheses in the binomial theorem. "Binomial" means "two terms", and these are the two. By custom, letters from the start of the alphabet, \(a,\ b,\ c\), stand for fixed values.
\(n\) n How many copies of the same parentheses are multiplied (the exponent). The letter \(n\), from "number", is often used for a count. On this page it is a whole number from 0 to 12.
\(k\) k A counter for "how many \(b\)s were chosen". It runs from 0 to \(n\). The term with \(k = 0\) is the 1st term, which is why we say "the \((k+1)\)th term". The letter \(k\) is a common choice for a whole-number counter.
\(\displaystyle\sum\) sigma The symbol for "add them all up". It is the capital Greek letter sigma, which matches S for "sum". \(\sum_{k=0}^{n}\) means "add up the expression after it, with \(k\) going from 0 to \(n\)".
\(T_{k+1}\) T sub k plus 1 The term in position \(k+1\) from the start when the expansion is written in descending powers. \(T\) is the first letter of "term". It is called the general term.
\(A,\ B\) capital A, capital B The letters used in this calculator's input fields. In \((Ax+B)^n\), \(A\) is the coefficient of \(x\) and \(B\) is the constant term without \(x\). In the binomial theorem, \(a = Ax\) and \(b = B\).
\(x\) x A letter whose value is not fixed (a variable). This calculator expands expressions of the form \((Ax+B)^n\), so the answer is a polynomial in \(x\).

Terms

binomial theorem The theorem that the coefficients in the expansion of \((a+b)^n\) are the numbers of combinations \({}_n\mathrm{C}_k\). In the US it is usually taught in Algebra 2 or Precalculus.
binomial coefficient The coefficient \({}_n\mathrm{C}_k\) that appears in the binomial theorem. It is the same as the number of combinations, but this name is used when you think of it as a coefficient of an expansion.
combination A way of choosing some items from a group without caring about order. The number of ways to choose \(k\) of \(n\) is written \({}_n\mathrm{C}_k\). Unlike a permutation, where order matters, the same set of items counts as one way.
factorial The product of every whole number from 1 up to that number. \(5! = 5 \times 4 \times 3 \times 2 \times 1 = 120\). It is used to calculate the number of combinations.
general term A single formula that describes every term of an expansion by its position. In the binomial theorem, the \((k+1)\)th term \({}_n\mathrm{C}_k a^{n-k} b^{k}\) is the general term. To find one term, put values into it.
expansion Multiplying out an expression with parentheses to write it as a sum of terms without parentheses. It is the exact opposite of factoring.
descending powers Writing the terms of an expression from the highest power of the variable down, as in \(x^3 + 2x^2 - x + 5\). Answers are usually written in this order (also called standard form).
Pascal's triangle The binomial coefficients arranged row by row in a triangle. Both ends are 1, and each number inside is the sum of the two numbers above it. It is named after the French mathematician Blaise Pascal, but it was known centuries earlier in Persia, India and China, where it is called Yang Hui's triangle.
polynomial An expression that adds up terms made of a coefficient times a power of \(x\), such as \(2x^3 - x + 5\). The result of an expansion with the binomial theorem is a polynomial too.
term Each piece of an expression separated by plus and minus signs. \(x^3 - 2x + 3\) has three terms: \(x^3\), \(-2x\) and \(3\).
coefficient The number in front of a variable. In \(3x^2\), the coefficient is 3. When no number is written, as in \(x^2\), the coefficient is 1.
exponent The small 3 written at the upper right of \(x^3\). It shows how many times the same thing is multiplied (\(x^3 = x \times x \times x\)). Also called the power.
constant term A term with no \(x\), only a number, like the 5 in \(x^2 + 3x + 5\). In this calculator, \(B\) inside the parentheses and the last term of the expansion are constant terms.
binomial distribution The probability distribution of the number of successes \(k\) when the same trial is repeated \(n\) times. Its probabilities \({}_n\mathrm{C}_k p^{k}(1-p)^{n-k}\) are exactly the terms of \((p + (1-p))^n\) expanded with the binomial theorem, which is where the name "binomial" comes from.
general binomial theorem The binomial theorem extended to fractional and negative exponents. The result is an expression with infinitely many terms (an infinite series). This calculator handles only whole-number exponents of 0 or more.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the quickest way forward.

Multiplying out expressions (Grade 8 to Algebra 1)
  • Being able to expand \((a+b)(c+d) = ac + ad + bc + bd\) with the distributive property (multiply each term in one set of parentheses by each term in the other)
  • Knowing that like terms (such as \(3x^2\) and \(5x^2\)) can be combined by adding their coefficients
  • Knowing the special product \((a+b)^{2} = a^{2} + 2ab + b^{2}\). The binomial theorem extends this to the \(n\)th power
Powers and the laws of exponents (Grade 8 to Algebra 1)
  • Knowing that the small number at the upper right (the exponent) is how many times to multiply, as in \(x^{3} = x \times x \times x\)
  • Knowing that raising parentheses to a power raises each part inside to that power, as in \((2x)^{3} = 2^{3}x^{3} = 8x^{3}\)
  • Knowing that \(a^{0} = 1\) (any nonzero number to the power 0 is 1)
Working with negative numbers (Grades 6–7)
  • Knowing that multiplying a negative number an even number of times gives a positive result and an odd number of times gives a negative result, as in \((-2)^{2} = 4\) and \((-2)^{3} = -8\)
  • Being able to treat a subtraction such as \((2x-1)^{4}\) as \(b = -1\)
Combinations and factorials (Algebra 2 or Precalculus)
  • Knowing that \({}_n\mathrm{C}_k\) is the number of ways to choose \(k\) of \(n\) items without caring about order
  • Being able to calculate \({}_n\mathrm{C}_k = \dfrac{n!}{k!\,(n-k)!}\) (\(n!\) is the product of every whole number from 1 to \(n\))
  • Knowing that \({}_n\mathrm{C}_0 = 1\), \({}_n\mathrm{C}_n = 1\) and \({}_n\mathrm{C}_k = {}_n\mathrm{C}_{n-k}\)
Sigma notation (Precalculus)
  • Knowing that \(\sum_{k=0}^{n}\) means "add everything up, with \(k\) going from 0 to \(n\)"
  • If you have not learned the symbol yet, it is enough to read it as the same thing as \({}_n\mathrm{C}_0 a^{n} + {}_n\mathrm{C}_1 a^{n-1}b + \cdots + {}_n\mathrm{C}_n b^{n}\)
Working with fractions (Grades 5–6)
  • Being able to multiply fractions, as in \(\dfrac{1}{2} \times \dfrac{1}{2} = \dfrac{1}{4}\), and to simplify them
  • Being comfortable leaving answers as fractions (and being able to turn \(\dfrac{3}{2}\) into 1.5)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find each coefficient of the expansion with the binomial theorem
Coefficient of x, A 2
Constant term B 3
Exponent n 5
Coefficient for k=0 (x to the n−0) =IFERROR(COMBIN($B$3,0)*$B$1^($B$3-0)*$B$2^0,0)
Coefficient for k=1 (x to the n−1) =IFERROR(COMBIN($B$3,1)*$B$1^($B$3-1)*$B$2^1,0)
Coefficient for k=2 (x to the n−2) =IFERROR(COMBIN($B$3,2)*$B$1^($B$3-2)*$B$2^2,0)
Coefficient for k=3 (x to the n−3) =IFERROR(COMBIN($B$3,3)*$B$1^($B$3-3)*$B$2^3,0)
Coefficient for k=4 (x to the n−4) =IFERROR(COMBIN($B$3,4)*$B$1^($B$3-4)*$B$2^4,0)
Coefficient for k=5 (x to the n−5) =IFERROR(COMBIN($B$3,5)*$B$1^($B$3-5)*$B$2^5,0)
Coefficient for k=6 (x to the n−6) =IFERROR(COMBIN($B$3,6)*$B$1^($B$3-6)*$B$2^6,0)
Table to find the coefficient of the general term ((k+1)th term)
Coefficient of x, A 2
Constant term B 3
Exponent n 5
Term number (from the start) 3
k (term number minus 1) =B4-1
Power of x (n−k) =B3-B5
Binomial coefficient nCk =COMBIN(B3,B5)
Coefficient of the term =B7*B1^B6*B2^B5
Table to find a binomial coefficient (number of combinations)
n 5
k 2
Binomial coefficient nCk =COMBIN(B1,B2)
Check with factorials =FACT(B1)/(FACT(B2)*FACT(B1-B2))
Table to build Pascal's triangle
Row n = 0 1
Row n = 1 1 1
Row n = 2 1 =B2+C2 1
Row n = 3 1 =B3+C3 =C3+D3 1
Row n = 4 1 =B4+C4 =C4+D4 =D4+E4 1
Row n = 5 1 =B5+C5 =C5+D5 =D5+E5 =E5+F5 1
After pasting, the upper rows (A, B, n and so on) are your inputs, and the lower rows are calculated automatically.
COMBIN(n, k) is the binomial coefficient nCk, FACT(n) is n factorial, and "^" is a power.
The first table expands (2x+3)⁵. From k=0 down, it shows 32, 240, 720, 1080, 810, 243 (the row for k is the coefficient of x to the power n−k). Change A, B and n, and you get the coefficients of your own expression. When n is less than 6, rows for terms that do not exist show 0 (IFERROR turns them into 0). When n is 7 or more, copy the last row down and change the 6 in the formula to 7, 8 and so on.
The second table finds only the 3rd term: k is 2, the power of x is 3, the binomial coefficient is 10, and the coefficient of the term is 720.
The third table is the number of ways to choose 2 of 5, and both formulas give 10.
In the fourth table, only the 1s at both ends are typed in. Each number inside is a formula that adds the two cells just above it. Row n = 5 shows 1, 5, 10, 10, 5, 1.

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find each coefficient of the expansion with the binomial theorem
Coefficient of x, A 2
Constant term B 3
Exponent n 5
Coefficient for k=0 (x to the n−0) =IFERROR(COMBIN($B$3,0)*$B$1^($B$3-0)*$B$2^0,0)
Coefficient for k=1 (x to the n−1) =IFERROR(COMBIN($B$3,1)*$B$1^($B$3-1)*$B$2^1,0)
Coefficient for k=2 (x to the n−2) =IFERROR(COMBIN($B$3,2)*$B$1^($B$3-2)*$B$2^2,0)
Coefficient for k=3 (x to the n−3) =IFERROR(COMBIN($B$3,3)*$B$1^($B$3-3)*$B$2^3,0)
Coefficient for k=4 (x to the n−4) =IFERROR(COMBIN($B$3,4)*$B$1^($B$3-4)*$B$2^4,0)
Coefficient for k=5 (x to the n−5) =IFERROR(COMBIN($B$3,5)*$B$1^($B$3-5)*$B$2^5,0)
Coefficient for k=6 (x to the n−6) =IFERROR(COMBIN($B$3,6)*$B$1^($B$3-6)*$B$2^6,0)
Table to find the coefficient of the general term ((k+1)th term)
Coefficient of x, A 2
Constant term B 3
Exponent n 5
Term number (from the start) 3
k (term number minus 1) =B4-1
Power of x (n−k) =B3-B5
Binomial coefficient nCk =COMBIN(B3,B5)
Coefficient of the term =B7*B1^B6*B2^B5
Table to find a binomial coefficient (number of combinations)
n 5
k 2
Binomial coefficient nCk =COMBIN(B1,B2)
Check with factorials =FACT(B1)/(FACT(B2)*FACT(B1-B2))
Table to build Pascal's triangle
Row n = 0 1
Row n = 1 1 1
Row n = 2 1 =B2+C2 1
Row n = 3 1 =B3+C3 =C3+D3 1
Row n = 4 1 =B4+C4 =C4+D4 =D4+E4 1
Row n = 5 1 =B5+C5 =C5+D5 =D5+E5 =E5+F5 1
The same formulas as in Excel work as is (Google Sheets also has COMBIN and FACT with the same names). Copy the whole table, paste it into cell A1, and replace A, B and n with your own numbers.

How to calculate it in Python

from fractions import Fraction
from math import comb

# Expand (Ax + B) to the power n (a fraction such as 3/4 can be written Fraction(3, 4))
coef_x = Fraction(2)   # coefficient of x, A
const = Fraction(3)    # constant term B
power = 5              # exponent n

# k goes from 0 to n. The power of x is n - k, and the coefficient is nCk × A^(n-k) × B^k
for k in range(power + 1):
    exponent = power - k
    coefficient = comb(power, k) * coef_x ** exponent * const ** k
    print(f"Coefficient of x^{exponent}: {coefficient}")

# Find only the coefficient of x^3 (k = n - 3)
target = 3
k = power - target
coefficient = comb(power, k) * coef_x ** target * const ** k
print(f"Binomial coefficient: {comb(power, k)}")
print(f"Coefficient of x^{target}: {coefficient}")
In the standard library, math.comb gives the binomial coefficient nCk, and fractions.Fraction keeps exact fractions (math.comb needs Python 3.8 or later). This example expands (2x+3)⁵. When you run it, the coefficients appear in the order 32, 240, 720, 1080, 810, 243, and finally the coefficient of x cubed, 720. Change A, B and n and run it.

How to write it in LaTeX and other math languages (copy and paste)

The binomial theorem
(a+b)ⁿ = ₙC₀aⁿ + ₙC₁aⁿ⁻¹b + ⋯ + ₙCₙbⁿ
(a+b)^{n} = \sum_{k=0}^{n} {}_{n}\mathrm{C}_{k}\, a^{n-k} b^{k}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msup>
      <mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow>
      <mi>n</mi>
    </msup>
    <mo>=</mo>
    <munderover>
      <mo>&#x2211;</mo>
      <mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow>
      <mi>n</mi>
    </munderover>
    <mmultiscripts><mi mathvariant="normal">C</mi><mi>k</mi><none/><mprescripts/><mi>n</mi><none/></mmultiscripts>
    <msup><mi>a</mi><mrow><mi>n</mi><mo>&#x2212;</mo><mi>k</mi></mrow></msup>
    <msup><mi>b</mi><mi>k</mi></msup>
  </mrow>
</math>
(a+b)^n = sum_(k=0)^n C(n,k) a^(n-k) b^k
Sum[Binomial[n, k] a^(n - k) b^k, {k, 0, n}]
sum(binomial(n, k)*a^(n-k)*b^k, k = 0 .. n);
symsum(nchoosek(n, k)*a^(n-k)*b^k, k, 0, n)
(a+b)^n = ∑_(k=0)^n C(n,k) a^(n-k) b^k
The general term (the \((k+1)\)th term)
Tₖ₊₁ = ₙCₖ aⁿ⁻ᵏ bᵏ
T_{k+1} = {}_{n}\mathrm{C}_{k}\, a^{n-k} b^{k}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <msub><mi>T</mi><mrow><mi>k</mi><mo>+</mo><mn>1</mn></mrow></msub>
    <mo>=</mo>
    <mmultiscripts><mi mathvariant="normal">C</mi><mi>k</mi><none/><mprescripts/><mi>n</mi><none/></mmultiscripts>
    <msup><mi>a</mi><mrow><mi>n</mi><mo>&#x2212;</mo><mi>k</mi></mrow></msup>
    <msup><mi>b</mi><mi>k</mi></msup>
  </mrow>
</math>
T_(k+1) = C(n,k) a^(n-k) b^k
Binomial[n, k] a^(n - k) b^k
T := binomial(n, k)*a^(n-k)*b^k;
T = nchoosek(n, k)*a^(n-k)*b^k;
T_(k+1) = C(n,k) a^(n-k) b^k
Calculating a binomial coefficient (the number of combinations)
ₙCₖ = n! ÷ (k!(n−k)!)
{}_{n}\mathrm{C}_{k} = \frac{n!}{k!\,(n-k)!}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mmultiscripts><mi mathvariant="normal">C</mi><mi>k</mi><none/><mprescripts/><mi>n</mi><none/></mmultiscripts>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>n</mi><mo>!</mo></mrow>
      <mrow><mi>k</mi><mo>!</mo><mo>(</mo><mi>n</mi><mo>&#x2212;</mo><mi>k</mi><mo>)</mo><mo>!</mo></mrow>
    </mfrac>
  </mrow>
</math>
C(n,k) = (n!)/(k!(n-k)!)
Binomial[n, k]
binomial(n, k);
nchoosek(n, k)
C(n,k) = n!/(k!(n-k)!)
Pascal's triangle (the sum of two neighbors)
ₙ₋₁Cₖ₋₁ + ₙ₋₁Cₖ = ₙCₖ
{}_{n-1}\mathrm{C}_{k-1} + {}_{n-1}\mathrm{C}_{k} = {}_{n}\mathrm{C}_{k}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mmultiscripts><mi mathvariant="normal">C</mi><mrow><mi>k</mi><mo>&#x2212;</mo><mn>1</mn></mrow><none/><mprescripts/><mrow><mi>n</mi><mo>&#x2212;</mo><mn>1</mn></mrow><none/></mmultiscripts>
    <mo>+</mo>
    <mmultiscripts><mi mathvariant="normal">C</mi><mi>k</mi><none/><mprescripts/><mrow><mi>n</mi><mo>&#x2212;</mo><mn>1</mn></mrow><none/></mmultiscripts>
    <mo>=</mo>
    <mmultiscripts><mi mathvariant="normal">C</mi><mi>k</mi><none/><mprescripts/><mi>n</mi><none/></mmultiscripts>
  </mrow>
</math>
C(n-1,k-1) + C(n-1,k) = C(n,k)
Binomial[n - 1, k - 1] + Binomial[n - 1, k] == Binomial[n, k]
binomial(n-1, k-1) + binomial(n-1, k) = binomial(n, k);
nchoosek(n-1, k-1) + nchoosek(n-1, k)
C(n-1,k-1) + C(n-1,k) = C(n,k)

How to have ChatGPT  do the calculation

You are an algebra calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Use the binomial theorem to expand (2x+3)^5.
Show each of the following:
1. The general term (the (k+1)th term)
2. The binomial coefficients 5Ck for k = 0 to 5
3. The expanded expression (in descending powers of x, with each coefficient as a simplified fraction or a whole number)
4. The coefficient of x^3, and how you found it (how you chose k)

In Python, calculate exactly with math.comb and fractions.Fraction from the standard library, and show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.