Polynomial Calculator (Add, Subtract, Multiply, Evaluate)

Add, subtract or multiply two polynomials entered as coefficient lists, or evaluate a polynomial at x, with the working shown.

12, 9, −21 means 12x² + 9x − 21. Use 0 for a missing power. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.
4, 8, −5, 20 means 4x³ + 8x² − 5x + 20.

Results

(12x² + 9x − 21) + (4x³ + 8x² − 5x + 20)
4x³ + 20x² + 4x − 1
Degree of the result
3
Result coefficients (highest power first)
4, 20, 4, −1
Combine like terms
x³ terms: 0 + 4 = 4 x² terms: 12 + 8 = 20 x terms: 9 + (−5) = 4 constants: −21 + 20 = −1

How it’s calculated

Polynomials are added and subtracted by combining like terms (the same power of x). To subtract, change the sign of every term of the second polynomial first. To multiply, multiply every term of the first polynomial by every term of the second and add the results.

(aₙxⁿ + … + a₀) ± (bₙxⁿ + … + b₀) = (aₙ ± bₙ)xⁿ + … + (a₀ ± b₀) P(x) × Q(x): the coefficient of xᵏ is Σ aᵢ·bⱼ over all i + j = k

Example: (12x² + 9x − 21) + (4x³ + 8x² − 5x + 20). Combine like terms: 4x³ + (12 + 8)x² + (9 − 5)x + (−21 + 20) = 4x³ + 20x² + 4x − 1.

Evaluating uses Horner’s method, which nests the multiplications: 6x⁴ − x³ − 15x² + 2x − 7 at x = 2 is (((6·2 − 1)·2 − 15)·2 + 2)·2 − 7 = 25. These are the same numbers as synthetic division, so the value is also the remainder on dividing by x − 2.

Enter coefficients from the highest power down and use 0 for any missing power, so x³ − 1 is 1, 0, 0, −1.

Frequently asked questions

How do I enter a polynomial?

List its coefficients from the highest power down to the constant, with 0 for any power that is missing. 3x⁴ − 2x + 7 is 3, 0, 0, −2, 7.

What is the degree of a product?

The degrees add: a degree 2 polynomial times a degree 3 polynomial has degree 5 (as long as neither is zero).

How do I subtract polynomials without sign mistakes?

Change the sign of every term in the polynomial being subtracted, then add. (7x⁴ − x² + 6x + 1) − (5x³ − 2x² + 3x + 2) = 7x⁴ − 5x³ + x² + 3x − 1.

Can it divide polynomials?

Use the polynomial division calculator for long and synthetic division with a remainder.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator