expand calculator
To expand brackets, multiply every term in one bracket by every term in the other, then collect like terms. For (a + b)² you can use the shortcut a² + 2ab + b². Type an expression to see each product and the final result.
Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas
✓ checked: the expanded form gives the same values as the original at several test points.
step-by-step working
Multiply each term in the first bracket by each term in the second (FOIL: first, outer, inner, last).
(x + 2)(x − 3) = x² − 3x + 2x − 6Collect like terms.
= x² − x − 6
Useful patterns
| Pattern | Expanded |
|---|---|
| (a + b)² | a² + 2ab + b² |
| (a − b)² | a² − 2ab + b² |
| (a + b)(a − b) | a² − b² |
| (a + b)³ | a³ + 3a²b + 3ab² + b³ |
| (x + p)(x + q) | x² + (p + q)x + pq |
Worked examples
(x + 2)(x − 3)
✓ checked: the expanded form gives the same values as the original at several test points.
step-by-step working
Multiply each term in the first bracket by each term in the second (FOIL: first, outer, inner, last).
(x + 2)(x − 3) = x² − 3x + 2x − 6Collect like terms.
= x² − x − 6
(2x − 3)²
✓ checked: the expanded form gives the same values as the original at several test points.
step-by-step working
Use the pattern (a − b)² = a² − 2ab + b².
a = 2x, b = 3Substitute and simplify each term.
(2x − 3)² = 4x² − 12x + 9
(x + 1)(x² − x + 1)
✓ checked: the expanded form gives the same values as the original at several test points.
step-by-step working
Multiply each term in the first bracket by each term in the second.
(x + 1)(x² − x + 1) = x³ − x² + x + x² − x + 1Collect like terms.
= x³ + 1
FOIL and beyond
FOIL (first, outer, inner, last) is a way to remember the four products when multiplying two brackets with two terms each: (x + 2)(x − 3) gives x², −3x, 2x and −6, which collect to x² − x − 6. With longer brackets the idea is the same — every term times every term — so a 2-term bracket times a 3-term bracket gives 6 products before collecting.
Common mistakes
- Writing (x + 3)² = x² + 9. The middle term 6x is missing.
- Sign slips with negatives: (x − 3)(x − 2) has +6 at the end, because −3 × −2 = +6.
- Forgetting to multiply a coefficient in front: 2(x + 1)² = 2(x² + 2x + 1) = 2x² + 4x + 2.
Frequently asked questions
Is expanding the opposite of factoring?
Yes. Expanding turns a product into a sum, and factoring turns the sum back into a product. Use factor mode to go the other way.
Can it expand big powers like (x + 1)⁵?
Yes, up to a power of 30. It multiplies the bracket by itself repeatedly and collects like terms; the coefficients match Pascal's triangle.
Does it work with several variables?
Yes. (a + b)(a − b) gives a² − b², and terms are collected in a consistent order.
What's the difference between expand and simplify?
Expand always multiplies out brackets. Simplify picks whichever form is shorter and also cancels algebraic fractions.