Algebra Tool

Polynomial Division Calculator

Divide one polynomial by another and get the quotient, the remainder and the full long division worked out line by line.

Enter the two polynomials

Type them the way you would write them: 2x^3 - 5x^2 + 3x - 7. Use ^ for powers, and any single letter as the variable. Fractions such as 3/4 and decimals are both accepted, and results stay exact.

Dividend
Dividend P(x)

 

Divisor
Divisor D(x)

 

Try an example

Quotient Q(x)

—

Remainder R(x) = —

 

Long division


                            

A − in the left margin marks the row being subtracted. Scroll sideways if the working is wider than the panel.

Degrees

—

Dividend, divisor, then quotient.

Steps taken

—

One per term of the quotient.

Divides exactly?

—

Whether the remainder is zero.

Step by step

Divide → multiply → subtract
# Leading terms Quotient term Subtract New remainder

What your result means

    The Methodology

    How this calculator works

    In short

    A polynomial division calculator divides one polynomial by another and returns the quotient and remainder. It performs polynomial long division, or synthetic division when applicable. For polynomials P(x) and D(x), the result follows P(x) = D(x)Q(x) + R(x), where the degree of R(x) is less than the degree of D(x).

    In practice that means one repeating loop: divide the leading term of the dividend by the leading term of the divisor, multiply the divisor by the result, subtract, and go again until the remainder’s degree drops below the divisor’s. Long division of polynomials follows the same loop as long division of numbers, with powers of x playing the part that place value plays with digits. At every pass the calculator looks only at the two leading terms: the leading term of what is left of the dividend, and the leading term of the divisor. Their ratio is the next term of the quotient.

    That term is then multiplied back through the whole divisor and the product is subtracted from the running remainder, which is guaranteed to cancel the current leading term and drop the degree by at least one. Because the degree falls every pass, the loop always ends, and it ends exactly when the remainder's degree drops below the divisor's.

    Step Operation What it achieves
    1. Dividelead(R) ÷ lead(D)Produces the next term of the quotient, highest power first.
    2. Multiplyterm × D(x)Builds the row that will be taken away from the current remainder.
    3. SubtractR(x) − term·D(x)Cancels the leading term, lowering the degree by at least one.
    4. Repeatuntil deg R < deg DStops at the unique quotient and remainder pair.

    Exact arithmetic, not decimals: this calculator works in fractions throughout, so dividing by a non-monic divisor such as 2x − 1 returns 1/2 and 1/8 rather than 0.5 and 0.125. Rounding errors never accumulate, and a remainder that should be exactly zero always shows as zero.

    Source: Paul Dawkins, Paul’s Online Notes (Lamar University) — Algebra: Dividing Polynomials

    Two Methods

    Long division or synthetic division?

    Both methods produce the same quotient and remainder. They differ in how much writing they take and in how often they apply.

    Long division works on anything

    Any divisor of any degree: x − 2, 2x² − x + 4, a quartic. It carries the variable through every line, which is slower to write but leaves an audit trail you can check term by term.

    Synthetic division is the shortcut

    Restricted to a monic linear divisor x − c — formally Ruffini’s rule. It drops the variable entirely and works on a single row of coefficients, so a cubic divides in three multiplications. The calculator shows it above whenever your divisor qualifies.

    The restriction is easy to work around. To divide by 2x − 6, factor out the 2: divide by x − 3 synthetically, then halve the quotient. The remainder is unchanged, because it never depended on the leading coefficient.

    Source: Wolfram MathWorld — Synthetic Division

    The Guarantee

    The division algorithm for polynomials

    For any polynomials P(x) and non-zero D(x), there is exactly one pair Q(x), R(x) with P = D·Q + R and deg R < deg D. Three consequences do most of the work in algebra courses.

    Degree rule

    deg Q = deg P − deg D

    A cubic divided by a linear gives a quadratic. If the dividend’s degree is the smaller one, the quotient is 0 and the whole dividend is the remainder.

    Remainder theorem

    R = P(c)

    Dividing by x − c leaves a constant remainder equal to the dividend evaluated at c — often the fastest way to evaluate a polynomial by hand.

    Factor theorem

    R = 0 ⇔ factor

    A zero remainder means x − c divides P(x) exactly, so c is a root. This is how a known root is peeled off before solving what is left.

    Source: NIST Digital Library of Mathematical Functions, §1.11(i) — Division Algorithm

    Worked Example

    Dividing 2x³ − 5x² + 3x − 7 by x − 2

    These are the calculator’s default values, so the worksheet above already shows this division. Here is the same thing in words.

    1. 1.2x³ ÷ x = 2x². Multiply: 2x²(x − 2) = 2x³ − 4x². Subtract: the cubes cancel and −5x² − (−4x²) = −x², leaving −x² + 3x − 7.
    2. 2.−x² ÷ x = −x. Multiply: −x(x − 2) = −x² + 2x. Subtract: 3x − 2x = x, leaving x − 7.
    3. 3.x ÷ x = 1. Multiply: 1(x − 2) = x − 2. Subtract: −7 − (−2) = −5.
    4. 4.−5 has degree 0, below the divisor’s degree 1, so the loop stops. Q(x) = 2x² − x + 1 and R = −5.

    Two checks confirm it. Multiplying back, (x − 2)(2x² − x + 1) = 2x³ − 5x² + 3x − 2, and adding the remainder −5 returns the original dividend. The remainder theorem agrees independently: P(2) = 16 − 20 + 6 − 7 = −5. Because that is not zero, x − 2 is not a factor and 2 is not a root.

    Source: mathcentre — Polynomial division (mc-TY-polydiv-2009-1), worked examples and practice exercises

    Applications

    Where polynomial division actually gets used

    Outside homework, division is usually a preparation step rather than the answer. Three uses come up constantly.

    Factoring and root-finding. Once one root is known — guessed from the rational root theorem, or read off a graph — dividing by x − c reduces the degree by one. A quartic becomes a cubic, then a quadratic you can finish with the quadratic formula.

    Slant asymptotes. For a rational function whose numerator is exactly one degree higher than its denominator, dividing rewrites it as Q(x) + R(x)/D(x). Since the fractional part tends to zero for large |x|, the line Q(x) is the oblique asymptote.

    Integration by partial fractions. The decomposition only applies to a proper fraction, so an integrand such as (x³ + 1)/(x² − 1) has to be divided first. Division turns it into a polynomial you can integrate on sight plus a proper remainder term ready to split.

    Source: MIT OpenCourseWare — 18.01SC Single Variable Calculus, Unit 3: Integration (partial fractions)

    Common Pitfalls

    Three mistakes that account for most wrong answers

    Missing powers. Writing x³ − 8 without placeholders invites terms to slide into the wrong column. On paper, write it as x³ + 0x² + 0x − 8. This calculator inserts the zeros for you and keeps every power in its own column, which is why gaps appear as blank space in the worksheet rather than as shifted terms.

    Subtracting only the first term. The row below is subtracted in full, so every sign in it flips — not just the leading one. This single slip accounts for more lost marks than any other, which is why the step table above shows the entire row being taken away at each pass.

    Terms out of order. Both polynomials must be written in descending powers before you start. 3x + x³ − 1 has to be reordered to x³ + 3x − 1, or the first division picks the wrong leading term. The calculator sorts your input automatically, so what it echoes back under each field is what it actually divided.

    Frequently Asked Questions

    What is the quotient and what is the remainder?

    The quotient is how many times the divisor fits into the dividend, expressed as a polynomial; the remainder is the part left over that the divisor no longer fits into. They satisfy P(x) = D(x)·Q(x) + R(x), and the remainder always has a lower degree than the divisor — that degree condition is what makes the pair unique. Dividing a cubic by a linear polynomial, for example, gives a quadratic quotient and a constant remainder, never a remainder with an x still in it. Taken together the two are the complete result of the operation, which is why algebra textbooks quote both rather than just the quotient.

    How do I divide a polynomial by a monomial?

    Divide every term separately and add the pieces. Because the whole expression sits over a single denominator, the fraction splits into one fraction per term of the numerator, and each one simplifies on its own: divide the coefficients, then subtract the exponents on the shared variable. Dividing the trinomial 6x³ + 9x² − 3x by the monomial 3x gives 2x² + 3x − 1 in one line, with no long division needed. The shortcut depends entirely on the divisor being a single term — the moment it becomes a binomial such as x − 2, the numerator can no longer be split term by term and polynomial long division is the method to reach for.

    How do I know if one polynomial divides another exactly?

    The remainder is zero. That is the whole test, and it is what the factor theorem formalises for linear divisors: x − c is a factor of P(x) exactly when P(c) = 0. For a linear divisor you can therefore check divisibility without dividing at all — just evaluate. For divisors of higher degree there is no such shortcut, so you run the division and look at what is left. A zero remainder also tells you that c is a root of the equation P(x) = 0, which is how one known solution gets traded for a smaller polynomial that is easier to solve.

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

    Nothing goes wrong — the answer is simply a quotient of 0 and a remainder equal to the entire dividend. Dividing x + 1 by x² gives Q = 0, R = x + 1, because the degree condition deg R < deg D is already satisfied before a single step runs. In fraction terms the numerator already has a lower degree than the denominator, so the expression is a proper fraction — exactly the form partial fractions require, and the reason division is the first move on an improper one.

    Why does my quotient contain fractions?

    Because the divisor is not monic — its leading coefficient is something other than 1. Every step divides by that coefficient, so dividing by 2x − 1 introduces halves, quarters and eighths even when the dividend has whole-number coefficients. The result is still correct and still exact; this calculator keeps it in fraction form rather than showing 0.125, so nothing is lost to rounding. Integer coefficients throughout are only guaranteed when the divisor is monic, and a constant term in the quotient is just as likely to come out fractional as the rest.

    Can I use synthetic division for any divisor?

    In its standard form, no — the synthetic divisor has to be monic and linear, meaning x − c. A divisor like ax + b can still be handled by dividing by x + b/a and then dividing the quotient by a, leaving the remainder untouched. Generalised versions exist for higher-degree divisors, but they lose the simplicity that makes the shortcut worth using, so polynomial long division is the practical choice from quadratic divisors upward. The trade-off is what you keep on the page: synthetic division works on a bare row of coefficients, while long division carries the variable through every line and shows more of its working.

    How do I check a polynomial division answer?

    Multiply the divisor by the quotient and add the remainder; you must get the original dividend back, term for term. A faster partial check is to substitute a convenient value for the variable — say x = 1 — into both P(x) and D(x)·Q(x) + R(x): the two totals have to agree, and a mismatch proves an error somewhere without pinpointing it. If the divisor is x − c, also confirm that the remainder equals P(c). Comparing degrees is a third quick sanity check, since the quotient’s degree must equal the dividend’s minus the divisor’s.

    Source: Encyclopedia of Mathematics (EMS Press) — Horner scheme, the formal basis of synthetic division

    Other useful calculators

    Disclaimer

    This calculator carries out exact polynomial long division in a single variable with rational coefficients, and is intended for learning, checking homework and quick algebra work. Every step is computed in fractions rather than decimals, so the quotient and remainder shown are exact rather than rounded, and a remainder that is mathematically zero always displays as zero instead of as a tiny floating-point residue.

    What it accepts. One variable, written as any single letter; non-negative whole-number exponents up to degree 12; and coefficients entered as integers, decimals or fractions. What it does not handle. Expressions in more than one variable, negative or fractional exponents, radicals, symbolic coefficients such as a or k, trigonometric, exponential and logarithmic terms, and bracketed expressions that have not been multiplied out. Expand any brackets before entering them, since (x + 1)(x + 2) is rejected while x^2 + 3x + 2 is accepted.

    Numerical limits. Fractions are held as pairs of ordinary numbers, which are exact only up to about 9 quadrillion. Dividing polynomials with very large coefficients, or a high-degree dividend by a non-monic divisor, can push intermediate numerators and denominators past that threshold, at which point precision is silently lost. For everyday coefficients this never arises; for heavy or research-grade computation, use a dedicated computer algebra system such as SymPy, Maxima, SageMath or Mathematica.

    Notation and conventions. Input is automatically reordered into descending powers and given zero placeholders for any missing terms, which is why the line beneath each field echoes back exactly what was divided. Fraction coefficients are shown in parentheses beside a variable to avoid ambiguity, and the synthetic division panel appears only when the divisor is monic and linear. Textbooks lay the working out in slightly different ways — some write each subtraction as the addition of a negative row, some omit the minus sign in the margin — so a presentation that differs from your course notes does not mean the numbers disagree.

    Verification and use. Always confirm a result by multiplying back: the divisor times the quotient, plus the remainder, must reproduce the dividend exactly, and the calculator states that identity for you to check. For graded coursework, follow the method and layout your syllabus requires, since a correct answer produced by an unfamiliar shortcut can still lose marks. This page is provided for educational purposes on an as-is basis, without warranty of any kind, and is not a substitute for instruction, for your institution’s own materials, or for professional judgement in engineering and scientific work.

    Last updated

    Exact rational arithmetic — no floating-point rounding.