Polynomial Long Division Calculator

Divide any polynomial by another and see every long-division step, the quotient and remainder, and a check that multiplies the answer back out.

Type it like 3x^3 − 2x + 1. Use ^ for powers; fractions such as x/2 or (1/3)x are fine.
Quotient Q(x)
x2 − 4x + 5
Remainder R(x)
−7x
Divides evenly?
No
Quotient and remainderx2 − 4x + 5 − 7xx2 + x − 1
  • Dividend = Divisor × Quotient + Remainder, with the remainder of lower degree than the divisor.

Show the work

  1. Write both polynomials in descending powers. Missing powers in the dividend get a 0 coefficient as a placeholder: x4 − 3x3 + 2x − 5.
  2. Step 1. Divide the leading terms: x4 ÷ x2 = x2.
    Multiply: x2 × (x2 + x − 1) = x4 + x3 − x2.
    Subtract: (x4 − 3x3 + 2x − 5) − (x4 + x3 − x2) = −4x3 + x2 + 2x − 5.
  3. Step 2. Divide the leading terms: −4x3 ÷ x2 = −4x.
    Multiply: −4x × (x2 + x − 1) = −4x3 − 4x2 + 4x.
    Subtract: (−4x3 + x2 + 2x − 5) − (−4x3 − 4x2 + 4x) = 5x2 − 2x − 5.
  4. Step 3. Divide the leading terms: 5x2 ÷ x2 = 5.
    Multiply: 5 × (x2 + x − 1) = 5x2 + 5x − 5.
    Subtract: (5x2 − 2x − 5) − (5x2 + 5x − 5) = −7x.
  5. The remainder −7x has degree 1, which is less than 2, so the division stops.
  6. Check: (x2 + x − 1) × (x2 − 4x + 5) − 7x = x4 − 3x3 + 2x − 5 ✓

Long division layout

x2− 4x+ 5
x2 + x − 1x4− 3x3+ 0x2+ 2x− 5
−x4+ x3− x2
−4x3+ x2+ 2x− 5
−−4x3− 4x2+ 4x
5x2− 2x− 5
−5x2+ 5x− 5
−7x

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

  1. Type the dividend, the polynomial being divided, for example x^4 - 3x^3 + 2x - 5. Use ^ for powers.
  2. Type the divisor, for example x^2 + x - 1.
  3. 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

P(x) = D(x) · Q(x) + R(x), with deg R < deg D

Dividing both sides by D gives the familiar form P/D = Q + R/D. Each cycle of the algorithm removes the current leading term:

  1. Divide the leading term of what remains by the leading term of the divisor.
  2. Multiply the whole divisor by that result.
  3. 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.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.