Combine Like Terms Calculator
Simplifying an algebraic expression means rewriting it in its shortest correct form, and the skill underneath almost every simplification is combining like terms. Type an expression, and the calculator below groups every set of like terms, shows the arithmetic inside each group, and prints the simplified result.
For single-variable expressions it goes one step further: it substitutes a check value into both the original and the simplified form and confirms they agree, and it classifies the result by degree and type, for example cubic trinomial. An answer you can prove is worth more than an answer you have to trust.
Try an example:
Step-by-step solution
Quick Answer
Key takeaways
- Like terms share the exact same variable part: same letters, same exponent on each letter. Only the coefficients are added or subtracted.
- Constants are like terms with each other and with nothing else. 2x + 3 is already simplified.
- Every sign belongs to the term after it. Dropping a minus sign is the most common combining error, and the step list makes it visible.
- The substitution check is a proof, not a sample: if the two forms agree at a test value and the grouping was legal, the simplification holds.
What counts as like terms
Like terms are terms whose variable parts match exactly: the same letters, each raised to the same exponent. The coefficients in front may differ freely. Math is Fun states the rule the same way, and Khan Academy's combining like terms lesson builds it from the ground up: 2x + 3x is 5x because you are adding the same kind of thing.
| Pair | Like terms? | Why |
|---|---|---|
| 7x and -2x | Yes | Same variable part x; coefficients 7 and -2 combine to 5x |
| 5 and -3 | Yes | Both are constants, the variable-free group |
| 2x and 2x^2 | No | Exponents differ: x is not x^2 |
| 2x and 2y | No | Different variables |
| 2xy and 5yx | Yes | Multiplication commutes: xy and yx are the same variable part |
| 2x^2y and 3xy^2 | No | The squared letter differs: x^2y is not xy^2 |
That last pair is where tools quietly go wrong, so it is worth stating what this calculator does: it tracks the exponent on each letter separately. 2x^2y + 3xy^2 stays exactly as written, while 3a^2b - 2ab^2 + 7a^2b correctly simplifies to 10a^2b - 2ab^2. Both behaviors were verified by running the tool's own code against hand-worked answers before this page was published.
How to use the calculator
Type the expression with ^ for exponents. Write 3x^2 + 5x - 2x^2 + 4x, not 3x2. Plain forms like 2x2 also work: a number directly after a letter is read as its exponent.
Press Simplify. The result appears at the top, followed by the grouping steps: each family of like terms with its own arithmetic shown, in the order constants, then variable groups alphabetically.
Read the summary line. It counts the collapse (5 terms combined into 3 terms) and, for single-variable results, names the degree and type (cubic trinomial).
Check the substitution line. For one-variable expressions, your check value (2 unless you change it) is substituted into both forms. Matching numbers mean the simplification is verified.
One limit to know before you start: the tool does not expand parentheses or distribute. Turn 2(x + 3) into 2x + 6 on paper first, then combine. When the expression is simplified and you are ready to solve rather than simplify, the completing the square calculator handles quadratic equations, and the absolute value calculator covers the other expression family students meet at this level.
The rules, with the worked example
Apply it to the pre-filled example, 4x^3 + 3x^2 - 7 - x^2 + 2, exactly as the tool's step list shows it:
| Group | Arithmetic | Result |
|---|---|---|
| Constants | -7 + 2 | -5 |
| x^2 terms | 3x^2 - x^2 | 2x^2 |
| x^3 terms | 4x^3 (stands alone) | 4x^3 |
| Final | Join the groups | -5 + 2x^2 + 4x^3 |
Substitution check at x = 2: the original gives 4(8) + 3(4) - 7 - 4 + 2 = 35, and the simplified form gives -5 + 2(4) + 4(8) = 35. Both sides match, which is the same spot-check teachers ask for, done automatically. A second built-in example shows the sign discipline: -7 - x + 5x + 12 - 6x groups into constants (-7 + 12 = 5) and x terms (-x + 5x - 6x = -2x), giving 5 - 2x. The third example, 3x + 5x - 2y + 7y, shows two variable families handled side by side: 8x + 5y. Coefficient practice with plain numbers transfers directly: the fraction addition calculator drills the same add-the-numerators discipline for fractions.
Mistakes this tool is built to catch
Adding unlike terms. 2x + 3 is not 5x, and 4x^2 + 3x is already simplified. If a group in the step list contains one term standing alone, that is the tool telling you it had nothing legal to combine with.
Dropping signs. In 5 - 3x the second term is -3x, not 3x. The step list prints each group with its signs attached (3x^2 - x^2, not 3x^2 + x^2), so a sign slip shows up as a group that does not match your paper work.
Assuming the answer order means something. The tool lists constants first, then variable groups in alphabetical order, which may differ from the descending-powers order your teacher prefers. -5 + 2x^2 + 4x^3 and 4x^3 + 2x^2 - 5 are the same expression; rearrange freely.
Feeding it parentheses. The tool reads + and - separated terms only. An expression with brackets needs distributing first, and the honest move is to say so rather than silently misparse it.
What other combine-like-terms calculators miss
The most common tools in the results are near-identical clones (Calculators.sg and Calculator.now run the same text and the same vague steps): they print a simplified answer and a grouping description that never shows the actual arithmetic inside a group. Vedantu's version is stronger and gets the hard cases right, including 2xy with 5yx and a^2b against ab^2, but buries them in a general article. Pearson's simplify tool goes wider, expanding and factoring, which is a different job than the one homework actually sets. MathCelebrity analyzes a polynomial term by term at great length without a verification step.
This page's edge is the combination: per-group arithmetic you can audit line by line, correct handling of exponent position in multi-letter terms, a term-count summary, degree and type classification for single-variable results, and a substitution check that proves the answer instead of asking you to believe it.
Frequently Asked Questions
Yes. Multiplication is commutative, so xy and yx name the same variable part, and this calculator combines them: 2xy + 5yx = 7xy. It matches variable parts by their letters regardless of the order you typed them in.
No. The exponent sits on a different letter: x^2y has x squared, xy^2 has y squared. They are different variable parts and cannot be combined, so 2x^2y + 3xy^2 is already simplified. This calculator tracks the exponent on each letter separately and keeps them apart.
Because 2x and 3 are unlike terms. The 3 is a constant with no variable part, so there is nothing to add the 2x to. The expression 2x + 3 is already in simplest form.
No. It does not expand parentheses or distribute coefficients. Simplify 2(x + 3) to 2x + 6 on paper first, then enter the expanded expression.
Use the caret symbol: x^2 for x squared and x^3 for x cubed. A number typed directly after a letter, as in 2x2, is also read as an exponent. Multi-letter variable parts such as xy and x^2y are supported.
For expressions with a single variable, it substitutes your check value (2 by default) into both the original expression and the simplified result. If both sides evaluate to the same number, the simplification is verified. It is skipped for expressions with more than one variable.
Yes. In 5 - 3x, the second term is -3x, not 3x. The calculator attaches each sign to the term that follows it, which is why 3x - 8x correctly gives -5x and -x + 5x gives 4x.
Cubic names the degree: the highest exponent in the result is 3. Trinomial names the term count: three terms remain after combining. One term is a monomial, two a binomial, and four or more a polynomial.
Add This Calculator to Your Website
References
- Math is Fun, "Like Terms": the definition used on this page: terms whose variables and exponents match are like terms, while coefficients may differ. Math is Fun: Like Terms. Accessed October 2026.
- Khan Academy, "Combining like terms" (Algebra preparation): coefficients add while the variable part stays unchanged, with worked examples. Khan Academy: Combining Like Terms. Accessed October 2026.
- Khan Academy, "Operations with polynomials": adding and subtracting polynomials by grouping like terms, the procedure this calculator automates. Khan Academy: Operations with Polynomials. Accessed October 2026.
