algebra calculators

Polynomial Roots Calculator

Find the primary real root of a polynomial of degree 2, 3, or 4 from its leading coefficient, second coefficient, and constant term. Returns one root for an approximate guide; full root-finding for arbitrary polynomials needs symbolic algebra or numerical methods.

About this calculator

A polynomial of degree n in x has the form aₙxⁿ + aₙ₋₁xⁿ⁻¹ + ... + a₁x + a₀, and its roots are the values of x that make the polynomial equal to zero. By the Fundamental Theorem of Algebra, an n-degree polynomial has exactly n roots counted with multiplicity, allowing for complex (non-real) roots. This calculator handles degrees 2 (quadratic), 3 (cubic), and 4 (quartic) using simplified formulas keyed on three coefficients only — leading (coeff_a), second (coeff_b), and constant (coeff_c). For the quadratic case ax² + bx + c = 0, it returns the larger real root from the quadratic formula: x = (-b + √max(0, b² − 4ac)) / (2a). For the cubic and quartic cases the calculator uses a heuristic approximation (not the full Cardano or Ferrari formulas) and returns only a primary real root estimate. Variables: degree selects the polynomial degree; coeff_a, coeff_b, coeff_c are the three coefficients used. Edge cases: when the quadratic discriminant b² − 4ac is negative, the max-with-0 trick prevents an imaginary square root and effectively projects to b² − 4ac = 0 (the root x = -b/(2a)) — so complex roots are not reported. coeff_a must be non-zero to avoid division by zero. The middle coefficients of cubic and quartic terms (the actual full polynomial has more than three coefficients in those degrees) are not captured by the schema, so the cubic and quartic outputs are coarse approximations rather than exact roots. For exact roots of arbitrary polynomials, use a CAS (SymPy, Mathematica) or a numerical root-finder (Newton-Raphson, Durand-Kerner). This tool is best understood as a quick quadratic root finder with experimental higher-degree estimates.

How to use

Example 1 — Quadratic with two real roots. Find roots of x² − 3x + 2 = 0. Enter Degree = 2, Leading = 1, Second = -3, Constant = 2. Quadratic formula: x = (3 + √(9 − 8)) / 2 = (3 + 1) / 2 = 2. ✓ Verify: 2² − 3·2 + 2 = 4 − 6 + 2 = 0 ✓. The other root is (3 − 1) / 2 = 1; this calculator returns only the larger one, but factoring x² − 3x + 2 = (x − 1)(x − 2) confirms both roots are 1 and 2. Example 2 — Quadratic with negative discriminant. Find roots of x² + 2x + 5 = 0. Enter Degree = 2, Leading = 1, Second = 2, Constant = 5. Discriminant: 4 − 20 = -16 (negative — no real roots). With the max(0, …) trick, the formula returns (-2 + √0) / 2 = -1. ✓ This is actually the real part of the complex roots x = -1 ± 2i — useful as a vertex hint but not a true root. For real polynomials with no real roots, the calculator silently returns -b/(2a), the x-coordinate of the parabola's vertex.

Frequently asked questions

How many roots does a polynomial have?

By the Fundamental Theorem of Algebra, a polynomial of degree n has exactly n roots, counted with multiplicity, when complex (non-real) roots are included. Real roots can be fewer: a quadratic has 0, 1 (a "double root"), or 2 real roots depending on the discriminant; a cubic always has at least 1 real root (because cubic polynomials with real coefficients are continuous and change sign); a quartic can have 0, 2, or 4 real roots. The remaining roots are complex and come in conjugate pairs for polynomials with real coefficients. This calculator only handles the real-root case and returns at most one root per call — for the full set you need a complete root-finder.

What is the quadratic discriminant and what does it tell you?

For ax² + bx + c = 0, the discriminant is Δ = b² − 4ac. The sign of Δ determines the nature of the roots: Δ > 0 → two distinct real roots; Δ = 0 → one real root with multiplicity 2 (a double root, where the parabola touches the x-axis tangentially); Δ < 0 → two complex-conjugate roots (no real roots). The discriminant is also what appears under the square root in the quadratic formula, so its sign directly tells you whether the formula produces real or complex answers. A geometric interpretation: |Δ| / (4a²) is proportional to the squared distance between the parabola's vertex and the x-axis. The discriminant generalises: a cubic has its own discriminant (involving all four coefficients) that similarly distinguishes the cases of 1 vs 3 real roots.

Why doesn't this calculator handle the full quartic formula?

A general quartic ax⁴ + bx³ + cx² + dx + e = 0 has Ferrari's closed-form solution, but the formula is extraordinarily complex — it involves solving an intermediate cubic (the "resolvent cubic"), taking nested square roots, and handling multiple branches. Implementing it correctly requires complex-number arithmetic and careful case analysis. This calculator uses a simplified heuristic for quartics (just three coefficients out of five) that gives a rough indication only — for actual quartic root-finding, use a numerical algorithm like Durand-Kerner or Jenkins-Traub (used by most modern CASes). The takeaway: for degree ≥ 3, prefer a dedicated polynomial root-finder; this tool is a quick quadratic solver with limited higher-degree estimates.

What are the most common mistakes people make finding polynomial roots?

The first is forgetting that polynomials can have complex roots — assuming "no real roots" means "no roots at all" leads to misinterpretation in fields like signal processing or control theory where the complex roots carry essential information. The second is plugging coefficients in the wrong order: for ax² + bx + c, a is the leading coefficient (xᵅ-coefficient), not the constant. The third is using a quadratic formula on a non-quadratic equation (cubic, exponential, transcendental); each polynomial degree has its own technique. The fourth is dividing the polynomial by the leading coefficient to "monic" form and then forgetting to restore the original scale — the roots are the same, but mis-handling can introduce confusion. The fifth is mistaking a multiplicity-2 root for two distinct roots; the quadratic formula collapses both branches to the same value when Δ = 0.

When should I not use this calculator?

Skip it for polynomials with more than three significant coefficients (any cubic with a non-zero quadratic or linear coefficient, any quartic with non-zero cubic, quadratic, or linear coefficients) — the three-coefficient schema cannot represent them accurately. Do not use it when you need all roots, not just one — use a numerical root-finder or a CAS. It is the wrong tool for complex-root reporting; this calculator silently projects to the vertex x-coordinate when the discriminant is negative, hiding the imaginary part. Avoid it for high-degree polynomials (degree 5+) where there is no general algebraic formula (Abel-Ruffini theorem) — numerical methods like Aberth, Jenkins-Traub, or eigenvalue-based companion-matrix methods are required. Finally, do not use it for polynomial factorisation in symbolic form; for rational-root or factor-theorem problems, use a polynomial-factoring calculator instead.