Algebraic Expression Simplifier
Enter a polynomial in x. The tool expands special products, multiplies terms, and combines like terms step-by-step.
The calculator above expands brackets, collects like terms, and simplifies algebraic expressions while listing each transformation.
Formulas used
- Like terms have the same variables raised to the same powers.
- Expand products first, then combine like terms.
Worked example
Simplify (x + 2)² − (x − 1)(x + 1):
Enter the same values in the calculator above to see every step of the solution.
Worked examples by problem type (easy to hard)
Each example below covers one type of simplification problem, ordered from the easiest to the hardest. Type the expression shown under each example into the calculator above to compare every step.
Example 1. Combining like terms (easy)
Simplify A = 5x² − 3x + 2 − 2x² + 7x − 6.
There are no brackets, so group the terms with the same power of x and add their coefficients.
Input: 5x^2 - 3x + 2 - 2x^2 + 7x - 6
Example 2. Multiplying a monomial by a polynomial
Simplify B = 3x(2x − 5) − 2x(3x − 4).
Multiply the monomial by each term inside the brackets: multiply the coefficients and add the exponents.
The minus sign in front of the second product changes both signs: −(6x² − 8x) = −6x² + 8x.
Input: 3x(2x - 5) - 2x(3x - 4)
Example 3. Multiplying two polynomials
Simplify C = (x + 2)(x² − 3x + 1).
Multiply each term of the first bracket by each term of the second: 2 × 3 = 6 partial products.
Input: (x + 2)(x^2 - 3x + 1)
Example 4. Square of a sum or a difference
Simplify D = (3x − 2)² − 9x(x − 1).
Remember to square the coefficient as well: (3x)² = 9x², not 3x². If a problem then asks for the value of x that makes D = 0, solve −3x + 4 = 0 with the linear equation calculator.
Input: (3x - 2)^2 - 9x(x - 1)
Example 5. Difference of two squares: a value that does not depend on x
Show that E = (x − 5)(x + 5) − (x + 3)(x − 3) does not depend on x.
After simplifying, no x is left, so E = −16 for every value of x. This is how you prove that an expression does not depend on the variable.
Input: (x - 5)(x + 5) - (x + 3)(x - 3)
Example 6. Cube of a sum or a difference
Simplify F = (x + 1)³ − (x − 1)³.
The terms x³ and 3x cancel; the terms 3x² and 1 double. For higher powers, the coefficients 1, 3, 3, 1 come from Pascal’s triangle; see the binomial expansion calculator.
Input: (x + 1)^3 - (x - 1)^3
Example 7. Sum and difference of two cubes
Simplify G = (x + 2)(x² − 2x + 4) − (x − 1)(x² + x + 1).
Recognize the two factored forms: (a + b)(a² − ab + b²) = a³ + b³ with a = x, b = 2, and (a − b)(a² + ab + b²) = a³ − b³ with a = x, b = 1.
The calculator multiplies the brackets term by term, so its solution is longer, but it reaches the same answer 9.
Input: (x + 2)(x^2 - 2x + 4) - (x - 1)(x^2 + x + 1)
Example 8. Simplify, then evaluate (hard)
Evaluate H = (2x − 1)² − (x + 2)(x − 2) − 3x(x − 1) at x = 2026.
Substituting 2026 straight away means squaring large numbers. Simplify first:
Input: (2x - 1)^2 - (x + 2)(x - 2) - 3x(x - 1)
🎯 Practice quiz: simplifying algebraic expressions
Ten multiple-choice questions with four options each, built on the sections above: like terms, combining like terms, removing brackets after a minus sign, multiplying a monomial or a polynomial, the square of a difference, the difference of two squares, the cube of a sum, the sum of two cubes, and simplifying before evaluating. Pick an answer: the correct option turns green, a wrong one turns red, and the worked solution appears right below with a ⚠️ Traps box explaining why the wrong options are tempting. You can paste any expression from a question into the calculator above to check every step.
1️⃣ Like terms Question 1. Which pair of monomials are like terms:
Correct answer: B. −5x³ and 2x³
Like terms have the same variables raised to the same powers; their coefficients may differ. −5x³ and 2x³ share the variable part x³, so they can be combined:
⚠️ Traps
- A: same coefficient but different powers (x² and x). Like terms depend on the variable part, not the coefficient.
- C: 4 is a constant (degree 0), while 4x has degree 1.
- D: same variables x and y, but each is raised to a different power.
2️⃣ Combining like terms Question 2. Simplify 4x² − 3x + 5 − x² + 3x − 8:
Correct answer: C. 3x² − 3
Group the terms by degree and add the coefficients, keeping the sign in front of each term:
The x terms add up to 0, so that degree disappears from the simplified polynomial. Paste the expression into the calculator above and Step 2 shows exactly this.
⚠️ Traps
- A: drops the minus signs in front of x² (adding 4 + 1) and in front of 3x.
- B: reads +3x as −3x, so −3x − 3x = −6x.
- D: adds 5 + 8 instead of 5 − 8.
3️⃣ Removing brackets after a minus sign Question 3. Simplify 2x − (3x − 5):
Correct answer: B. −x + 5
When a minus sign stands in front of a bracket, change the sign of every term inside it:
If the problem then asks when the expression equals 0, solve −x + 5 = 0 to get x = 5; check it with the linear equation calculator.
⚠️ Traps
- A: changes the sign of the first term only and forgets to turn −5 into +5.
- C: wrongly turns 3x into +3x but keeps −5.
- D: drops every minus sign, as if the bracket were added.
4️⃣ Monomial times polynomial Question 4. The product −2x(3x² − x + 4) equals:
Correct answer: D. −6x³ + 2x² − 8x
Multiply −2x by each term: multiply the coefficients (with their signs) and add the exponents of x.
⚠️ Traps
- A: forgets that a negative times a negative is positive: (−2x)·(−x) = +2x².
- B: multiplies the coefficients but does not add the exponents, so the degree never rises.
- C: forgets to multiply −2x by the constant 4.
5️⃣ Square of a difference Question 5. Expand (2x − 3)²:
Correct answer: C. 4x² − 12x + 9
Use (a − b)² = a² − 2ab + b² with a = 2x and b = 3:
Because the result is a perfect square, the equation 4x² − 12x + 9 = 0 has the double root x = 3/2; confirm it with the quadratic formula calculator (Δ = 0).
⚠️ Traps
- A: writes (a − b)² = a² − b² and loses the middle term −2ab.
- B: forgets the factor 2 in 2ab: 2·2x·3 = 12x, not 6x.
- D: does not square the coefficient: (2x)² = 4x², not 2x².
6️⃣ Difference of two squares Question 6. Simplify (3x + 1)(3x − 1) − 9x²:
Correct answer: A. −1
The product of a sum and a difference of the same two terms is a difference of squares, so there is no need to multiply term by term:
The result is a constant, so the expression does not depend on x (just like Example 5 above).
⚠️ Traps
- B: misremembers (a + b)(a − b) as a² + b².
- C: does not square the coefficient 3, writing (3x)² = 3x².
- D: adds 9x² instead of subtracting it.
7️⃣ Polynomial times polynomial Question 7. In the simplified form of (x − 2)(x² + 3x − 1), the coefficient of x is:
Correct answer: D. −7
Multiply each term of (x − 2) by each term of the second bracket, six products in all:
The two products of degree 1 are x·(−1) = −x and (−2)·3x = −6x, so the coefficient is −1 − 6 = −7.
⚠️ Traps
- A: takes (−2)·3x = +6x, a sign error.
- B: takes x·(−1) = +x, a sign error.
- C: skips the product x·(−1); always count all 2 × 3 = 6 partial products.
8️⃣ Cube of a sum Question 8. Expand (x + 2)³:
Correct answer: B. x³ + 6x² + 12x + 8
Use (a + b)³ = a³ + 3a²b + 3ab² + b³ with a = x and b = 2:
The coefficients 1, 3, 3, 1 are a row of Pascal’s triangle; for larger exponents, use the binomial expansion calculator.
⚠️ Traps
- A: treats the power of a sum as the sum of the powers and loses the two middle terms.
- C: computes 2³ as 2·3 = 6 instead of 2·2·2 = 8.
- D: forgets to square b in 3ab²: 3·x·2² = 12x, not 6x.
9️⃣ Sum of two cubes Question 9. The value of P = (x + 3)(x² − 3x + 9) − x³ is:
Correct answer: C. 27
The product has the form (a + b)(a² − ab + b²) = a³ + b³ with a = x and b = 3:
P equals 27 for every x. You can check 3³ = 27 with the exponent calculator.
⚠️ Traps
- A: confuses it with the difference of two cubes (a − b)(a² + ab + b²) = a³ − b³.
- B: squares 3 instead of cubing it.
- D: turns −x³ into +x³ when removing the brackets.
🔟 Simplify, then evaluate Question 10. The value of Q = (x − 1)² − (x + 2)(x − 2) + 2x at x = 2026 is:
Correct answer: A. 5
Simplify first, then substitute:
Q = 5 for every x, so at x = 2026 the value is 5. Paste the expression into the calculator above to see each step.
⚠️ Traps
- B: removes −(x² − 4) as −x² − 4, forgetting to change the sign of −4.
- C: writes (x − 1)² = x² − 1 and loses −2x, so Q = 2x + 3 = 4055.
- D: writes (x − 1)² = x² − 2x − 1, with the wrong sign on b².
How to use the calculator
- Type the expression, for example (x + 2)^2 − (x − 1)(x + 1).
- Press the calculate button. The result appears instantly.
- Read the step-by-step solution, rendered with KaTeX, to check your own work.
🔗 Related calculators
- Linear equation calculator: solve the simplified expression = 0
- Quadratic formula calculator: spot perfect squares such as (2x − 3)²
- Binomial expansion calculator: (a + b)ⁿ for any exponent
- Exponent and radical calculator
- Fraction calculator: simplify fractional coefficients
- System of linear equations calculator (2 variables)
- Derivative calculator: differentiate the simplified polynomial
- Function analysis and graphing calculator for polynomials