InfyCalculator
➗

Polynomial Calculator: add, subtract, multiply and divide polynomials

Add, subtract, multiply or divide two polynomials. Type them as expressions like x^2 − 3x + 2 or (x − 1)(x + 2), or as coefficient lists, and get the simplified result, quotient and remainder, degree, coefficients, a value check and the long-division steps.

Polynomial A
Polynomial B
Operation
Check the result at x =
Loading calculator…

How it works

Add / subtract: (A ± B)ₖ = Aₖ ± Bₖ (combine like terms) · Multiply: (A × B)ₖ = Σᵢ Aᵢ · Bₖ₋ᵢ, degree = deg A + deg B · Divide: A = B × Q + R with deg R < deg B (long division) · Check: the identity holds for every value of x

Enter each polynomial as an ordinary expression, such as x^2 − 3x + 2, 2x³ + x − 5 or (x − 1)(x + 2)^2, or as a list of coefficients from the highest power down to the constant, so "1, -3, 2" means x² − 3x + 2. Expressions may use +, −, *, ^, parentheses, implicit multiplication (3x, 2(x + 1)), decimals and whole-number powers; any single letter can be the variable. Products and powers in parentheses are expanded before the operation. Adding or subtracting combines the coefficients of equal powers. Multiplying multiplies every term of A by every term of B and collects like terms, so the degree of the product is the sum of the two degrees. Dividing uses polynomial long division: at each step the leading term of what is left is divided by the leading term of B, that multiple of B is subtracted, and the process repeats until the remainder has a lower degree than B. The result is written A = B × Q + R. The calculator also shows the degree, the coefficient list, a table of coefficients term by term, a graph of A, B and the result, and a numeric check at a value of x you choose (2 by default), which confirms the algebra because the identity must hold for every x.

Worked example

Multiply A = x² − 3x + 2 ("1, -3, 2") by B = x − 1 ("1, -1"). The x³ coefficient is 1·1 = 1; x²: 1·(−1) + (−3)·1 = −4; x: (−3)·(−1) + 2·1 = 5; constant: 2·(−1) = −2. The product is x³ − 4x² + 5x − 2, degree 3, coefficients 1, −4, 5, −2. Check at x = 2: A = 0 and B = 1, so A × B = 0, and the result gives 8 − 16 + 10 − 2 = 0. Dividing the same A by B instead gives quotient x − 2 with remainder 0, because x² − 3x + 2 = (x − 1)(x − 2).

Sources: Wikipedia: Polynomial long division · eMathHelp: Polynomial calculator (sum, difference, product and quotient example) · AnalyzeMath: Online polynomial division calculator (worked example)

Frequently asked questions

How do I enter a polynomial?

Type it as you would write it, for example 2x^3 - 5x + 1 or (x + 1)(x - 4), or give its coefficients from the highest degree to the constant with a 0 for every missing power: 2x³ − 5x + 1 is "2, 0, -5, 1".

How do you divide polynomials?

Use long division. Divide the leading term of the dividend by the leading term of the divisor, multiply the divisor by that term, subtract, and repeat with what is left until its degree is below the divisor’s. For (2x⁴ + x³ + 2x² − x − 7) ÷ (x² − 2x − 1) the quotient is 2x² + 5x + 14 and the remainder is 32x + 7.

Why does multiplying raise the degree?

The highest-degree terms multiply together, so a degree-m polynomial times a degree-n one has a degree-(m + n) term that nothing can cancel. For example x² times x gives x³.

What happens when the leading terms cancel?

If a subtraction cancels the top term, the true degree drops and leading zero coefficients are removed, so 0x² + 3x − 1 is shown as 3x − 1. Subtracting a polynomial from itself gives the zero polynomial, whose degree is undefined.

How can I check a polynomial answer?

Substitute a number for x in the inputs and in the answer. For a product, A(2) × B(2) must equal the result at x = 2; for a division, B × quotient + remainder must equal A. The calculator does this check automatically.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.