Skip to content
MoneyDeck

Polynomial Long Division Calculator

Divide any two polynomials with every long-division step shown

Updated · Free, no signup

Degree up to 12. Products like (x - 1)(x + 2) are expanded.

Quotient Q(x)

2x^2 + 3x - 2

Remainder R(x)

-4x + 7

P(x) / D(x) =

2x^2 + 3x - 2 - (4x - 7)/(x^2 + 1)

Check: D(x)·Q(x) + R(x)

2x^4 + 3x^3 - x + 5

Does D(x) divide P(x) exactly?

No

Degree of quotient

2

Number of division steps

3

  • The remainder has degree 1, lower than the divisor's degree 2, so the division stops.

Long division steps

StepDivide leading termsMultiply backSubtract → new remainder
12x^4 ÷ x^2 = 2x^22x^4 + 2x^23x^3 - 2x^2 - x + 5
23x^3 ÷ x^2 = 3x3x^3 + 3x-2x^2 - 4x + 5
3-2x^2 ÷ x^2 = -2-2x^2 - 2-4x + 7

About the Polynomial Long Division Calculator

This polynomial long division calculator divides a dividend P(x) by a divisor D(x) of any degree up to 12 — linear, quadratic or higher — and shows the full working the way it is taught in algebra class. Type both polynomials in ordinary notation, such as 2x^4 + 3x^3 − x + 5 and x^2 + 1, and you get the quotient Q(x), the remainder R(x), the answer written as Q(x) + R(x)/D(x), and a step table showing each divide, multiply and subtract.

It is built for algebra 2, precalculus and calculus students: long division is how you simplify improper rational functions before integrating, find slant (oblique) asymptotes, and check whether one polynomial is a factor of another. Unlike synthetic division it works for any divisor, not just (x − c).

Arithmetic is exact, so non-integer quotients appear as fractions such as (1/2)x − 1/4 rather than rounded decimals. Missing powers are filled in with zeros automatically, and products like (x − 1)(x + 2) are expanded for you.

How to use the polynomial long division calculator

  1. 1Type the dividend, e.g. 2x^4 + 3x^3 - x + 5.
  2. 2Type the divisor, e.g. x^2 + 1 or 2x - 1.
  3. 3Read the quotient, remainder and combined answer Q + R/D.
  4. 4Follow the step table: divide leading terms, multiply back, subtract.
  5. 5Use the check line to confirm D·Q + R equals the original dividend.

Formula and method

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

Polynomial long division repeats one cycle until the remainder has lower degree than the divisor. Divide the leading term of the current remainder by the leading term of the divisor to get the next term of the quotient; multiply the whole divisor by that term; subtract the product from the current remainder. Each cycle removes the highest power, so the process finishes after at most deg P − deg D + 1 steps.

The result satisfies the division algorithm P = D·Q + R, which you can verify with the check output. Writing P/D = Q + R/D turns an improper rational function into a polynomial plus a proper fraction — the first step of partial fraction decomposition and of finding slant asymptotes.

P(x)
Dividend
D(x)
Divisor (not zero)
Q(x)
Quotient
R(x)
Remainder, degree less than D

Worked examples

(2x⁴ + 3x³ − x + 5) ÷ (x² + 1)

2x⁴ ÷ x² = 2x²; subtract 2x⁴ + 2x² to leave 3x³ − 2x² − x + 5. 3x³ ÷ x² = 3x; subtract 3x³ + 3x to leave −2x² − 4x + 5. −2x² ÷ x² = −2; subtract −2x² − 2 to leave −4x + 7, which has degree below 2, so the remainder is −4x + 7.

(x³ − 2x² − 4) ÷ (x − 3)

The missing x term is treated as 0x. The quotient is x² + x + 3 with remainder 5, which matches the remainder theorem: P(3) = 27 − 18 − 4 = 5.

(6x² + 5x − 4) ÷ (2x − 1) divides exactly

6x² ÷ 2x = 3x; subtracting 6x² − 3x leaves 8x − 4. 8x ÷ 2x = 4; subtracting 8x − 4 leaves 0. So 6x² + 5x − 4 = (2x − 1)(3x + 4).

Fractional quotient: (x² + 1) ÷ (2x + 1)

x² ÷ 2x = x/2, leaving −x/2 + 1. Then (−x/2) ÷ 2x = −1/4, leaving 1 + 1/4 = 5/4. The answer is x/2 − 1/4 + (5/4)/(2x + 1).

Frequently asked questions

How do you do polynomial long division?+

Divide the leading term of the dividend by the leading term of the divisor, write that term in the quotient, multiply it by the whole divisor, and subtract. Repeat with the new remainder until its degree is less than the divisor’s degree.

When should I use long division instead of synthetic division?+

Synthetic division only works for divisors of the form x − c (or ax − b after rescaling). For any quadratic or higher-degree divisor, such as x² + 1, you need polynomial long division.

What do I do with missing terms?+

Treat any missing power as having coefficient 0, e.g. write x³ − 4 as x³ + 0x² + 0x − 4 so the columns line up. This calculator inserts the zeros automatically.

How is long division used to find a slant asymptote?+

For a rational function whose numerator degree is exactly one more than the denominator’s, divide them: the linear quotient y = mx + b is the slant asymptote, because the remainder fraction tends to 0 as x grows.

How do I write the answer?+

Write it as quotient + remainder/divisor, for example x² + x + 3 + 5/(x − 3). If the remainder is 0, the divisor is a factor and the answer is just the quotient.

Related tools