Simplify rational expression calculator
(x^2 - 1)/(x - 1) simplifies to x + 1, yet the value 1 stays excluded because it made the original denominator zero. The calculator cancels every common factor and keeps track of those holes for you. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Numerator
- 1, 0, -1
- Denominator
- 1, -1
- Original
- (x^2 - 1)/(x - 1)
- Simplified
- x + 1
- Simplified numerator
- 1, 1
- Simplified denominator
- 1
Simplifying a rational expression is a core algebra skill: write a ratio of polynomials in lowest terms by factoring when possible, cancelling every common polynomial factor that appears in both numerator and denominator, then stating the values of the variable that must be excluded because they made the original denominator zero. Students, tutors, LMS authors, and automation scripts all need the same deterministic answer for textbook-style inputs without floating sign errors or forgotten domain holes. This simplify rational expression calculator accepts two coefficient arrays—numerator and denominator—cancels their monic greatest common divisor with the Euclidean algorithm, and returns display strings, coefficient lists, the cancelled factor, and excluded real roots from the original denominator.
What simplifying a rational expression means and why domain holes matter
A rational expression is a ratio of polynomials, written n(x) over d(x) with d not the zero polynomial. Simplifying means dividing numerator and denominator by every common polynomial factor—equivalently, by their monic greatest common divisor computed with the Euclidean algorithm on the two coefficient lists. After cancellation the remaining fraction is in lowest terms over the coefficient field used by the engine, and the denominator is normalized to be monic so clients see a stable leading one.
Critically, values that made the original denominator zero remain excluded from the domain of the original expression even when those factors cancelled from the simplified form; textbooks call them removable discontinuities or holes, and graders still mark them as excluded. Linear denominators yield one excluded root; quadratics yield zero, one, or two real roots via the quadratic formula; higher-degree denominators contribute rational roots found by the rational-root theorem when coefficients are near integers. Constant nonzero denominators contribute no finite excluded roots.
What you enter and what you get back
Example: numerator equals [1, 0, -1] and denominator equals [1, -1] encode (x squared minus one) over (x minus one). Optional precision (integer zero through fifteen, default ten) controls decimal places on coefficients and roots. If the denominator is the zero polynomial the task fails immediately.
Example: (x squared minus five x plus six) over (x squared minus four x plus three) simplifies to (x minus two) over (x minus one) with excluded values one and three because x equals three cancelled yet still leaves a hole.
Where simplifying rational expressions helps
Classrooms and tutoring platforms use a simplify rational expression calculator so learners can check cancelled factors and excluded values for arbitrary coefficient lists without losing a common linear factor by hand. Exam-prep generators need a deterministic oracle that still lists cancelled zeros of the original denominator instead of silently pretending the simplified denominator alone defines the domain. Engineering and science notebooks that reduce transfer functions or rational models can cancel one proper or improper fraction of polynomials without importing a full computer-algebra system for a two-array reduce.
Failed validation does not consume balance.
What you can do with it
Classroom and homework checks
Students submit numerator and denominator coefficient arrays and verify the reduced fraction string plus excluded values against textbook methods.
Exam and LMS auto-grading
Mark simplify-and-state-domain items with a deterministic oracle that still excludes cancelled denominator roots and never invents extra factors.
Notebooks and rational pipelines
Reduce a single polynomial fraction in scripts—transfer functions, filters, algebraic models—without a full computer-algebra library.
FAQ
How do I simplify a rational expression with this calculator?
Send numerator and denominator as highest-degree-first coefficient arrays.
Why are cancelled factors still listed as excluded values?
Values that make the original denominator zero are outside the domain of the original expression even after cancellation.
What coefficient order do the arrays use?
Highest degree first: [1, -3, 2] means x² − 3x + 2, and [1, -1] means x − 1. Empty arrays and the zero polynomial as a denominator are rejected.
What happens if the denominator is the zero polynomial?
A rational expression requires a non-zero denominator polynomial; denominator must have at least one non-zero coefficient.
Can I choose how many decimal places the result shows?
Yes. You can set from 0 to 15 decimal places for the coefficients and the excluded values; if you leave it unchanged, results are rounded to 10 decimal places.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/rational-expression-simplify \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"numerator":[1,0,-1],"denominator":[1,-1]}'const res = await fetch("https://api.kit.forhosting.com/algebra/rational-expression-simplify", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"numerator": [
1,
0,
-1
],
"denominator": [
1,
-1
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/rational-expression-simplify",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"numerator": [
1,
0,
-1
],
"denominator": [
1,
-1
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/rational-expression-simplify", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"numerator":[1,0,-1],"denominator":[1,-1]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"numerator":[1,0,-1],"denominator":[1,-1]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/rational-expression-simplify", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"numerator": [
1,
0,
-1
],
"denominator": [
1,
-1
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.rational_expression_simplify",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What simplifying a rational expression means and why domain holes matter
This calculator therefore reports excluded_values from the original denominator roots, not only from the reduced denominator. Zero denominators are rejected up front as invalid_input because a rational expression is undefined when its denominator is the zero polynomial. Classic textbook examples such as (x squared minus one) over (x minus one) simplify to x plus one with x equals one still excluded, which this endpoint encodes without requiring the client to re-factor by hand.
Input contract, response shape, and error behaviour
POST a JSON body with two required coefficient arrays in highest-degree-first order: numerator and denominator. Each coefficient may be a JSON number or a numeric string; missing fields, empty arrays, non-arrays, non-finite values, and degrees above thirty-two fail with invalid_input naming the field. On success the body echoes the two rounded inputs; original as the pretty fraction before cancel; simplified as the reduced fraction string; simplified_numerator and simplified_denominator coefficient arrays; simplified_numerator_poly and simplified_denominator_poly strings; cancelled_factor and cancelled_poly for the monic GCD that was divided out; cancelled true when a non-constant factor was removed; gcd_steps counting Euclidean iterations; excluded_values sorted, excluded_count, and excluded_note explaining domain holes; degree_numerator and degree_denominator; precision; method; and a short formula field. Pair the coefficients with your own factoring display if you need step-by-step binomial cards; this endpoint returns the exact reduced form and domain exclusions without multi-line prose proofs.
Where a simplify-rational-expression API earns its keep
Keep requests within the degree and magnitude limits, pin the rounded simplified arrays and excluded_values in tests, and you get reproducible reduced fractions for homework, LMS plugins, and edge workers. When your curriculum later asks for multiplication of two rational expressions, use the dedicated multiply endpoint that multiplies then cancels; addition and subtraction require a common denominator and are out of scope for this single-expression simplify tool.
Technical questions
What does the simplify rational expression calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.