United Kingdom · Maths & Statistics
Expand and Simplify Calculator
Enter the brackets and the calculator multiplies them out and collects like terms, showing the FOIL steps for two brackets and the Pascal's triangle coefficients for a power. It also substitutes values so you can check the expansion is right.
How do you expand and simplify brackets?
Multiply every term in the first bracket by every term in the second, then collect terms with the same power together. For (x + 3)(x + 5) that gives x² + 5x + 3x + 15, which simplifies to x² + 8x + 15. FOIL — first, outer, inner, last — is a memory aid for two binomials.
How to use this calculator
- Write each bracket as ax + b(x + 3) has a = 1 and b = 3. (2x − 5) has a = 2 and b = −5. A negative sign goes in the b field, not in front of the bracket.
- Use the multiplier for a factor outside3(x + 2)(x − 4) has a multiplier of 3. It is applied to every term at the end.
- Switch to the power mode for repeated brackets(x + 2)⁴ is far quicker as a power than as four separate brackets, and the working shows the Pascal's triangle coefficients.
- Use the substitution checksThe value at x = 1 is always the sum of the coefficients. If your hand expansion disagrees, that is where to look.
Every term must meet every term
Expanding brackets is one application of the distributive law, and the rule is simply that every term in the first bracket multiplies every term in the second.
For two binomials that gives four products, which is what FOIL names: First, Outer, Inner, Last. The acronym is a useful crutch for beginners and a liability afterwards, because it only works for two brackets with two terms each.
For three brackets, or for a bracket with three terms, FOIL means nothing. The underlying principle still applies — multiply everything by everything — and working systematically is more reliable than trying to extend a mnemonic.
Simplifying is the second half, and it is just collecting like terms. Only terms with the same power of the variable can be added, so 5x and 3x combine to 8x while x² and x do not combine at all.
Two patterns are worth recognising on sight because they appear constantly.
The difference of two squares: (a + b)(a − b) = a² − b². The middle terms cancel exactly, so (x + 7)(x − 7) is x² − 49 with no x term at all. Spotting this saves expanding, and it is the key to factorising a great many expressions.
The perfect square: (a + b)² = a² + 2ab + b². The most common error in all of algebra is writing (a + b)² = a² + b², which is wrong for every pair of non-zero numbers. Test it with 3 and 4: (3 + 4)² is 49, while 3² + 4² is 25.
For higher powers, Pascal's triangle gives the coefficients directly. Row 3 is 1, 3, 3, 1, so (x + a)³ = x³ + 3ax² + 3a²x + a³. Each row is built by adding adjacent pairs from the row above, and it is far quicker than multiplying out three brackets by hand.
Signs are where marks are lost. A minus inside a bracket multiplies everything it meets, and two minuses give a plus. (x − 3)(x − 5) has a positive 15 at the end, and the x coefficient is −8, not +8.
(a + b)(c + d) = ac + ad + bc + bdWorked example: (x + 3)(x + 5) and (x + 2)³
Take (x + 3)(x + 5) with FOIL.
First terms: x × x = x².
Outer terms: x × 5 = 5x.
Inner terms: 3 × x = 3x.
Last terms: 3 × 5 = 15.
So the expansion is x² + 5x + 3x + 15, and collecting the two x terms gives x² + 8x + 15.
Check it by substituting x = 1. The original is (1 + 3)(1 + 5) = 4 × 6 = 24. The expansion is 1 + 8 + 15 = 24. They agree, and notice that 24 is also the sum of the coefficients — which is always true at x = 1.
Check again at x = 2: original (5)(7) = 35, expansion 4 + 16 + 15 = 35. Agreed.
Now change one sign: (x − 3)(x + 5). First x², outer 5x, inner −3x, last −15. That gives x² + 2x − 15. The x coefficient dropped from 8 to 2 and the constant went negative.
And (x − 3)(x − 5): first x², outer −5x, inner −3x, last +15. That is x² − 8x + 15. Both signs flipped on the middle term, and the constant is positive because two negatives multiplied.
Now (x + 2)³ using Pascal's triangle. Row 3 is 1, 3, 3, 1.
The terms run x³, x²·2, x·2², 2³ with those coefficients: 1·x³ + 3·x²·2 + 3·x·4 + 1·8.
That gives x³ + 6x² + 12x + 8.
Check at x = 1: original (3)³ = 27, expansion 1 + 6 + 12 + 8 = 27. Agreed.
Doing the same by multiplying three brackets means expanding (x + 2)(x + 2) to x² + 4x + 4, then multiplying that by (x + 2) term by term — six products to track instead of four coefficients to read off. Pascal's triangle is much faster once the rows are familiar.
Pascal's triangle
| Power | Coefficients | (x + a) expanded |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 1 1 | x + a |
| 2 | 1 2 1 | x² + 2ax + a² |
| 3 | 1 3 3 1 | x³ + 3ax² + 3a²x + a³ |
| 4 | 1 4 6 4 1 | x⁴ + 4ax³ + 6a²x² + 4a³x + a⁴ |
| 5 | 1 5 10 10 5 1 | x⁵ + 5ax⁴ + 10a²x³ + 10a³x² + 5a⁴x + a⁵ |
| 6 | 1 6 15 20 15 6 1 | x⁶ + 6ax⁵ + 15a²x⁴ + 20a³x³ + … |
Each row is built by adding adjacent pairs from the row above, with 1 at each end. The powers of x count down while the powers of a count up, and the two always sum to the row number — a useful check that you have not lost a term. For (x − a)ⁿ the same coefficients apply with alternating signs, starting positive.
Where expansion is used, and how to check it
Expansion and factorising are inverse operations, and fluency in both is what makes quadratic work possible. Being able to see that x² + 8x + 15 came from (x + 3)(x + 5) is exactly the skill needed to solve x² + 8x + 15 = 0, because the factorised form hands you the roots directly.
That connection is worth making explicit: the roots of the expanded polynomial are the values that make each bracket zero. For (x + 3)(x + 5) they are x = −3 and x = −5, which are the negatives of the b values.
In coordinate geometry, expanding the equation of a circle from (x − a)² + (y − b)² = r² into the general form, and completing the square to go back, is a standard technique that rests entirely on the perfect square expansion.
In calculus, expanding before differentiating is often easier than using the product rule, particularly for a product of two simple linear factors.
In statistics, the binomial expansion of (p + q)ⁿ generates the binomial distribution — each term gives the probability of a particular number of successes, and Pascal's triangle supplies the combinations.
On checking your work, substitution is the most reliable method and it takes seconds. Pick a simple value, evaluate the original and the expansion, and compare. Use x = 1 for the fastest check, since the expansion just becomes the sum of the coefficients. Then use x = 2 or x = −1 as a second test, because x = 1 will not catch every kind of error.
A second check is the degree. Multiplying two linear brackets must give a quadratic; three must give a cubic. If your answer has the wrong highest power, a term has gone missing.
A third is the constant term. It is always the product of the constants in each bracket, so for (x + 3)(x + 5)(x + 2) it must be 30. That single number catches a surprising proportion of sign errors.
Common mistakes worth naming: forgetting to multiply the outside factor by every term rather than just the first; squaring a bracket by squaring each term; and losing a negative when the second bracket is subtracted from something. Writing out every product before collecting, rather than trying to do it in your head, prevents most of them.
This handles linear brackets in a single variable and binomial powers. Expressions with more than one variable, or with quadratic factors, need to be worked by hand.
Assumptions and limitations
- Handles linear brackets of the form ax + b in one variable
- Does not expand brackets containing x² or higher terms
- Does not handle expressions with more than one variable
- Powers are limited to 0 through 8
- Does not factorise — it only expands
- Coefficients are shown to four decimal places where they are not whole numbers
- Does not simplify algebraic fractions or surds within the brackets
Questions people ask about this in United Kingdom
How do you expand and simplify brackets?
Multiply every term in the first bracket by every term in the second, then collect like terms.
(x + 3)(x + 5) gives x² + 5x + 3x + 15, which simplifies to x² + 8x + 15.
What does FOIL stand for?
First, Outer, Inner, Last — the four products when multiplying two binomials.
It is a useful crutch for two brackets and useless for three, so it is worth outgrowing.
Is (a + b)² the same as a² + b²?
No, and this is the most common error in algebra. (a + b)² = a² + 2ab + b².
Test it with 3 and 4: (3 + 4)² is 49, while 3² + 4² is 25.
What is the difference of two squares?
(a + b)(a − b) = a² − b². The middle terms cancel exactly, so (x + 7)(x − 7) is x² − 49 with no x term.
Spotting it saves expanding and is the key to a lot of factorising.
How do I expand a bracket to a high power?
Use Pascal's triangle for the coefficients. Row 3 is 1, 3, 3, 1, so (x + 2)³ = x³ + 6x² + 12x + 8.
It is far quicker than multiplying three brackets by hand.
How can I check my expansion is right?
Substitute a simple value into both the original and the expansion — they must agree.
At x = 1 the expansion is just the sum of the coefficients, which makes it the fastest check.
Why is (x − 3)(x − 5) equal to x² − 8x + 15 and not −15?
Because the last terms are −3 × −5, and two negatives multiply to a positive.
The middle term is negative because both outer and inner products are negative.
Related United Kingdom calculators
Tools people usually open in the same sitting.
Method, source and review date
- How it is worked out
- Polynomial coefficient multiplication with exact arithmetic
- Formula used
(ax + b)(cx + d) = acx² + (ad + bc)x + bd- Checked against
- Standard algebraic expansion
- Last reviewed
- Confidence
- High
Spotted a figure that has moved, or a formula you can show is wrong? Tell us — send a correction. Fixes to rates and formulas are treated as urgent.
Disclaimer
This calculator gives an estimate for guidance only. Check the figures against your own measurements or paperwork before you commit money to them.