Long Division of Polynomials

Long division for polynomials works exactly like long division for integers: divide the leading terms, multiply, subtract, and repeat. This systematic process produces the quotient and remainder for any two polynomials, no matter their degree.

Quick Reference

Concept Notation Meaning
Dividend $f(x)$ The polynomial being divided
Divisor $d(x)$ The polynomial dividing into $f$
Quotient $q(x)$ Result of the division
Remainder $r(x)$ What is left over; $\deg(r) < \deg(d)$
Division Algorithm $f(x) = d(x)q(x) + r(x)$ Dividend equals divisor times quotient plus remainder

The Division Algorithm

Division Algorithm. For any polynomials $f(x)$ and $d(x)$ with $d(x) \neq 0$, there exist unique polynomials $q(x)$ and $r(x)$ such that

$f(x) = d(x)\,q(x) + r(x)$

where either $r(x) = 0$ or $\deg(r) < \deg(d)$.

Here $f$ is the dividend, $d$ is the divisor, $q$ is the quotient, and $r$ is the remainder.

The long division algorithm described in this section is the standard procedure for constructing $q$ and $r$ explicitly.

Two things to check before you begin:

  • Descending order. Write both the dividend and divisor with terms arranged from highest degree to lowest. Rearrange if necessary.
  • Missing terms. If any degree is absent from the dividend, insert a placeholder with coefficient $0$ (for example, $0x^2$) so every column lines up correctly during subtraction.

Step-by-Step Algorithm

The color coding in the examples below follows this convention: red marks the leading term being divided and the new quotient term produced; blue marks the product that is subtracted.

  1. Set up. Write the divisor to the left of the long-division bracket and the dividend inside it. Check that both are in descending order and that all degrees are represented.
  2. Divide leading terms. Divide the leading term of the current dividend by the leading term of the divisor. Write the result as the next term of the quotient above the bracket.
  3. Multiply. Multiply that quotient term by the entire divisor. Write the product below the current dividend, aligned by degree.
  4. Subtract. Subtract the product from the current dividend. Pay careful attention to signs.
  5. Repeat. The difference becomes the new dividend. Return to step 2 and continue until the degree of the remainder is strictly less than the degree of the divisor, or until the remainder is zero.
  6. Write the result. Express the answer as $f(x) = d(x)q(x) + r(x)$, or equivalently $\dfrac{f(x)}{d(x)} = q(x) + \dfrac{r(x)}{d(x)}$.

Worked Examples

Divide $f(x)=2x^4-x^3+3x^2-5x+1$ by $d(x)=x^2+2x-1$.



Solution


Step 1: Set up the long division.


$\begin{array}{ll} x^2+2x-1 & \overline{)\ 2x^4-x^3+3x^2-5x+1} \end{array}$

Step 2: Divide the leading term of the dividend by the leading term of the divisor. We compute:

$\frac{2x^4}{x^2}=2x^2.$

This is the first term of the quotient.


$\begin{array}{ll} & \ \ \color{red}{2x^2}\\ \color{red}{x^2}+2x-1 & \overline{)\ \color{red}{2x^4}-x^3+3x^2-5x+1} \end{array}$

Step 3: Multiply the divisor by the term just found. Multiply:

$2x^2(x^2+2x-1)=2x^4+4x^3-2x^2.$

Place this product under the dividend:


$\begin{array}{ll} & \ \ \color{red}{2x^2}\\ \color{red}{x^2}+2x-1 & \overline{)\ \color{red}{2x^4}-x^3+3x^2-5x+1}\\ & \phantom{)}\ \color{blue}{2x^4+4x^3-2x^2} \end{array}$

Step 4: Subtract. Subtract the product from the dividend (take care with the signs):


$\begin{array}{ll} & \ \ \color{red}{2x^2}\\ \color{red}{x^2}+2x-1 & \overline{)\ \color{red}{2x^4}-x^3+3x^2-5x+1}\\ & \phantom{)}\ \underline{\ \color{blue}{2x^4+4x^3-2x^2}\phantom{-5x+1}}\\ & \phantom{)}\ \phantom{0x^4}-5x^3+5x^2-5x+1 \end{array}$

Step 5: Bring down the next term. The new (partial) dividend is:

$-5x^3+5x^2-5x+1.$

Step 6: Repeat the process. Divide the new leading term by the divisor's leading term:

$\frac{-5x^3}{x^2}=-5x.$

So the next term of the quotient is $-5x$, and the quotient so far is $2x^2-5x$.


