Rational Expression Calculator
Simplify a rational expression by factoring and canceling, multiply or divide two of them, add or subtract two of them over a common denominator, solve a rational equation and check for extraneous solutions, or explore an expression's domain — where it has holes, where it blows up at a vertical asymptote — and evaluate it at any x-value. Every mode shows full factoring, step-by-step work, and a diagram of what's actually happening.
Background
A rational expression is a fraction whose numerator and denominator are both polynomials, like (x²−9)/(x+3). Just like a numeric fraction, it can be simplified by canceling common factors — but because the denominator is a polynomial, some x-values make it zero and have to be excluded from the domain entirely. Working with rational expressions is really just polynomial factoring plus fraction rules, applied together.
How to use this calculator
- Choose Simplify to factor a single rational expression and cancel any common factors, with domain restrictions clearly marked as holes or vertical asymptotes.
- Choose Multiply & Divide to combine two rational expressions into one, fully simplified and factored.
- Choose Add & Subtract to see how two rational expressions combine over a shared denominator into a single fraction.
- Choose Solve Equations to cross-multiply a rational equation, solve the resulting polynomial, and check every solution against the original denominators for extraneous roots. If a side also has a plain term added on (like the "+3" in x/(x−2) + 3 = 5/(x−2)), enter it in that side's optional "plus this term" box — no need to combine it by hand first.
- Choose Domain & Evaluate to find every x-value an expression can't use, tell holes apart from vertical asymptotes, and evaluate the expression at a chosen x.
- Click Calculate to see the diagram, the full step-by-step math, and a callout explaining what the result actually means.
How rational expressions work
A rational expression is a fraction of two polynomials, like (x²−9)/(x+3). It behaves just like a numeric fraction — you can simplify, multiply, divide, add, and subtract them — with one extra catch: the denominator can never equal zero.
To simplify, factor the numerator and denominator completely, then cancel any factor that appears in both. What's left is the simplified expression.
Every x-value that makes the original denominator zero is excluded from the domain — even after simplifying. Canceling a factor doesn't erase that restriction; it just changes how the graph behaves there.
If a canceled factor completely disappears from the denominator, that x-value becomes a hole (a removable discontinuity) — the graph has a single missing point there. If some copies of that factor remain in the denominator, the x-value is a vertical asymptote instead — the graph shoots off toward infinity.
To multiply two rational expressions, multiply numerators together and denominators together, then simplify the result as one big fraction.
To divide, flip (take the reciprocal of) the second expression and multiply — dividing by a fraction is the same as multiplying by its reciprocal.
To add or subtract, rewrite both fractions over a common denominator first, then add or subtract the numerators. The smallest such denominator (the LCD) takes the highest power of every factor that appears in either original denominator — so if both denominators already share a factor, that factor isn't duplicated.
To solve a rational equation, cross-multiply to clear the denominators, solve the resulting polynomial equation, and then check every solution against the original denominators. A solution that makes any original denominator zero is extraneous — it must be thrown out, even though it solved the cleared-out equation.
Formulas & Equations Used
Simplify: N(x)/D(x) → factor both → cancel shared factors
Multiply: [A(x)/B(x)] × [C(x)/D(x)] = [A(x)×C(x)] / [B(x)×D(x)]
Divide: [A(x)/B(x)] ÷ [C(x)/D(x)] = [A(x)×D(x)] / [B(x)×C(x)]
Add / Subtract: A(x)/B(x) ± C(x)/D(x) → rewrite both over the LCD of B(x) and D(x) (the highest power of every shared factor), then add or subtract the adjusted numerators
Solve: A(x)/B(x) = C(x)/D(x) → A(x)×D(x) − C(x)×B(x) = 0 → solve for x → discard any root where B(x)=0 or D(x)=0
Domain: x is excluded whenever D(x) = 0. If that root also makes N(x) = 0 with equal or greater multiplicity, it's a hole; otherwise it's a vertical asymptote.
Quadratic formula (used to factor quadratics): x = [−b ± √(b²−4ac)] / 2a
Example Problems & Step-by-Step Solutions
Example 1 — Simplify with one hole, one asymptote
Simplify (x²−9)/(x²+5x+6).
Step: Factor: (x−3)(x+3) / (x+2)(x+3). Cancel (x+3).
Result: (x−3)/(x+2), with x≠−3 (hole) and x≠−2 (vertical asymptote).
Example 2 — A hole with no leftover denominator
Simplify (x²−1)/(x−1).
Step: Factor: (x−1)(x+1) / (x−1). Cancel (x−1) completely.
Result: x+1, but still with x≠1 — a hole in an otherwise ordinary line.
Example 3 — Multiplying with double cancellation
Multiply (x²−4)/(x+3) by (x+3)/(x−2).
Step: Combine: (x−2)(x+2)(x+3) / [(x+3)(x−2)]. Cancel (x+3) and (x−2).
Result: x+2, with two holes at x=−3 and x=2.
Example 4 — Dividing rational expressions
Divide (x²−1)/(x+3) by (x−1)/(x+3).
Step: Flip and multiply: (x²−1)(x+3) / [(x+3)(x−1)] = (x−1)(x+1)(x+3) / [(x+3)(x−1)].
Result: x+1, with holes at x=−3 and x=1.
Example 5 — Subtracting to a clean result
Subtract 1/(x+1) from 1/(x−1).
Step: Common denominator (x−1)(x+1): [(x+1) − (x−1)] / [(x−1)(x+1)] = 2/(x²−1).
Result: 2/(x²−1), with vertical asymptotes at x=1 and x=−1 (no holes — the constant 2 shares no factors with the denominator).
Example 6 — Adding with different denominators
Add 1/x and 1/(x+1).
Step: Common denominator x(x+1): [(x+1) + x] / [x(x+1)] = (2x+1)/(x²+x).
Result: (2x+1)/(x²+x), with x≠0 and x≠−1, both vertical asymptotes.
Example 7 — An extraneous solution
Solve x/(x−3) = (2x−3)/(x−3).
Step: Same denominator, so set numerators equal: x = 2x−3 → x = 3.
Result: x=3 makes both original denominators zero, so it's extraneous — this equation has no valid solution.
Example 8 — A hole and an asymptote side by side
Find the domain of (x+2)/(x²−4) and evaluate it at x=5.
Step: Factor the denominator: (x−2)(x+2). The (x+2) cancels with the numerator; (x−2) doesn't.
Result: Hole at x=−2, vertical asymptote at x=2. At x=5: (5+2)/(25−4) = 7/21 = 1/3.
Example 9 — A fraction plus a whole number
Solve x/(x−2) + 3 = 5/(x−2).
Step: Combine the left side first: [x + 3(x−2)]/(x−2) = (4x−6)/(x−2). Cross-multiply with the right side: (4x−6)(x−2) = 5(x−2).
Result: This factors to 4(x−2)(x−11/4) = 0, giving x=2 or x=11/4. Since x=2 makes the denominator zero, only x = 11/4 is valid.
Frequently Asked Questions
Why do domain restrictions survive even after simplifying?
The domain is a property of the original expression, before any canceling happens. Canceling a factor changes how the function behaves at that point (from "undefined, blows up" to "undefined, single missing point") but it never makes that point valid again.
What's the real difference between a hole and a vertical asymptote?
Both are excluded from the domain, but a hole is a single missing point where the simplified graph would otherwise be perfectly normal — the limit exists, the function just isn't defined there. A vertical asymptote is where the function's value grows without bound as x approaches that point.
Why do I need to flip the second fraction when dividing?
Dividing by a number is the same as multiplying by its reciprocal (dividing by 2 is the same as multiplying by 1/2). The same rule applies to rational expressions: dividing by C(x)/D(x) is identical to multiplying by D(x)/C(x).
How does the calculator find the least common denominator?
It factors both denominators, then for every factor that shows up in either one, it keeps only the highest power needed. If both denominators are already the same, the LCD is just that denominator — not its square — which keeps the common-denominator step from ever showing an unnecessarily bloated result.
What makes a solution to a rational equation "extraneous"?
Cross-multiplying works by multiplying both sides of the equation by the product of the two denominators. If a candidate solution happens to make that product zero, it means you multiplied both sides by zero — and multiplying anything by zero makes both sides equal, even if the original equation was never actually true (or was undefined) at that x. That candidate solution passes the cleared-out equation but was never valid in the original one, so it must be discarded.
Can a rational equation have no valid solution at all?
Yes. If every algebraic solution turns out to be extraneous, or if cross-multiplying leads to a false statement like 0 = 1, the equation simply has no solution, even though it looked perfectly solvable at first.
Does this calculator handle every possible polynomial?
It's built for the polynomials typical of introductory and intermediate algebra: linear and quadratic factors, and cubics or higher that have at least one rational root. If a polynomial has only irrational or complex roots beyond degree two, the calculator will flag that its factoring may be incomplete rather than silently guessing.
Why does evaluating at a restricted x-value fail even for a "hole"?
A hole means the simplified expression would have a normal value there, but the original expression is still a 0/0 (or similar) indeterminate form at that exact x. The function is undefined at that single point no matter how clean the simplified version looks.