100% free no uploads no sign-up

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.

mode: expand

Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas

problem
(x + 2)(x − 3)
answer
(x + 2)(x − 3) = x² − x − 6

✓ checked: the expanded form gives the same values as the original at several test points.

step-by-step working

  1. 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 − 6
  2. Collect like terms.

    = x² − x − 6

Useful patterns

PatternExpanded
(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)

answer
(x + 2)(x − 3) = x² − x − 6

✓ checked: the expanded form gives the same values as the original at several test points.

step-by-step working

  1. 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 − 6
  2. Collect like terms.

    = x² − x − 6

(2x − 3)²

answer
(2x − 3)² = 4x² − 12x + 9

✓ checked: the expanded form gives the same values as the original at several test points.

step-by-step working

  1. Use the pattern (a − b)² = a² − 2ab + b².

    a = 2x, b = 3
  2. Substitute and simplify each term.

    (2x − 3)² = 4x² − 12x + 9

(x + 1)(x² − x + 1)

answer
(x + 1)(x² − x + 1) = x³ + 1

✓ checked: the expanded form gives the same values as the original at several test points.

step-by-step working

  1. Multiply each term in the first bracket by each term in the second.

    (x + 1)(x² − x + 1) = x³ − x² + x + x² − x + 1
  2. Collect 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

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.

More math tools