Polynomial Long Division Calculator
Divide one polynomial by another step by step. Enter the coefficients of the dividend and the divisor (highest power first, including zeros) and get the quotient, the remainder and every division step.
Divide a Polynomial by Another Polynomial
Polynomial Long Division Formula
Where:
- \(P(x)\) — the dividend, the polynomial being divided
- \(D(x)\) — the divisor, which must not be the zero polynomial
- \(Q(x)\) — the quotient
- \(R(x)\) — the remainder, with \(\deg R < \deg D\)
Long division finds the unique quotient and remainder satisfying this identity, in the same way integer division gives \(a = b \cdot q + r\) with \(0 \le r < b\). If \(R(x) = 0\), the divisor divides the dividend exactly and the roots of \(D(x)\) are also roots of \(P(x)\).
Polynomial Long Division – Calculation Example
Example: divide \(P(x) = x^3 - 7x + 6\) by \(D(x) = x - 2\).
The missing \(x^2\) term is written as \(0x^2\), so the dividend coefficients are 1; 0; −7; 6 and the divisor coefficients are 1; −2. Step by step:
\[x^3 \div x = x^2, \quad (x-2)\,x^2 = x^3 - 2x^2, \quad (x^3 - 7x + 6) - (x^3 - 2x^2) = 2x^2 - 7x + 6\]
\[2x^2 \div x = 2x, \quad (x-2)\,2x = 2x^2 - 4x, \quad (2x^2 - 7x + 6) - (2x^2 - 4x) = -3x + 6\]
\[-3x \div x = -3, \quad (x-2)(-3) = -3x + 6, \quad (-3x + 6) - (-3x + 6) = 0\]
Result: \(Q(x) = x^2 + 2x - 3\) and \(R(x) = 0\). The check \((x-2)(x^2+2x-3) = x^3 - 7x + 6\) confirms the division is exact, so \(x = 2\) is a root of \(P(x)\).
How to use the calculator
- Type the Dividend coefficients (highest power first) into the first field. Include a 0 for every missing power: \(x^3 - 7x + 6\) becomes
1; 0; -7; 6. - Type the Divisor coefficients (highest power first) into the second field. For \(x - 2\) enter
1; -2; the leading coefficient must not be zero. - Separate numbers with spaces, commas or semicolons — the calculator accepts all three.
- Pick the Variable (x, t, n or y) used to display the polynomials.
- Read the results: the Quotient, the Remainder, a line-by-line breakdown of the Division steps, and the verification D(x) · Q(x) + R(x), which must reproduce the dividend.
What is polynomial long division?
Polynomial long division is the algebraic analogue of ordinary long division with numbers. Given a dividend \(P(x)\) and a divisor \(D(x)\), it produces a quotient \(Q(x)\) and a remainder \(R(x)\) such that \(P(x) = D(x)\,Q(x) + R(x)\), with the remainder of strictly lower degree than the divisor. This quotient–remainder pair is unique, which is why the check \(D(x)\,Q(x) + R(x)\) always rebuilds the original dividend.
The algorithm repeats one simple cycle: divide the current leading term by the leading term of the divisor, multiply the entire divisor by that result, and subtract. Each cycle cancels the highest remaining power of the dividend, lowering the working remainder one degree at a time until its degree falls below the degree of the divisor. At that point the division stops and whatever is left is the remainder.
Interpreting the result depends on the remainder. A zero remainder means \(D(x)\) is a factor of \(P(x)\) — this is the idea behind the factor and root tests and synthetic division. A nonzero remainder is still informative: by the Remainder Theorem, dividing by \(x - c\) leaves exactly \(P(c)\), so the remainder is the value of the polynomial at \(c\).
Polynomial division shows up wherever polynomials need simplifying: partial-fraction decomposition in integration, finding asymptotes of rational functions, and reducing one polynomial modulo another. It is also a practical way to factor higher-degree polynomials once one root is known or guessed.
Tips, assumptions and limitations
- Always pad with zeros. \(x^3 - 7x + 6\) must be entered as
1; 0; -7; 6, not1; -7; 6. Missing zeros shift every coefficient to the wrong power and produce a wrong answer. - The divisor must be nonzero. The leading coefficient cannot be zero; the calculator strips leading zeros automatically, but a divisor of all zeros is rejected.
- Lower-degree divisors return the dividend. If \(\deg D > \deg P\), the quotient is 0 and the remainder equals the dividend — that is the correct result, not an error.
- Coefficients can be any real numbers, including fractions and decimals (e.g.
0.5; -3; 2). Results are rounded to 4 decimal places for display, so very long decimals may look slightly shortened. - Dividing by a monomial such as \(x^2\) works too — enter
1; 0as the divisor; each term of the dividend is simply reduced in degree. - To verify the multiplication in the check line by hand, the multiplying binomials and FOIL method calculators cover the most common cases, and the basic division calculator handles plain numeric division.
Frequently Asked Questions
How is synthetic division different from polynomial long division?
Synthetic division is a shortcut for the special case where the divisor is linear, i.e. \(D(x) = x - c\). You write only the coefficients of the dividend and work with the single number \(c\), which is faster and less error-prone on paper. Long division is more general: it works for any divisor, including \(x^2 + 1\) or \(3x - 2\). Both methods give the same quotient and remainder, so you can use this calculator to verify a synthetic-division result.
Can I divide by a divisor whose leading coefficient is not 1?
Yes. The algorithm does not require a monic divisor. At each step you divide the current leading coefficient by the divisor's leading coefficient, so fractions may appear in the quotient. For example, dividing \(x^2 + 1\) by \(2x\) gives \(Q(x) = 0.5x\) and \(R(x) = 1\). Enter the divisor exactly as written, e.g. 2; -5 for \(2x - 5\), and the calculator handles the fractional coefficients.
What does a nonzero remainder mean for the roots?
If you divide by \(x - c\) and the remainder is not zero, then \(c\) is not a root of \(P(x)\). By the Remainder Theorem the remainder equals exactly \(P(c)\), the value of the polynomial at \(c\). So a remainder of, say, 5 when dividing by \(x - 3\) means \(P(3) = 5\). A zero remainder is the reverse: it proves \(x - c\) is a factor and \(c\) is a root.
How do I check my polynomial division by hand?
Multiply the quotient by the divisor and add the remainder: the result must reproduce the dividend exactly. If \(P(x) = 2x^3 - 3x^2 + 1\), \(D(x) = x - 1\), \(Q(x) = 2x^2 - x - 1\) and \(R(x) = 2\), compute \((x-1)(2x^2 - x - 1) + 2\) and confirm it simplifies back to \(2x^3 - 3x^2 + 1\). Any mismatch means an arithmetic slip, usually a sign error in the subtraction step.
Why do I get a different answer when I skip the zero coefficients?
Because the coefficients must stay aligned to the correct powers. Entering 1; -7; 6 for \(x^3 - 7x + 6\) makes the calculator read \(x^2 - 7x + 6\), a completely different polynomial. The missing \(x^2\) term must be written as an explicit 0, giving 1; 0; -7; 6. The same rule applies to interior and trailing gaps in the divisor. This is the single most common source of wrong hand calculations too.
Can I use this to find asymptotes of a rational function?
Yes. Dividing the numerator by the denominator of a rational function rewrites it as polynomial plus a proper fraction. When the degrees are equal, the constant quotient gives the horizontal asymptote. When the numerator's degree is exactly one higher, the linear quotient is the slant (oblique) asymptote. For example, \((x^2+1)/(x-1) = x+1+2/(x-1)\), so \(y = x+1\) is the slant asymptote.
What happens if the dividend and divisor have the same degree?
The division stops after one step: the quotient is a constant equal to the ratio of the leading coefficients, and the remainder is whatever is left. For example, \((x^2 + 3x) \div (x^2 - 1)\) gives \(Q(x) = 1\) and \(R(x) = 3x + 1\), since \(x^2 + 3x = 1\cdot(x^2-1) + 3x + 1\). The remainder's degree (1) is properly below the divisor's degree (2), so the result is valid.