ThisCalculator

Math

Equation Root Calculator: Solve Any Polynomial

Updated · Standard formula, shown below

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.

Equation Root Calculator: Solve Any Polynomial

An equation root calculator finds the values of the variable that make the equation equal zero—these are called roots or zeros. You enter a polynomial equation (like x² – 5x + 6 = 0), and the calculator returns the roots (for the example, x = 2 and x = 3). It works for linear, quadratic, cubic, and higher-degree polynomials, and can also handle equations that aren’t in standard polynomial form by rearranging them.

Formula

For a quadratic equation in the form ax² + bx + c = 0, the roots are given by the quadratic formula:

x = [−b ± √(b² − 4ac)] / (2a)

Where:

  • a is the coefficient of x² (must be non-zero)
  • b is the coefficient of x
  • c is the constant term
  • ± means you compute two separate values: one with a plus, one with a minus

The expression under the square root, b² − 4ac, is called the discriminant. It tells you the nature of the roots:

  • If the discriminant is positive, there are two distinct real roots.
  • If it is zero, there is exactly one real root (a repeated root).
  • If it is negative, there are two complex roots (no real solutions).

Worked Example

Using the default values from the calculator: a = 1, b = −5, c = 6. The equation is x² − 5x + 6 = 0.

Step 1: Compute the discriminant: b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1.

Step 2: Since the discriminant is positive, we expect two real roots.

Step 3: First root: x = [−(−5) + √1] / (2×1) = (5 + 1) / 2 = 6 / 2 = 3.

Step 4: Second root: x = [−(−5) − √1] / (2×1) = (5 − 1) / 2 = 4 / 2 = 2.

The roots are x = 3 and x = 2. You can verify: (3)² − 5(3) + 6 = 9 − 15 + 6 = 0, and (2)² − 5(2) + 6 = 4 − 10 + 6 = 0.

How an Equation Root Calculator Works

Most online root calculators use numerical methods rather than algebraic formulas, especially for polynomials of degree 3 or higher. The most common methods include:

  • Newton-Raphson method: Starts with an initial guess and iteratively refines it using the derivative. It converges quickly but may fail if the derivative is zero.
  • Bisection method: Requires two points where the function has opposite signs, then repeatedly halves the interval. It always converges but is slower.
  • Secant method: Similar to Newton but approximates the derivative using two previous points.
  • Durand-Kerner method: Finds all roots of a polynomial simultaneously by iterating over complex numbers.

For quadratic equations, the calculator likely uses the exact quadratic formula. For higher-degree polynomials, it may use a combination of these methods. The output is usually a list of roots, possibly including complex numbers (shown as a + bi).

How to Choose the Right Root Calculator

Not all root calculators are the same. Consider these factors:

  • Degree of polynomial: Some calculators only handle quadratics. If you need cubic or quartic roots, look for one that explicitly supports higher degrees.
  • Complex roots: If you need complex solutions, ensure the calculator displays them (e.g., in the form a + bi).
  • Input format: Some accept a string like “x^3 – 2x + 1 = 0”; others ask for coefficients separately. Choose what you find easier.
  • Step-by-step solutions: Many educational calculators show intermediate steps, which helps verify your own work.
  • Precision: For numerical methods, the number of decimal places matters. Most give 4-6 significant digits, which is usually enough.

Common Mistakes When Finding Roots

Even with a calculator, errors can creep in. Watch out for:

  • Sign errors: The quadratic formula has −b. If b is negative, −b becomes positive. For example, in x² − 5x + 6, b = −5, so −b = 5. A common mistake is to write −5 instead.
  • Forgetting a = 0: If a = 0, the equation is linear, not quadratic. The quadratic formula would divide by zero. Always check that a ≠ 0.
  • Unit mix-ups: In physics problems, roots may represent time or distance. Ensure the units are consistent (e.g., seconds not minutes).
  • Rounding too early: If you round intermediate values, the final roots may be off. Keep full precision until the final step.
  • Assuming all roots are real: A negative discriminant means complex roots. If you only expect real answers, you might miss them.

Limits of the Quadratic Formula

The quadratic formula works only for degree-2 polynomials. For cubic (degree 3) and quartic (degree 4) equations, there are analogous formulas, but they are extremely complex and rarely used. For degree 5 and higher, there is no general algebraic formula (Abel-Ruffini theorem), so numerical methods are necessary. Even for quadratics, the formula can suffer from numerical instability when a is very small or b is very large compared to a and c. In such cases, an alternative form using the reciprocal root can be more accurate.

Alternatives to an Online Calculator

  • Graphing: Plot the function and look for x-intercepts. This gives approximate roots visually.
  • Factoring: For simple quadratics, factor by inspection. For example, x² − 5x + 6 = (x − 2)(x − 3).
  • Completing the square: Rewrite the equation as (x − h)² = k, then solve by taking square roots.
  • Numerical software: Tools like MATLAB, Python (NumPy), or even spreadsheets can compute roots with more control.
  • Manual iteration: Use Newton’s method by hand with a calculator for a single root.

Frequently Asked Questions

What is a root of an equation?

A root is a value of the variable that makes the equation true (equal to zero). For example, in x² − 5x + 6 = 0, x = 2 is a root because 2² − 5(2) + 6 = 0. Roots are also called zeros or solutions.

Can a root calculator solve equations like x³ + 2x − 1 = 0?

Yes, if the calculator supports cubic equations. Many do. They typically use numerical methods like Newton-Raphson. The result is usually given as a decimal approximation, such as x ≈ 0.4534 for that equation.

What does it mean if the discriminant is negative?

It means the quadratic has no real roots, but it has two complex roots. For example, x² + 1 = 0 has discriminant 0² − 4(1)(1) = −4, so the roots are i and −i (where i is the imaginary unit). A root calculator that supports complex numbers will show them.

How do I enter an equation that isn’t in standard form?

First, rearrange it so that one side equals zero. For example, to solve x² = 4x − 3, subtract 4x and add 3 to both sides to get x² − 4x + 3 = 0. Then enter a = 1, b = −4, c = 3.

Why does my calculator give a different answer than my friend’s?

It could be due to rounding differences, or the calculator might use a different numerical method with a different tolerance. For well-conditioned problems, the differences are tiny (e.g., 0.0001). If the difference is large, check that you entered the same coefficients and that the equation is the same.

Can I use a root calculator for equations with variables other than x?

Yes, the variable name doesn’t matter. The calculator treats it as the unknown. Just make sure you enter the coefficients in the correct order (for quadratic: coefficient of the squared term, coefficient of the linear term, constant).

Related

Formula used
in a | Coefficient of x² | - | 1 | 0
in b | Coefficient of x | - | -5 | 0
in c | Constant term | - | 6 | 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

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.