Math
Polynomial Long Division Calculator
Divide one polynomial by another using long division. Enter coefficient arrays (highest power first), see the prettified quotient and remainder, the full step-by-step algorithm trace, and a check for exact division.
Polynomial long division
Dividend coefficients (highest power first)
Enter every coefficient including 0 for missing terms. Example: 1, -2, 0, 5 means x^3 - 2x^2 + 5.
Divisor coefficients (highest power first)
Example: 1, -1 means x - 1. The divisor cannot be the zero polynomial.
Quotient and remainder
(x^3 - 2x^2 + 5) / (x - 1)
x^2 - x - 1remainder 4
Quotient coefficients
1, -1, -1
Remainder coefficients
4
| Step | Current dividend | Multiply (x - 1) by | Result after subtraction |
|---|---|---|---|
| 1 | [1, -2, 0, 5] | x^2 | [0, -1, 0, 5] |
| 2 | [-1, 0, 5] | -x | [0, -1, 5] |
| 3 | [-1, 5] | -1 | [0, 4] |
Frequently Asked Questions about the Polynomial Long Division Calculator
How does polynomial long division actually work?
It mirrors the schoolbook long division you already know from whole numbers, just with polynomials instead of digits. Line the dividend and divisor up in decreasing powers of x. Divide the leading term of the current dividend by the leading term of the divisor to get one term of the quotient. Multiply the entire divisor by that quotient term, subtract the product from the current dividend, and repeat with the new (lower-degree) dividend. Stop when the remaining dividend has a degree strictly less than the divisor; what is left is the remainder.
Why does this calculator take coefficient arrays instead of a polynomial expression?
Coefficient arrays sidestep the entire parsing problem. There is no need to teach the calculator about implicit multiplication, exponent notation, whitespace, or shorthand like 2x. You hand it the numbers in the right order and it does the math. The trade-off is that you have to include a 0 for every missing power. To represent x^3 + 5, type 1, 0, 0, 5, not 1, 5, otherwise the calculator will read it as x + 5 and the answer will be wrong.
When should I use synthetic division instead?
Synthetic division is a shortcut that only works when the divisor is linear and of the form (x - c), with a leading coefficient of 1. For those cases it skips most of the bookkeeping and runs in a single row of multiply-and-add steps. For any other divisor (higher degree, or a leading coefficient that is not 1), use long division. This calculator is the long-division version and works for divisors of any degree, with any leading coefficient, as long as it is not the zero polynomial.
What is the polynomial division theorem?
For any polynomials P(x) (the dividend) and D(x) (a non-zero divisor), there are unique polynomials Q(x) (the quotient) and R(x) (the remainder) such that P(x) = D(x) x Q(x) + R(x), with the degree of R strictly less than the degree of D. Long division is the constructive algorithm that produces Q and R. The result here always satisfies this identity, which is also how you can verify any division by hand: multiply divisor by quotient, add the remainder, and you should land back on the dividend.
Why must the remainder have a lower degree than the divisor?
If the remainder still had a degree as high as the divisor, you could divide once more and push another term into the quotient. The algorithm only stops when no more terms can be extracted, which happens exactly when the leading degree of what is left drops below the divisor's degree. That degree gap is also what makes the quotient and remainder unique: any other split that satisfies P = D x Q + R but lets R reach the divisor's degree is not in lowest form.