Quadratic Formula Calculator
Solve ax² + bx + c = 0 with the quadratic formula: exact roots, discriminant, vertex, graph and steps.
This cubic equation solver finds all three roots of , real or complex, exact whenever possible.
Solutions
The curve crosses the x-axis three times, at x ≈ −0.7320508076, x = 0.5 and x ≈ 2.732050808. These are the three values that make 2x³ − 5x² − 2x + 2 equal to zero.
| Root | Exact form | Decimal value | Multiplicity | Type |
|---|---|---|---|---|
| x₁ | 1 − √3 | −0.7320508076 | 1 | Real, irrational |
| x₂ | 1/2 | 0.5 | 1 | Real, rational |
| x₃ | 1 + √3 | 2.732050808 | 1 | Real, irrational |
Identify the coefficients
Compare with : a = 2, b = −5, c = −2, d = 2.
Compute the discriminant
Δ is positive, so the cubic has three distinct real roots.
List the rational root candidates
By the rational root theorem, a rational root p/q (in lowest terms, after clearing fractions) has p dividing the constant term and q dividing the leading coefficient. That gives 6 candidates: ±1/2, ±1, ±2.
Test the candidates
Substitute candidates into f(x) until one gives 0: f(1/2) = 0. So x = 1/2 is a root and (x − 1/2) is a factor.
Divide by (x − 1/2) with synthetic division
Write the coefficients 2, −5, −2, 2. Bring down 2, then repeatedly multiply by 1/2 and add to the next coefficient: −5 + 1 = −4; −2 + (−2) = −4; 2 + (−2) = 0. The last number is the remainder (0); the others are the coefficients of the quadratic quotient.
Write the cubic as a product
Solve the remaining quadratic
Its discriminant is 48 > 0, so it gives two real roots.
Check each root by substitution
Put each root back into f(x) = 2x³ − 5x² − 2x + 2: f(1 − √3) = 0 exactly; f(1/2) = 0 exactly; f(1 + √3) = 0 exactly. Exact arithmetic confirms every root.
Check with Vieta’s formulas
The three roots (counted with multiplicity) add up to −b/a = 5/2 and multiply to −d/a = −1, as they should.
You get the discriminant, a graph and every step, from the rational root test to Cardano’s cubic formula.
Cubic discriminant
Plain-text formula: Δ = 18abcd − 4b^3 d + b^2 c^2 − 4ac^3 − 27a^2 d^2
Δ > 0 means three distinct real roots, Δ = 0 means a repeated root (all roots real), and Δ < 0 means one real root and a pair of complex conjugate roots.
Rational root theorem
Plain-text formula: x = p/q, p∣d, q∣a
With integer coefficients, any rational root in lowest terms has a numerator dividing the constant term and a denominator dividing the leading coefficient. Once a root r is found, synthetic division by (x − r) leaves a quadratic, solved with the quadratic formula.
The cubic formula (Cardano’s method)
Plain-text formula: t = ∛(−q/2 + √(q^2/4 + p^3/27)) + ∛(−q/2 − √(q^2/4 + p^3/27))
Substituting gives . When Δ < 0 this formula gives the real root. When Δ > 0 the trigonometric form gives all three real roots.
Every cubic has at least one real root, because its graph runs from to (or the reverse) and must cross the x-axis. The solutions are the x-values where the curve meets the axis; complex roots, when present, come as a conjugate pair and do not show on the graph.
Exact roots such as or appear when the cubic has a rational root. If the rational root test finds nothing, the roots are irrational or complex and are given as decimals; the steps then use the depressed cubic and Cardano’s or the trigonometric formula.
Check an answer with Vieta’s formulas: the roots add up to , the sum of their pairwise products is and their product is .
Start with the rational root theorem. List every ±p/q where p divides the constant term d and q divides the leading coefficient a, and substitute them until one gives zero. For the candidates are ±1, ±2, ±3 and ±6, and works.
Divide by with synthetic division to get a quadratic, then solve that with the quadratic formula. Here , so the roots are 1, 2 and 3.
If no candidate works, the cubic has no rational root and factoring by hand stops there. Reduce it to a depressed cubic and use the cubic formula below, or let this cubic equation calculator do it. The how to solve a cubic equation guide walks through both routes with more examples.
For a quadratic, the discriminant decides between two real roots, one repeated root or a complex pair. The cubic discriminant plays the same role. A positive Δ gives three different real roots and a graph with a local maximum above the axis and a local minimum below it. Δ = 0 means the graph touches the axis at a turning point (a double root) or flattens through it (a triple root).
A negative Δ leaves only one real crossing. Oddly, the case with three real roots is the one where Cardano’s formula forces you through complex numbers, which is why the trigonometric method is used there.
Find the exact roots and the discriminant.
Answer: The roots are , and . Their sum is 2.5 = −b/a and their product is −1 = −d/a.
It is Cardano’s formula. First substitute to get the depressed cubic , then . It always works, but when there are three real irrational roots it passes through complex numbers, so the trigonometric form is easier.
Rearrange it to , then enter a, b, c and d. This cubic equation calculator returns all three roots with the working. On a Casio fx-991ES PLUS, open EQN mode and choose the aX³ + bX² + cX + d = 0 type; on an fx-991EX ClassWiz, choose Equation/Func, then Polynomial, then degree 3. Enter a, b, c and d and step through the roots. Handheld calculators show decimals only, with no exact forms or steps, and if only one root appears the other two are a complex pair.
You do not need to install one. This page works on any phone browser, and you can add it to your home screen so it opens with one tap, like an app. It needs an internet connection to load.
Find one rational root r, divide the cubic by with synthetic division, then factor the quadratic that remains. For example, . The solver shows the factored form whenever the cubic has a rational root, and the factoring calculator shows each factoring step, including grouping and sums or differences of cubes.
Yes. A cubic with real coefficients always has at least one real root, because the graph goes to on one side and on the other. It has either one real root and two complex roots, or three real roots (some possibly repeated).
It is . Positive means three distinct real roots, zero means a repeated root, and negative means one real root plus a complex conjugate pair.
When a cubic has no rational root, its roots are irrational or complex. They can be written with nested cube roots using Cardano’s formula, but those expressions are long and often involve complex numbers, so the calculator gives accurate decimals instead.
List the fractions ±p/q where p divides the constant term and q divides the leading coefficient, then substitute them one at a time. For the candidates are ±1, ±2 and ±1/2, and works.
Then there is no term and the equation is a quadratic. Use the quadratic equation calculator. For polynomials of degree 4 to 10, use the polynomial root finder.
A shortcut for dividing a polynomial by (x − r). Bring down the first coefficient, multiply by r, add to the next coefficient and repeat. The last number is the remainder, which is 0 exactly when r is a root.
Solve ax² + bx + c = 0 with the quadratic formula: exact roots, discriminant, vertex, graph and steps.
All real and complex roots of a polynomial up to degree 10, with multiplicities, exact forms and steps.
Factor a polynomial completely, with each step labeled by method and a check by expanding.
Solve any equation in x: exact steps for linear and quadratic equations, numerical roots for the rest.
Complex arithmetic, powers and roots with steps, in rectangular, polar and exponential form.
Free worked solutions for equations, systems, inequalities, factoring, derivatives, integrals, limits and matrices.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?