Home
Use +, −, *, ^, and parentheses. Variables: any single letter.
Try:

What Is an Algebraic Expression?

An algebraic expression is a combination of numbers, variables (letters that stand for unknown values), and arithmetic operations — addition, subtraction, multiplication, and (in more advanced settings) division and exponentiation. Examples include 3x + 2, x² − 5x + 6, and 4x²y − 2xy + 7.

Expressions differ from equations: an equation contains an equals sign and asserts that two expressions are equal, while an expression has no equals sign and simply names a value that depends on its variables. This calculator simplifies expressions, not equations.

What Does "Simplify" Mean?

To simplify an algebraic expression means to rewrite it in an equivalent but shorter or more readable form. The most common steps are:

  • Combine like terms — add or subtract terms that have exactly the same variable part (same variables, same exponents). For example, 3x + 5x = 8x, but 3x + 5x² cannot be combined.
  • Expand brackets — apply the distributive property to remove parentheses: 2(x + 3) = 2x + 6, and (x + 1)(x + 2) = x² + 3x + 2.
  • Combine numeric constants — treat pure numbers as a special case of like terms: −5 + 3 = −2.
  • Re-order for readability — present the result with the highest-degree terms first, then alphabetical order for ties.

Key rules this calculator applies:

Like terms: a·xⁿ + b·xⁿ = (a + b)·xⁿ

Distributive: a(b + c) = ab + ac

FOIL: (a + b)(c + d) = ac + ad + bc + bd

Product of powers: xᵃ · xᵇ = xᵃ⁺ᵇ

How the Simplifier Works

  1. Tokenise — the input string is broken into numbers, variables, and operators (+, −, *, ^, parentheses).
  2. Parse — a recursive-descent parser converts the token stream into a list of monomials. Multiplication is distributed over addition, so every bracket is expanded automatically.
  3. Combine like terms — monomials that share the exact same variable part are merged by adding their coefficients.
  4. Sort and format — the result is sorted by descending total degree (then alphabetically) and printed with superscripts.
  5. Show steps — each group of like terms is listed so you can see exactly which terms were combined.

What Counts as a "Like Term"?

Two terms are like terms if their variable parts are identical — the same variables, each raised to the same power. Only the coefficients may differ. For example:

  • 3x² and −7x² are like terms → combine to −4x².
  • 5xy and 2xy are like terms → combine to 7xy.
  • 3x and 3x² are not like terms (different exponents).
  • 4x and 4y are not like terms (different variables).
  • 5 and −2 are like terms (both constants) → combine to 3.

Common Simplification Patterns

Most expressions simplify using one of a small number of patterns. Recognising them makes hand-simplification much faster:

  • Collect coefficients: ax + bx + cx = (a + b + c)x.
  • Distribute then collect: 2(x + 3) + 4x = 2x + 6 + 4x = 6x + 6.
  • Expand a product: (x + 1)(x + 2) = x² + 3x + 2.
  • Perfect square: (x + 3)² = x² + 6x + 9.
  • Difference of squares: (x − 3)(x + 3) = x² − 9.

Assumptions and Limitations

  • Variables are single letters (a–z, A–Z). Multi-letter variable names such as xy are treated as the product x·y.
  • Exponents must be non-negative integers. Negative or fractional exponents (such as x^(−1) or x^(1/2)) are not supported.
  • Division is not supported. To simplify (x² + x)/x, first expand and then divide each term manually, or use a computer algebra system.
  • Equations (expressions containing =) are rejected — this tool only simplifies expressions.
  • Powers of parenthesised expressions are expanded up to exponent 10 to keep the output readable.
  • Input length is limited to 500 characters.
  • Numeric coefficients may be integers, decimals, or simple fractions such as 1/2.

❓ Algebraic Expression Simplifier FAQ

What is a like term?

Like terms are terms whose variable parts are identical — same variables, same exponents. Only the coefficient can differ. For example, 3x² and 5x² are like terms (both have x²), but 3x² and 3x are not (different exponents). You can only combine like terms; you cannot add x² and x into a single term.

Can the calculator expand brackets?

Yes. Parentheses are fully expanded using the distributive property. For example, 2(x + 3) becomes 2x + 6, and (x + 1)(x + 2) becomes x² + 3x + 2. Powers of binomials such as (x + 3)² are also expanded, up to an exponent of 10.

Can I use more than one variable?

Yes. Multi-variable terms such as 4x²y and −2xy are supported. Like terms must match in every variable and exponent, so 4x²y and 3xy² are not like terms. The result is printed in alphabetical variable order within each term.

How are fractional coefficients handled?

You can enter fractions like 1/2 or 3/4 as coefficients. The simplifier will combine them exactly and display the result as a fraction when possible (for example, 1/2 x + 1/2 x = x). Decimal inputs such as 0.5 also work — the output shows the exact decimal representation.

What does the "degree" of an expression mean?

The degree of a term is the sum of the exponents on its variables. The degree of the whole expression is the largest such sum. For example, in 3x²y + 2xy + 5, the degrees of the terms are 3, 2, and 0 respectively, so the expression has degree 3.

Why are my terms re-ordered in the result?

The simplifier presents results in standard form — highest degree first, then alphabetically by variable name for ties, with constants last. This makes the result easier to compare with textbook examples. For instance, "3 − 2x" is displayed as "−2x + 3", which is the same expression in standard order.

Why does the calculator reject division?

Division introduces rational expressions, where simplification requires polynomial long division or factoring the numerator and denominator — a substantially different process from combining like terms. For rational expressions, use a dedicated algebra tool or a computer algebra system.

What if my expression contains an equals sign?

This tool simplifies expressions, not equations. If you need to solve "y = 3x + 2", enter just "3x + 2" to get it in simplified form. To solve for a variable, use an equation solver instead.

How do I enter exponents?

Use the caret symbol ^: x^2 means x squared. You can also paste superscript characters (x², x³, x⁴) directly — they are automatically converted. Exponents must be non-negative integers.

Can the simplifier factor expressions?

No — this tool simplifies by expanding and combining. Factoring goes the other way (rewriting a sum as a product). For factoring quadratics, sums of cubes, or integers, use our Factoring Calculator.

Is the result guaranteed to be correct?

For all supported inputs, the parser and combiner use exact integer and rational arithmetic, so results are exact. Floating-point coefficients entered as decimals may accumulate tiny rounding errors; the display rounds to a precision you can choose under advanced options.

Why is my term like "3x^2y" ordered differently in the output?

Within a term, variables are always listed alphabetically (x before y), and exponents use superscripts for readability. So "3y x^2" is displayed as "3x²y". Multiplication is commutative, so the meaning is unchanged.