Skip to content

Polynomial Calculator: Long Division, Multiplication and Roots

Add, multiply and divide polynomials (long and synthetic division), evaluate them and find rational roots, with steps.

Your details

e.g. 3x^3 - 2x + 5, (x-1)(x+2)^2, or coefficients from the highest degree: 3, 0, -2, 5

Results update as you type

Quotient

x² + x + 3

Remainder
5
Division identity
x³ − 2x² − 4 = (x − 3)(x² + x + 3) + (5)
Degree
2

Step-by-step solution
  1. Divide the leading terms: x³ ÷ x = x²
  2. Multiply the divisor by it: x³ − 3x², then subtract → x² − 4
  3. Divide the leading terms: x² ÷ x = x
  4. Multiply the divisor by it: x² − 3x, then subtract → 3x − 4
  5. Divide the leading terms: 3x ÷ x = 3
  6. Multiply the divisor by it: 3x − 9, then subtract → 5
  7. The remainder 5 has degree lower than 1, so the division stops.
  8. Check: x³ − 2x² − 4 = (x − 3)(x² + x + 3) + (5)

A polynomial in one variable is a sum of terms akxka_k x^k with whole-number exponents, such as 3x3−2x+53x^3 - 2x + 5. This polynomial calculator handles the operations that fill algebra homework: long division (quotient and remainder), synthetic division by (x−r)(x - r), multiplication, addition and subtraction, evaluation at a given xx, and a search for rational roots with the factored form.

Every result is computed exactly with fractions, never with rounded decimals, so a remainder that should be zero really is zero. It is a polynomial calculator with steps: the long division is written out term by term, synthetic division is laid out as the usual three-row table, and the root search lists the candidates from the rational root theorem before testing them.

Type polynomials the way you would write them on paper (3x^3 - 2x + 5, (x-1)(x+2)^2, x^2/2 + 1) or as a plain list of coefficients from the highest degree, 3, 0, -2, 5. Superscripts such as x² are accepted too, so you can paste expressions straight from a worksheet.

How to use this calculator

  1. Choose the operation: long division, synthetic division, multiplication, addition, subtraction, evaluation or rational roots.
  2. Enter P(x)P(x) and, for the two-polynomial operations, Q(x)Q(x). A missing power simply has coefficient 0; in a coefficient list you must write that 0.
  3. For synthetic division, enter the number rr of the divisor (x−r)(x - r): dividing by x+2x + 2 means r=−2r = -2. For evaluation, enter the value of xx.
  4. Read the main result (quotient, product, value or roots), then the remainder and the division identity.
  5. Open the steps to copy the full working into your notebook.

The formula

Division algorithm. For polynomials PP and Q≠0Q \neq 0 there is exactly one quotient SS and remainder RR with

P(x)=Q(x) S(x)+R(x),deg⁡R<deg⁡QP(x) = Q(x)\,S(x) + R(x), \qquad \deg R < \deg Q

Long division builds SS one term at a time: divide the leading term of the current remainder by the leading term of QQ, multiply QQ by that term, subtract, and repeat until the degree drops below deg⁡Q\deg Q.

