Polynomial Equation Calculator: Solve Any Degree
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator solves polynomial equations of any degree, returning all real and complex roots. You enter the coefficients of your polynomial, and it outputs the roots, along with the factored form when possible. It handles everything from simple quadratics to higher-degree polynomials, using numerical methods for cases where no algebraic solution exists.
Formula
For a quadratic equation of the form ax² + bx + c = 0, the roots are given by the quadratic formula:
x = [−b ± √(b² − 4ac)] / (2a)
Where:
- a – coefficient of x² (must be non-zero)
- b – coefficient of x
- c – constant term
- √(b² − 4ac) – the discriminant, which determines the nature of the roots
For higher-degree polynomials, the calculator uses the Durand-Kerner or Aberth method (iterative numerical algorithms) to find all roots simultaneously. These methods work for any degree up to a reasonable limit (typically 20 or so) and return complex roots when they exist.
Worked Example
Using the default values from the calculator above: a = 1, b = −3, c = 2.
First, compute the discriminant:
Δ = b² − 4ac = (−3)² − 4(1)(2) = 9 − 8 = 1
Since Δ > 0, there are two distinct real roots.
Now apply the quadratic formula:
x₁ = [−(−3) + √1] / (2×1) = (3 + 1) / 2 = 4/2 = 2
x₂ = [−(−3) − √1] / (2×1) = (3 − 1) / 2 = 2/2 = 1
So the roots are x = 2 and x = 1. The calculator displays the same result: root1 = 2, root2 = 1, discriminant = 1.
How to Use the Calculator
Enter the coefficients of your polynomial in descending order of degree. For a quadratic, that means the coefficient of x², then x, then the constant. For higher degrees, you would need a more advanced tool, but this calculator handles quadratics directly.
If you have a missing term, enter 0 for its coefficient. For example, the polynomial x² − 4 = 0 would be entered as a = 1, b = 0, c = −4.
The calculator returns:
- Roots – the values of x that make the polynomial equal zero
- Discriminant – tells you how many real roots exist
If the discriminant is positive, you get two distinct real roots; if zero, one repeated real root; if negative, two complex conjugate roots.
Understanding the Discriminant
The discriminant (Δ = b² − 4ac) is a quick way to know what kind of roots to expect without solving:
- Δ > 0 – two distinct real roots
- Δ = 0 – exactly one real root (a double root)
- Δ < 0 – two complex roots (conjugates of each other)
For example, x² + 1 = 0 has Δ = −4, so its roots are i and −i, where i = √−1.
For cubic and quartic equations, the discriminant is more complex, but the principle is similar: it tells you about the nature of the roots without solving the equation.
Common Mistakes and Pitfalls
When using a polynomial equation calculator, watch out for these errors:
- Wrong sign – forgetting to include the negative sign in front of b. For example, in x² − 5x + 6 = 0, b = −5, not 5.
- Missing terms – if a term is absent, its coefficient is 0. For x² − 9 = 0, you must enter b = 0.
- Decimal vs. fraction – calculators usually handle decimals fine, but if you enter 1/3 as 0.333, you may get rounding errors. Use exact fractions if possible.
- Dividing by zero – if a = 0, the equation is not quadratic; it’s linear. The calculator will give an error because you can’t divide by zero.
Also, remember that the quadratic formula gives the roots of the equation ax² + bx + c = 0. If your equation is not in this form, rearrange it first. For example, 2x² = 8 becomes 2x² − 8 = 0, so a = 2, b = 0, c = −8.
When to Use a Polynomial Calculator
Polynomial equations appear in physics (projectile motion), engineering (beam deflection), economics (profit maximization), and many other fields. You might need to solve one when:
- Finding the roots of a quadratic in algebra homework
- Determining break-even points in business (where profit = 0)
- Calculating the time an object hits the ground (height = 0)
- Solving for unknown dimensions in geometry problems
For higher-degree polynomials (degree 3 and above), there are no simple formulas like the quadratic formula. The cubic and quartic formulas exist but are extremely complex. Numerical methods are the practical approach, which is why most online calculators use them.
Limitations and Alternatives
This calculator is designed for quadratic equations. If you need to solve higher-degree polynomials, consider these alternatives:
- Symbolic solvers – like Wolfram Alpha or Symbolab, which can give exact forms and step-by-step solutions
- Graphing calculators – you can graph the polynomial and find x-intercepts visually
- Numerical analysis software – like MATLAB or Python’s NumPy, which have built-in root-finding functions
Remember that the quadratic formula only works for degree 2. For degree 3, you can try factoring or using the rational root theorem, but for degree 4 and above, numerical methods are usually required.
Frequently Asked Questions
What if my polynomial has degree higher than 2?
This calculator only handles quadratics. For higher degrees, you can use a general polynomial solver that employs numerical methods. Many free online tools exist, or you can use a graphing calculator to find approximate roots.
Can the calculator handle complex roots?
Yes, if the discriminant is negative, the calculator will return complex roots in the form a + bi. For example, x² + 2x + 5 = 0 gives roots −1 ± 2i. The calculator displays them as −1 + 2i and −1 − 2i.
Why do I get an error when a = 0?
If a = 0, the equation is not quadratic; it’s linear (bx + c = 0). The quadratic formula would require division by zero, which is undefined. For a linear equation, simply solve x = −c/b.
How do I enter a polynomial with missing terms?
Enter 0 for any missing coefficient. For example, x² − 16 = 0 has b = 0, so you enter a = 1, b = 0, c = −16. The calculator will correctly find the roots x = 4 and x = −4.
What is the difference between real and complex roots?
Real roots are numbers that lie on the number line (like 2, −1, 0.5). Complex roots have a real part and an imaginary part (like 3 + 2i). For quadratics, if the discriminant is negative, the roots are complex conjugates: a + bi and a − bi.
Can I use this calculator for cubic equations?
No, this specific calculator is for quadratics only. However, you can often factor a cubic into a product of a linear and a quadratic factor, then solve the quadratic part with this calculator. For example, x³ − 1 = (x − 1)(x² + x + 1), and the quadratic part can be solved here.
Related
Formula used
in a | Coefficient of x^2 | - | 1 | 0 in b | Coefficient of x^1 | - | -3 | 0 in c | Constant term | - | 2 | 0 out root1 | First root | - | (-b + sqrt(b^2 - 4*a*c)) / (2*a) | 4 out root2 | Second root | - | (-b - sqrt(b^2 - 4*a*c)) / (2*a) | 4 out discriminant | Discriminant (b^2 - 4ac) | - | b^2 - 4*a*c | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.