Rational Expression Calculator

Simplify, add, subtract, multiply and divide rational expressions, and solve rational equations, with every step shown and every answer in exact fractions. The calculator factors the numerators and denominators, cancels only genuine common factors, tracks the excluded values (the values of x that would divide by zero) from the original expressions, and for equations clears the denominators and then rejects any root that was excluded, which is where extraneous solutions come from. Nothing is rounded and nothing is cancelled that should not be: cancelling terms instead of factors is the classic error this tool is built to avoid.

Syntax: the variable is x. Powers as x^2, multiplication as * or by juxtaposition (2x, 3(x – 1)), fractions with / and parentheses, negative exponents like x^-1 allowed. Polynomials only: no sin, sqrt or other functions. Degrees up to 12.

How to use this calculator

  1. Choose the job: simplify one expression, add or subtract two, multiply or divide two, or solve an equation between two expressions.
  2. Type the expressions using parentheses freely: (x^2 – 1)/(x + 1) is unambiguous, x^2 – 1/x + 1 is a different, much stranger expression.
  3. Click Calculate and read the result first, then the steps: each step names what was factored, what was cancelled, or which denominator was cleared.
  4. Always read the excluded values line. Those values were forbidden from the start and stay forbidden after simplifying: (x − 1)/(x + 1) is not the same function as the original at x = −1, where the original has a hole.
  5. For equations, check the verdict on each root: roots that collide with an excluded value are rejected as extraneous, and surviving roots are verified by substitution before being reported.

The method

Cancel factors, never terms. (x + 1)/x is already finished: the x in the numerator is a term of a sum, not a factor, and cancelling it is the single most common rational-expression error.

Restrictions come first and survive. Every denominator in the original expressions contributes its zeros as excluded values, before any cancelling happens.

All arithmetic here is exact polynomial arithmetic over the rationals: coefficients are fractions, never decimals, so (x − 1)/(x + 1) comes out as exactly that, not 0.999x − something. To simplify, numerator and denominator are factored over the rationals (every rational root is extracted, with multiplicity) and their greatest common polynomial factor is divided out, along with any common numerical content. For addition and subtraction the denominators are factored to build the least common denominator, each fraction is rewritten over it, the numerators are combined, and the result is simplified. Multiplication multiplies across; division multiplies by the reciprocal, which is why a divisor’s numerator joins the excluded values. For equations, both sides are combined over their denominators and the denominators are cleared, giving a polynomial equation; its roots are found exactly where they are rational, by the quadratic formula where the remaining factor is quadratic, and numerically otherwise; finally every root is tested against the excluded values, because clearing denominators can manufacture roots that the original equation never had.

Worked examples

Example 1: the default simplification

(x² − 1)/(x² + 2x + 1): the numerator factors as (x − 1)(x + 1) and the denominator as (x + 1)². Cancelling the common factor (x + 1) leaves (x − 1)/(x + 1), with the excluded value x ≠ −1 kept from the original denominator.

Example 2: numerical content cancels too

(2x² + 6x)/(4x): factor 2x(x + 3) over 4x, cancel the factor x and the common content 2, giving (x + 3)/2, with x ≠ 0.

Example 3: adding over an LCD

1/(x − 1) + 2/(x + 1): the LCD is (x − 1)(x + 1) = x² − 1; rewriting gives the combined numerator (x + 1) + 2(x − 1) = 3x − 1 over it; nothing cancels, and the answer is (3x − 1)/(x² − 1) with x ≠ 1 and x ≠ −1.

Example 4: division adds a restriction

((x² − 1)/x) ÷ ((x + 1)/x²): flip the divisor and multiply: (x − 1)(x + 1) · x² / (x(x + 1)) = x² − x. The excluded values are x ≠ 0 and x ≠ −1: the −1 comes from the divisor’s numerator, which becomes a denominator after the flip.

Example 5: an equation whose only root is extraneous

x/(x − 3) = 3/(x − 3): clearing denominators gives x = 3, but x = 3 is excluded from the original equation (both denominators vanish there), so it is rejected and the equation has no solution. An answer key that reports 3 here is wrong.

Example 6: irrational roots, kept

1/x + 1/(x + 1) = 1: clearing gives x² − x − 1 = 0 (up to sign), whose roots are (1 ± √5)/2 ≈ 1.618 and −0.618. Neither is excluded (x ≠ 0, −1), and both verify by substitution, so both are solutions, reported exactly and approximately.

Reading your results

The simplified form is equal to the original only where the original exists. Cancelling (x + 1) does not resurrect x = −1: the original expression is undefined there (a hole in its graph), the simplified one returns a value. The excluded values line is part of the answer, not a footnote.

Factored steps are the audit trail. If a result surprises you, the factorisation lines show exactly what was cancelled. If a factor you expected is missing, it was not a factor: check whether you were looking at a term instead.

“Already in lowest terms” is a complete answer. (x + 1)/(x + 2) shares no factor and no content; nothing legal can be cancelled, and the tool says so rather than inventing a move.

For equations, “no solution” and “identity” are real verdicts. No solution means every candidate root was extraneous or the cleared equation is a contradiction; identity means the two sides are the same expression in disguise, true for every permitted x.

Common mistakes

  • Cancelling terms. (x + 1)/x ≠ 1, and (x² + 3x)/x² is not 3/x. Only complete factors cancel; a sum must be factored first, which is why the steps here factor before anything is cancelled.
  • Dropping the restrictions after simplifying. The simplified expression may accept values the original forbids. Graders, and the function itself, still count the originals.
  • Forgetting that division flips and adds restrictions. Dividing by a fraction multiplies by its reciprocal, and the divisor’s numerator becomes a forbidden denominator too.
  • Reporting extraneous roots. Clearing denominators multiplies both sides by expressions that can be zero; any root that makes an original denominator zero is not a solution, full stop.
  • Building the LCD as the product every time. It works but leaves a reducible mess; factoring the denominators first gives the least common denominator and a numerator that often cancels at the end.
  • Sign slips when subtracting. a − (b − c) subtracts both terms; the second numerator in a subtraction is negated as a whole, which the steps show explicitly.

Limitations

  • One variable (x) and polynomial expressions only, degrees up to 12. Fractions of numbers rather than expressions belong to the Fraction Calculator; functions, roots and absolute values belong to the Function and Graphing calculators.
  • Factoring is over the rational numbers: a factor like x² − 2 (roots ±√2) is reported whole in factorizations, though equation solving still finds its roots by the quadratic formula, and excluded values with irrational roots are reported in exact radical form.
  • Equation roots beyond the quadratic factor are found numerically and marked approximate; rational roots are always found exactly.
  • Multivariable rational expressions, partial fractions, and rational inequalities are separate topics with their own tools and are not approximated here.

Frequently asked questions

Why can I not cancel the x in (x + 1)/x?

Because cancellation is division of numerator and denominator by a common factor, and x is not a factor of the numerator x + 1; it is one of its terms. Dividing only part of a sum changes the value: at x = 2 the expression is 3/2, not 1.

What are excluded values, and why do they survive simplifying?

They are the inputs that make any original denominator zero. Cancelling a factor changes the written form, not the domain: the original expression simply does not exist at those points, so any correct answer carries them along.

What is the difference between a hole and a vertical asymptote?

A cancelled factor produces a hole: the simplified function has a value there, the original does not. A factor that remains in the denominator after simplifying produces a vertical asymptote. The Graphing Calculator shows both.

Why did my equation’s root get rejected?

Clearing denominators can introduce roots of the clearing expressions themselves. If a root makes any original denominator zero, it never satisfied the original equation; it is extraneous and is rejected, with the reason shown.

Does the calculator use a common denominator or the LCD?

The least common denominator, built from the factored denominators (each factor at its highest power across the denominators), which keeps the combined numerator as small as possible before the final simplification.

Can it handle a fraction inside a fraction?

Yes: nested fractions are interpreted as compound rational expressions and simplified as a whole, with every inner denominator contributing its excluded values. For example, (1/x + 1)/(1/x − 1) simplifies to (−x − 1)/(x − 1) with x ≠ 0 and x ≠ 1.

Related calculators

Method: expressions are parsed into polynomial numerator/denominator pairs with exact fraction coefficients (typed text is never evaluated as code); simplification divides out the greatest common polynomial factor, found by the Euclidean algorithm, plus any common numerical content; denominators are factored over the rationals by extracting rational roots with multiplicity; addition uses the least common denominator of the factored denominators; equations are cleared to a polynomial equation whose roots are tested against the original excluded values and verified by substitution. Results are exact; numerical roots, where unavoidable, are marked approximate. Last reviewed: 22 October 2026.

Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice.