Find polynomial roots exactly
Enter the coefficients of a quadratic (ax² + bx + c) or cubic (ax³ + bx² + cx + d) equation and this tool returns all roots, including complex ones shown in a + bi form. It is built for algebra coursework, engineering and anyone who needs exact roots rather than a graph.
How it works
For a quadratic, it uses the quadratic formula and the discriminant to decide
the type of roots. The discriminant is disc = b² − 4ac, and the roots are
x = (−b ± √disc) / 2a. When disc is negative the square root is imaginary, so
the two roots form a complex conjugate pair; when it is zero the ± term vanishes
and the two roots collapse into one repeated value.
For a cubic, it reduces to a depressed cubic and applies Cardano’s method, switching to the trigonometric form when the discriminant indicates three real roots. The leading coefficient a must be non-zero so the degree is correct.
What the discriminant tells you
For quadratics, the sign of b² − 4ac fully characterises the roots before you do any arithmetic:
| Discriminant | Root type | Example |
|---|---|---|
| Positive | Two distinct real roots | x² − 5x + 6 = 0 → roots 2 and 3 |
| Zero | One repeated real root | x² − 4x + 4 = 0 → root 2 (double) |
| Negative | Complex conjugate pair | x² + 4 = 0 → roots 2i and −2i |
For a cubic ax³ + bx² + cx + d, the discriminant Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d² distinguishes three real roots (Δ > 0), one real and a repeated root (Δ = 0), or one real and two complex conjugate roots (Δ < 0).
Worked examples
Quadratic: x² − 3x + 2 = 0 (a=1, b=−3, c=2):
- disc = (−3)² − 4·1·2 = 9 − 8 = 1 (positive → two real roots)
- x = (3 ± 1) / 2 → x = 2 and x = 1
Quadratic: x² + 1 = 0 (a=1, b=0, c=1):
- disc = −4 (negative) → roots x = +i and x = −i
Cubic: x³ − 6x² + 11x − 6 = 0 (a=1, b=−6, c=11, d=−6):
- Δ > 0 → three distinct real roots: x = 1, 2, 3 (this cubic factors as (x−1)(x−2)(x−3))
Practical notes
Complex roots of polynomials with real coefficients always appear as conjugate pairs — if a + bi is a root, so is a − bi. This means quadratics have 0 or 2 complex roots, and cubics have either 0 or 2 complex roots (with 3 or 1 real ones respectively). If you enter a cubic and get one real and two complex roots, the complex pair’s real parts are equal and their imaginary parts are equal in magnitude but opposite in sign.
When to use it
A graphing tool tells you roughly where a curve crosses the x-axis; this calculator tells you the exact values, including the roots that never touch the axis at all. That distinction matters whenever you need the numbers rather than a picture: factoring a quadratic for an algebra assignment, finding the break-even points of a cost model, locating the equilibria of a cubic in a physics or control-systems problem, or checking work you did by hand. Because complex roots are returned in full, it is also a quick way to confirm that a polynomial with real coefficients has no real solutions — a fact a graph can only suggest by failing to cross the axis.
Common mistakes and how to read the output
The most frequent error is mis-entering the leading coefficient. If you type a
cubic but leave a as zero, the equation is really a quadratic and the degree no
longer matches what you selected — set a to a non-zero value. A second pitfall
is sign confusion: for x² − 3x + 2 the coefficient b is −3, not 3, so enter the
sign exactly as it appears. When reading the output, remember that complex roots
always arrive in conjugate pairs for real-coefficient polynomials, so a result of
2 + 3i guarantees a partner of 2 − 3i. A repeated real root (from a zero
discriminant) is shown once but counts twice toward the total root count, which is
why a quadratic with disc = 0 still satisfies the rule that a degree-n
polynomial has n roots counting multiplicity.
Every calculation runs locally in your browser with no data sent to a server.