$\begin{array}{ll} & \ \ 2x^2\color{red}{-5x}\\ \color{red}{x^2}+2x-1 & \overline{)\ 2x^4-x^3+3x^2-5x+1}\\ & \phantom{)}\ \underline{\ 2x^4+4x^3-2x^2\phantom{-5x+1}}\\ & \phantom{)}\ \phantom{0x^4}\color{red}{-5x^3}+5x^2-5x+1 \end{array}$

Multiply the divisor by $-5x$:

$-5x(x^2+2x-1)=-5x^3-10x^2+5x.$

Subtract this product from the current dividend:


$\begin{array}{ll} & \ \ 2x^2\color{red}{-5x}\\ \color{red}{x^2}+2x-1 & \overline{)\ 2x^4-x^3+3x^2-5x+1}\\ & \phantom{)}\ \underline{\ 2x^4+4x^3-2x^2\phantom{-5x+1}}\\ & \phantom{)}\ \phantom{0x^4}\color{red}{-5x^3}+5x^2-5x+1\\ & \phantom{)}\ \phantom{0x^4}\ \underline{\color{blue}{-5x^3-10x^2+5x}\phantom{+100}}\\ & \phantom{)}\ \phantom{0x^4-5x^3}+15x^2-10x+1 \end{array}$

Step 7: Continue. Divide the new leading term:

$\frac{15x^2}{x^2}=15.$

So, add $15$ to the quotient: $2x^2-5x+15$.



Multiply the divisor by $15$:

$15(x^2+2x-1)=15x^2+30x-15.$

Subtract:


$\begin{array}{ll} & \ \ 2x^2-5x\color{red}{+15}\\ \color{red}{x^2}+2x-1 & \overline{)\ 2x^4-x^3+3x^2-5x+1}\\ & \phantom{)}\ \underline{\ 2x^4+4x^3-2x^2\phantom{-5x+1}}\\ & \phantom{)}\ \phantom{0x^4}-5x^3+5x^2-5x+1\\ & \phantom{)}\ \phantom{0x^4}\ \underline{-5x^3-10x^2+5x\phantom{+100}}\\ & \phantom{)}\ \phantom{0x^4-5x^3}\color{red}{+15x^2}-10x+1\\ & \phantom{)}\ \phantom{0x^4-5x^3}\ \underline{\color{blue}{+15x^2+30x-15}}\\ & \phantom{)}\ \phantom{0x^4-5x^3+00x^2}-40x+16 \end{array}$

Step 8: Terminate the process. Since the degree of the remainder $-40x+16$ is $1$, which is less than the degree of the divisor $x^2+2x-1$ (degree $2$), the division is complete.



Step 9: Write the quotient and remainder.

$q(x)=2x^2-5x+15,\quad r(x)=-40x+16.$

Thus, by the Division Algorithm:

$\boxed{ \begin{aligned} 2x^4-x^3&+3x^2-5x+1\\ &=(x^2+2x-1)(2x^2-5x+15)+(-40x+16). \end{aligned} }$

Divide $f(x)=x^3-6x^2+11x-6$ by $d(x)=x-2$.

Solution
Step 1: Set up the long division.

$\begin{array}{ll} x-2 & \overline{)\ x^3-6x^2+11x-6} \end{array}$ Step 2: Divide the leading term of the dividend by the leading term of the divisor. We compute: $\frac{x^3}{x}=x^2.$ This is the first term of the quotient.

$\begin{array}{ll} & \ \ \color{red}{x^2}\\ \color{red}{x}-2 & \overline{)\ \color{red}{x^3}-6x^2+11x-6} \end{array}$ Step 3: Multiply the divisor by the term just found. Multiply: $x^2(x-2)=x^3-2x^2.$ Place this product under the dividend:

$\begin{array}{ll} & \ \ \color{red}{x^2}\\ \color{red}{x}-2 & \overline{)\ \color{red}{x^3}-6x^2+11x-6}\\ & \phantom{)}\ \color{blue}{x^3-2x^2} \end{array}$ Step 4: Subtract. Subtract the product from the dividend (take care with the signs):

$\begin{array}{ll} & \ \ \color{red}{x^2}\\ \color{red}{x}-2 & \overline{)\ \color{red}{x^3}-6x^2+11x-6}\\ & \phantom{)}\ \underline{\ \color{blue}{x^3-2x^2}\phantom{+11x-6}}\\ & \phantom{)}\ \phantom{x^3}-4x^2+11x-6 \end{array}$ Step 5: Bring down the next term. The new (partial) dividend is: $-4x^2+11x-6.$ Step 6: Repeat the process. Divide the new leading term by the divisor's leading term: $\frac{-4x^2}{x}=-4x.$ So the next term of the quotient is $-4x$, and the quotient so far is $x^2-4x$.

