Skip to content

Polynomial Long Division Calculator

x³ − 12x² − 42 is 1, -12, 0, -42. Write 0 for each missing power.

x − 3 is 1, -3. Commas or spaces both work.

Quotient —
Remainder
—
Degree of quotient
—
Divides exactly?
—
Dividend ÷ divisor
—

Polynomial long division repeats one cycle: divide the leading term of what is left by the divisor's leading term, multiply the divisor by that result, subtract, and continue until the remainder's degree is below the divisor's. For (x³ − 12x² − 42) ÷ (x − 3) the quotient is x² − 9x − 27 and the remainder is −123.

About this tool

Algebra students checking homework, tutors preparing worked solutions and anyone factoring a cubic by hand meet the same tedious bookkeeping: lining up powers, remembering the placeholder zeros and keeping signs straight through each subtraction. Type the coefficients of the dividend and the divisor, highest power first, and the tool returns the quotient, the remainder, the degree of the quotient and the combined form quotient + remainder/divisor. A table lists every round, showing the new quotient term, the product that gets subtracted and what remains. Coefficients may be integers or decimals; results are shown to six decimal places at most, so fractional coefficients such as 1/3 appear as 0.333333 rather than as exact fractions. The variable is always written as x.

How to use it

  1. Enter the dividend

    List its coefficients from the highest power down, separated by commas or spaces, writing 0 for any power that is absent.

  2. Enter the divisor

    Do the same for the polynomial you are dividing by; x − 3 is 1, -3 and x² + 1 is 1, 0, 1.

  3. Read the quotient and remainder

    The headline is the quotient; the remainder, its degree check and the combined fraction form sit below it.

  4. Follow the table

    Each row is one divide-multiply-subtract round, so you can compare it line by line with your written work.

Examples

(x³ − 12x² − 42) ÷ (x − 3)

Dividend coefficients (highest power first)
1, -12, 0, -42
Divisor coefficients (highest power first)
1, -3

Result Quotient: x^2 – 9x – 27
Remainder: -123
Degree of quotient: 2
Divides exactly?: No
Dividend ÷ divisor: x^2 – 9x – 27 + (-123)/(x – 3)

  1. Dividend: x^3 – 12x^2 – 42; divisor: x – 3
  2. Step 1: leading term ÷ x = x^2; subtract x^2 × (x – 3) = x^3 – 3x^2; left: -9x^2 – 42
  3. Step 2: leading term ÷ x = -9x; subtract -9x × (x – 3) = -9x^2 + 27x; left: -27x – 42
  4. Step 3: leading term ÷ x = -27; subtract -27 × (x – 3) = -27x + 81; left: -123
  5. Result: x^3 – 12x^2 – 42 = (x – 3)(x^2 – 9x – 27) + (-123)

The missing x term is entered as 0. Three rounds of divide, multiply and subtract leave −123, so x − 3 is not a factor.

(x² − 1) ÷ (x − 1)

Dividend coefficients (highest power first)
1 0 -1
Divisor coefficients (highest power first)
1 -1

Result Quotient: x + 1
Remainder: 0
Degree of quotient: 1
Divides exactly?: Yes, remainder is 0
Dividend ÷ divisor: x + 1

  1. Dividend: x^2 – 1; divisor: x – 1
  2. Step 1: leading term ÷ x = x; subtract x × (x – 1) = x^2 – x; left: x – 1
  3. Step 2: leading term ÷ x = 1; subtract 1 × (x – 1) = x – 1; left: 0
  4. Result: x^2 – 1 = (x – 1)(x + 1)

A zero remainder confirms x − 1 is a factor, matching the difference-of-squares identity.

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

Dividend coefficients (highest power first)
2, 3, -1, 5
Divisor coefficients (highest power first)
1, 0, 1

Result Quotient: 2x + 3
Remainder: -3x + 2
Degree of quotient: 1
Divides exactly?: No
Dividend ÷ divisor: 2x + 3 + (-3x + 2)/(x^2 + 1)

  1. Dividend: 2x^3 + 3x^2 – x + 5; divisor: x^2 + 1
  2. Step 1: leading term ÷ x^2 = 2x; subtract 2x × (x^2 + 1) = 2x^3 + 2x; left: 3x^2 – 3x + 5
  3. Step 2: leading term ÷ x^2 = 3; subtract 3 × (x^2 + 1) = 3x^2 + 3; left: -3x + 2
  4. Result: 2x^3 + 3x^2 – x + 5 = (x^2 + 1)(2x + 3) + (-3x + 2)

Multiplying back, (x² + 1)(2x + 3) = 2x³ + 3x² + 2x + 3, which leaves −3x + 2 of degree below 2.

How it is calculated

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

N(x)
the dividend
D(x)
the divisor, not the zero polynomial
Q(x)
the quotient, of degree deg N − deg D
R(x)
the remainder

The division algorithm for polynomials guarantees a unique Q and R. Each round takes the current leading coefficient, divides it by the divisor's leading coefficient to get the next quotient term, multiplies the whole divisor by that term and subtracts it, which removes the top power. After deg N − deg D + 1 rounds the leftover has a lower degree than the divisor and is the remainder. When the divisor is x − c, the remainder equals N(c), the remainder theorem.

When not to use it

  • To find only the remainder when dividing by a linear factor, evaluating the dividend at its root is quicker.
  • Exact fractions are shown as decimals here, so a computer algebra system suits symbolic work.
  • Polynomials in two or more variables are not supported.

Common mistakes

  • Skipping a missing power is the usual slip: x cubed minus 42 needs zeros for the two absent terms.
  • Listing coefficients from the constant upwards reverses the polynomial.
  • In written work, people often flip the sign of only the first term when subtracting.

Frequently asked questions

Why do I have to type zeros for missing terms?

The tool reads position as power. In 1, -12, 0, -42 the four numbers belong to x³, x², x and the constant. Dropping the zero would shift every coefficient down one power and divide a different polynomial altogether.

How can I tell whether the divisor is a factor?

Look at the remainder. If it is 0, the divisor divides the dividend exactly and the dividend equals divisor times quotient, so the divisor is a factor. Any non-zero remainder means it is not. For example, x − 1 divides x² − 1 exactly, giving x + 1.

What happens if the dividend has a lower degree than the divisor?

No division round can run, so the quotient is 0 and the whole dividend is the remainder. A note under the result points this out, because it often means the two polynomials were entered in the wrong boxes.

Is this the same as synthetic division?

Synthetic division is a shortcut that works only when the divisor is linear and monic, x − c. It gives the same quotient and remainder as long division in that case. Long division, as done here, also handles divisors such as 2x + 1 or x² + 1.

Can the coefficients be decimals or negative?

Yes. Any real coefficient up to one billion in size is accepted, with a minus sign for negatives. If the divisor's leading coefficient is not 1, the quotient usually has fractional coefficients, shown as decimals to at most six places.

How does the remainder theorem relate to this?

When dividing by x − c, the remainder equals the dividend evaluated at c. In the example, x³ − 12x² − 42 at x = 3 is 27 − 108 − 42 = −123, the same remainder that long division by x − 3 produces.