Polynomial long division works just like the long division you learned for whole numbers: divide the leading terms, multiply, subtract, and repeat. This calculator carries out the whole process with exact coefficients, draws the classic division layout, and writes the answer in the form quotient + remainder ÷ divisor.
How to use the polynomial long division calculator
- Type the dividend, the polynomial being divided, for example
x^4 - 3x^3 + 2x - 5. Use^for powers. - Type the divisor, for example
x^2 + x - 1. - Read the quotient and remainder on the tape. The steps narrate each divide–multiply–subtract cycle, and the layout below shows the same work in columns, one per power of x.
Products such as (x + 1)^2 and fractions such as x/2 are expanded and simplified before dividing.
The division algorithm
For polynomials P(x) and D(x) with D ≠ 0, there is exactly one pair Q and R such that
Dividing both sides by D gives the familiar form P/D = Q + R/D. Each cycle of the algorithm removes the current leading term:
- Divide the leading term of what remains by the leading term of the divisor.
- Multiply the whole divisor by that result.
- Subtract, and repeat with the new remainder.
Worked example
Divide x4 − 3x3 + 2x − 5 by x2 + x − 1. Note the missing x2 term — it becomes 0x2.
Step 1. x4 ÷ x2 = x2. Multiply: x4 + x3 − x2. Subtract: −4x3 + x2 + 2x − 5.
Step 2. −4x3 ÷ x2 = −4x. Multiply: −4x3 − 4x2 + 4x. Subtract: 5x2 − 2x − 5.
Step 3. 5x2 ÷ x2 = 5. Multiply: 5x2 + 5x − 5. Subtract: −7x.
Result: quotient x2 − 4x + 5, remainder −7x.
Check: (x2 + x − 1)(x2 − 4x + 5) = x4 − 3x3 + 9x − 5, and adding −7x gives back x4 − 3x3 + 2x − 5. ✓
Where polynomial division is used
Factoring and finding roots
If you know one root r of a polynomial, dividing by (x − r) leaves a polynomial of one lower degree. For a cubic that leaves a quadratic, which the quadratic formula calculator can finish. For example, 2x3 + 3x2 − 11x − 6 divided by x − 2 gives 2x2 + 7x + 3 with remainder 0.
Simplifying rational functions
An improper rational function, where the numerator’s degree is at least the denominator’s, can be rewritten as a polynomial plus a proper fraction. The polynomial part describes the graph far from the origin: a linear quotient means a slant asymptote.
Calculus
Integrating a rational function usually starts with long division, followed by partial fractions on the remainder term.
Common mistakes
- Skipping placeholder zeros, so terms of different degrees end up subtracted from each other.
- Subtracting only the first term. The whole product must be subtracted, so every sign in it changes.
- Stopping too early or too late. Stop exactly when the remainder’s degree drops below the divisor’s.
When the divisor is linear, the synthetic division calculator gives the same answer in fewer steps. For whole-number long division, see the long division calculator.
Frequently asked questions
When does polynomial long division stop?
As soon as the remainder has a lower degree than the divisor. Dividing by a quadratic, for instance, ends when the remainder is linear or constant.
Why do I need placeholder zeros?
Missing powers must still have a column, otherwise like terms end up under the wrong column during subtraction. The calculator inserts 0x² and similar terms automatically in the layout.
What does a remainder of zero tell me?
The divisor is a factor of the dividend, so the dividend equals divisor × quotient exactly. This is how you confirm a factor or break a cubic into a linear factor and a quadratic.
Should I use long division or synthetic division?
Synthetic division is a faster shortcut, but it works only for linear divisors such as x − 3 or 2x + 1. Long division works for any divisor, including quadratics and higher.
Can the coefficients be fractions?
Yes. Every step uses exact rational arithmetic, so dividing by 2x + 1 can produce quotient coefficients such as 0.25 or 7/3 without rounding.