$\begin{array}{ll} & \ \ x^2\color{red}{-4x}\\ \color{red}{x}-2 & \overline{)\ x^3-6x^2+11x-6}\\ & \phantom{)}\ \underline{\ x^3-2x^2\phantom{+11x-6}}\\ & \phantom{)}\ \phantom{x^3}\color{red}{-4x^2}+11x-6 \end{array}$ Multiply the divisor by $-4x$: $-4x(x-2)=-4x^2+8x.$ Subtract this product from the current dividend:

$\begin{array}{ll} & \ \ x^2\color{red}{-4x}\\ \color{red}{x}-2 & \overline{)\ x^3-6x^2+11x-6}\\ & \phantom{)}\ \underline{\ x^3-2x^2\phantom{+11x-6}}\\ & \phantom{)}\ \phantom{x^3}\color{red}{-4x^2}+11x-6\\ & \phantom{)}\ \phantom{x^3}\ \underline{\color{blue}{-4x^2+8x}\phantom{-6}}\\ & \phantom{)}\ \phantom{x^3-4x^2}+3x-6 \end{array}$ Step 7: Continue. Divide the new leading term: $\frac{3x}{x}=3.$ So, add $3$ to the quotient: $x^2-4x+3$.

Multiply the divisor by $3$: $3(x-2)=3x-6.$ Subtract:

$\begin{array}{ll} & \ \ x^2-4x\color{red}{+3}\\ \color{red}{x}-2 & \overline{)\ x^3-6x^2+11x-6}\\ & \phantom{)}\ \underline{\ x^3-2x^2\phantom{+11x-6}}\\ & \phantom{)}\ \phantom{x^3}-4x^2+11x-6\\ & \phantom{)}\ \phantom{x^3}\ \underline{-4x^2+8x\phantom{-6}}\\ & \phantom{)}\ \phantom{x^3-4x^2}\color{red}{+3x}-6\\ & \phantom{)}\ \phantom{x^3-4x^2}\ \underline{\color{blue}{+3x-6}}\\ & \phantom{)}\ \phantom{x^3-4x^2+3x-}0 \end{array}$ Step 8: Terminate the process. The remainder is $0$, which has degree less than $\deg(x-2)=1$. The division is complete.

Step 9: Write the quotient and remainder. $q(x)=x^2-4x+3,\quad r(x)=0.$ Thus: $\boxed{x^3-6x^2+11x-6=(x-2)(x^2-4x+3).}$

Divide $f(x)=6x^3-4x+7$ by $d(x)=2x^2-x+1$.

Solution
The dividend is missing an $x^2$ term. Insert a $0x^2$ placeholder before beginning.

Step 1: Set up the long division.

$\begin{array}{ll} 2x^2-x+1 & \overline{)\ 6x^3+0x^2-4x+7} \end{array}$ Step 2: Divide the leading term of the dividend by the leading term of the divisor. We compute: $\frac{6x^3}{2x^2}=3x.$ This is the first term of the quotient.

$\begin{array}{ll} & \ \ \color{red}{3x}\\ \color{red}{2x^2}-x+1 & \overline{)\ \color{red}{6x^3}+0x^2-4x+7} \end{array}$ Step 3: Multiply the divisor by the term just found. Multiply: $3x(2x^2-x+1)=6x^3-3x^2+3x.$ Place this product under the dividend:

$\begin{array}{ll} & \ \ \color{red}{3x}\\ \color{red}{2x^2}-x+1 & \overline{)\ \color{red}{6x^3}+0x^2-4x+7}\\ & \phantom{)}\ \color{blue}{6x^3-3x^2+3x} \end{array}$ Step 4: Subtract. Subtract the product from the dividend (take care with the signs):

$\begin{array}{ll} & \ \ \color{red}{3x}\\ \color{red}{2x^2}-x+1 & \overline{)\ \color{red}{6x^3}+0x^2-4x+7}\\ & \phantom{)}\ \underline{\ \color{blue}{6x^3-3x^2+3x}\phantom{-4x+7}}\\ & \phantom{)}\ \phantom{6x^3}+3x^2-7x+7 \end{array}$ Step 5: Bring down the next term. The new (partial) dividend is: $3x^2-7x+7.$ Step 6: Repeat the process. Divide the new leading term by the divisor's leading term: $\frac{3x^2}{2x^2}=\frac{3}{2}.$ So the next term of the quotient is $\dfrac{3}{2}$, and the quotient so far is $3x+\dfrac{3}{2}$.