Synthetic division is the same algorithm for a divisor x−rx - r, keeping only the coefficients. With P=anxn+⋯+a0P = a_n x^n + \dots + a_0: bn=anb_n = a_n, then bk=ak+r bk+1b_k = a_k + r\,b_{k+1}. The last value b0b_0 is the remainder, and by the remainder theorem it equals P(r)P(r), which is also how the calculator evaluates polynomials (Horner's method).

Multiplication distributes every term: (∑aixi)(∑bjxj)=∑k(∑i+j=kaibj)xk\left(\sum a_i x^i\right)\left(\sum b_j x^j\right) = \sum_k \left(\sum_{i+j=k} a_i b_j\right) x^k.

Rational root theorem. If PP has integer coefficients and p/qp/q (in lowest terms) is a root, then pp divides a0a_0 and qq divides ana_n. Testing this finite list finds every rational root.

Worked example

Long division. Divide x3−2x2−4x^3 - 2x^2 - 4 by x−3x - 3 (note the missing xx term). x3÷x=x2x^3 \div x = x^2; subtract x2(x−3)=x3−3x2x^2(x - 3) = x^3 - 3x^2 to get x2−4x^2 - 4. Then x2÷x=xx^2 \div x = x; subtract x2−3xx^2 - 3x to get 3x−43x - 4. Finally 3x÷x=33x \div x = 3; subtract 3x−93x - 9 to get 55. So

x3−2x2−4=(x−3)(x2+x+3)+5x^3 - 2x^2 - 4 = (x - 3)(x^2 + x + 3) + 5

The remainder theorem confirms it: P(3)=27−18−4=5P(3) = 27 - 18 - 4 = 5.

Multiplying polynomials. (2x+3)(x2−x+4)=2x3−2x2+8x+3x2−3x+12=2x3+x2+5x+12(2x + 3)(x^2 - x + 4) = 2x^3 - 2x^2 + 8x + 3x^2 - 3x + 12 = 2x^3 + x^2 + 5x + 12.

Synthetic division. Divide 2x3−3x2−11x+62x^3 - 3x^2 - 11x + 6 by x−3x - 3. Bring down 2; 2×3=62 \times 3 = 6, −3+6=3-3 + 6 = 3; 3×3=93 \times 3 = 9, −11+9=−2-11 + 9 = -2; −2×3=−6-2 \times 3 = -6, 6−6=06 - 6 = 0. The quotient is 2x2+3x−22x^2 + 3x - 2 and the remainder is 0, so x=3x = 3 is a root.

Polynomial long division vs synthetic division

Both give the same quotient and remainder. Long division works for any divisor, such as x2+1x^2 + 1 or 2x−12x - 1, and is what you want when dividing polynomials by long division must be shown line by line. Synthetic division is a shortcut that only applies to linear divisors x−rx - r, but it is much faster by hand and doubles as a way to evaluate P(r)P(r).

To divide by 2x−12x - 1 synthetically, divide by x−12x - \tfrac{1}{2} instead and then divide the quotient by 2; the remainder is unchanged. Or simply pick long division here, which handles non-monic divisors directly.

Finding and using rational roots

When synthetic division by x−rx - r leaves remainder 0, rr is a root and the quotient is a polynomial of lower degree: the key step in factoring. The rational roots mode automates this. It lists the candidates ±p/q\pm p/q, keeps those with P(p/q)=0P(p/q) = 0, divides them out (repeated roots are found with their multiplicity) and solves a remaining quadratic exactly with square roots. For a cubic with no rational root, use the cubic equation calculator; for a single quadratic, the quadratic formula calculator.

Frequently asked questions

How do I divide polynomials with long division?

Write both in descending powers, with 0 for any missing term. Divide the leading term of the dividend by the leading term of the divisor, multiply the divisor by the result, subtract, and bring down the next term. Repeat until the remainder has a lower degree than the divisor.

When can I use synthetic division?

Only when the divisor is linear and monic, x − r. For x + 5 use r = −5. For a divisor like 3x − 2, use r = 2/3 and divide the quotient by 3, or use long division instead.

How does the calculator multiply polynomials?

It multiplies every term of the first polynomial by every term of the second and collects like powers. The steps show the distribution term by term, so you can check the FOIL pattern for binomials or longer products.

What does a remainder of 0 mean?

The divisor is a factor of the polynomial. For a divisor x − r it also means r is a root: P(r) = 0.

Can I enter fractions or decimals as coefficients?

Yes. Write 0.5x^2 or x^2/2; all arithmetic is exact with fractions, and results with short decimals are shown as decimals, others as fractions such as (1/3)x.

Sources

Last updated:

More Math calculators

People also use