$\begin{array}{ll} & \ \ 3x\color{red}{+\tfrac{3}{2}}\\ \color{red}{2x^2}-x+1 & \overline{)\ 6x^3+0x^2-4x+7}\\ & \phantom{)}\ \underline{\ 6x^3-3x^2+3x\phantom{-4x+7}}\\ & \phantom{)}\ \phantom{6x^3}\color{red}{+3x^2}-7x+7 \end{array}$ Multiply the divisor by $\dfrac{3}{2}$: $\frac{3}{2}(2x^2-x+1)=3x^2-\frac{3}{2}x+\frac{3}{2}.$ Subtract this product from the current dividend:

$\begin{array}{ll} & \ \ 3x\color{red}{+\tfrac{3}{2}}\\ \color{red}{2x^2}-x+1 & \overline{)\ 6x^3+0x^2-4x+7}\\ & \phantom{)}\ \underline{\ 6x^3-3x^2+3x\phantom{-4x+7}}\\ & \phantom{)}\ \phantom{6x^3}\color{red}{+3x^2}-7x+7\\ & \phantom{)}\ \phantom{6x^3}\ \underline{\color{blue}{+3x^2-\tfrac{3}{2}x+\tfrac{3}{2}}}\\ & \phantom{)}\ \phantom{6x^3+3x^2}-\tfrac{11}{2}x+\tfrac{11}{2} \end{array}$ Step 7: Terminate the process. Since $\deg\!\left(-\tfrac{11}{2}x+\tfrac{11}{2}\right)=1<2=\deg(2x^2-x+1)$, the division is complete.

Step 8: Write the quotient and remainder. $q(x)=3x+\frac{3}{2},\quad r(x)=-\frac{11}{2}x+\frac{11}{2}.$ Thus, by the Division Algorithm: $\boxed{6x^3-4x+7=\!\left(2x^2-x+1\right)\!\left(3x+\tfrac{3}{2}\right)+\!\left(-\tfrac{11}{2}x+\tfrac{11}{2}\right).}$

Frequently Asked Questions

What is the Division Algorithm for polynomials? The Division Algorithm states that for any polynomials $f(x)$ and $d(x)$ with $d(x)\neq 0$, there exist unique polynomials $q(x)$ and $r(x)$ such that $f(x) = d(x)\,q(x) + r(x)$ where either $r(x) = 0$ or $\deg(r) < \deg(d)$. In other words, any polynomial can be expressed exactly as a divisor times a quotient plus a remainder, just as any integer can be expressed by the analogous integer division equation.

How do you perform polynomial long division? The process mirrors integer long division:
  1. Write both polynomials in descending order and insert $0$ placeholders for any missing degrees.
  2. Divide the leading term of the dividend by the leading term of the divisor to get the first quotient term.
  3. Multiply that term by the entire divisor and subtract from the current dividend.
  4. Repeat with the new (reduced) dividend until the remainder has smaller degree than the divisor.
  5. Write the result as $f = dq + r$.

When do you stop polynomial long division? You stop when the degree of the current remainder is strictly less than the degree of the divisor, or when the remainder is exactly $0$. At that point, no further division is possible because the leading term of the divisor can no longer divide evenly into the leading term of the remainder.

What happens when a term is missing from the dividend? If the dividend is missing a term of some degree (for example, there is no $x^2$ term in a cubic), you must insert a placeholder term with coefficient $0$ before starting. For instance, $6x^3 - 4x + 7$ becomes $6x^3 + 0x^2 - 4x + 7$. This keeps each column aligned correctly when you subtract during the division steps. Omitting the placeholder is one of the most common errors students make.

What is the difference between the quotient and the remainder? The quotient $q(x)$ is the result of the division, analogous to how $17 \div 5 = 3$ (quotient). The remainder $r(x)$ is what is left over after the division is complete, analogous to $17 = 5 \cdot 3 + 2$ (remainder $2$). The remainder must have degree strictly less than the divisor, or be zero. Together they satisfy $f = dq + r$.

How can you check that your answer is correct? Multiply the divisor $d(x)$ by your quotient $q(x)$, then add the remainder $r(x)$. The result should equal the original dividend $f(x)$ exactly. For example, in the first worked example above, you can verify: $(x^2+2x-1)(2x^2-5x+15) + (-40x+16) = 2x^4-x^3+3x^2-5x+1.$ Expanding and collecting terms will confirm the answer is correct.