Quick Answer
The quadratic formula calculator solves ax² + bx + c = 0 with x = (−b ± √(b² − 4ac)) / 2a, returning both roots as decimals and in exact simplified-radical form. It also reports the discriminant, vertex, axis of symmetry, y-intercept, sum and product of the roots, and the factored form — with step-by-step working and a live parabola graph.
Quadratic Formula: x = (−b ± √(b² − 4ac)) / 2a
This quadratic formula calculator solves any equation of the form ax² + bx + c = 0, where a is not zero. Type the three coefficients — integers, decimals or fractions like 1/2 — and it applies the quadratic formula, then reads off everything the formula hides: the discriminant, the vertex, the axis of symmetry, the sum and product of the roots, and the vertex and factored forms. For x² − 5x + 6 = 0 it returns x = 3 and x = 2, with a discriminant of 1 and a vertex at (2.5, −0.25).
The expression under the root,
b² − 4ac, is the discriminant D — its sign alone decides whether the two roots are real or complex, before you compute anything else.
The Discriminant: What b² − 4ac Tells You Before You Solve
The discriminant is the only part of the formula you need in order to know what kind of answer you are about to get. Wolfram MathWorld’s entry on the discriminant defines it for the general polynomial; for a quadratic it reduces to D = b² − 4ac, and its sign is decisive.
| Discriminant (D = b² − 4ac) | What the roots look like | Example |
|---|---|---|
| D > 0 | Two distinct real roots — the parabola crosses the x-axis twice | x² − 6x + 5 = 0, D = 16 |
| D = 0 | One repeated real root — the parabola just touches the x-axis | x² − 4x + 4 = 0, D = 0 |
| D < 0 | Two complex conjugate roots (a ± bi) — the parabola never touches the x-axis | x² − 2x + 5 = 0, D = −16 |
A perfect-square discriminant is worth spotting too: when D is a square number the roots come out rational and the quadratic factors cleanly over the integers. 2x² + 3x − 5 = 0 has D = 49, so its roots are exactly 1 and −2.5 with no radical involved. x² − 3x + 1 = 0 has D = 5, which is not a square, so the answer keeps its radical: x = (3 ± √5) / 2.
How to Use the Quadratic Formula Calculator
-
Enter a
Type the number in front of x² (the leading coefficient). It cannot be 0, or the equation isn’t quadratic.
-
Enter b
Type the number in front of x. It can be positive, negative, zero or a fraction like 1/2.
-
Enter c
Type the constant (the number on its own). The roots, graph and all companion values appear instantly.
-
Read the results
The solutions card shows both roots with the exact form underneath. Open Show step-by-step solution for the full working, and use Share result to copy a link that reloads your exact equation.
Worked Examples: Real, Repeated, Complex and Exact Radical Roots
Every row reproduces the calculator’s output exactly — enter the coefficients and compare. Decimals are rounded to 4 places, the way the tool prints them.
| Equation | D = b² − 4ac | Roots (decimal) | Exact form |
|---|---|---|---|
| x² − 5x + 6 = 0 | 1 | x = 3, x = 2 | x = 3, 2 |
| 2x² + 3x − 5 = 0 | 49 | x = 1, x = −2.5 | x = 1, −5/2 |
| x² − 3x + 1 = 0 | 5 | x = 2.618, x = 0.382 | x = (3 ± √5) / 2 |
| 3x² − 12x + 7 = 0 | 60 | x = 3.291, x = 0.709 | x = (6 ± √15) / 3 |
| x² − 4x + 4 = 0 | 0 | x = 2 (repeated) | x = 2 |
| x² − 2x + 5 = 0 | −16 | x = 1 + 2i, x = 1 − 2i | x = 1 ± 2i |
Here is the third row solved the way the calculator’s step-by-step panel shows it, for x² − 3x + 1 = 0:
-
Identify coefficients
a = 1, b = −3, c = 1.
-
Compute the discriminant
D = b² − 4ac = 9 − 4 = 5. Positive, so there are two distinct real roots.
-
Take the square root
√5 = 2.2361.
-
Apply the formula
x = (3 ± 2.2361) / 2, giving x = 2.618 or x = 0.382 — exact form x = (3 ± √5) / 2. The vertex lands at (1.5, −1.25).
x = 1 ± 2i or x = (−1 ± i√3) / 2.Simplified Radicals: Why √48 Becomes 4√3
When the discriminant is not a perfect square, the calculator pulls every square factor out from under the root rather than leaving a decimal. It then divides −b, the radical coefficient and 2a by their common factor, which is why 3x² − 12x + 7 = 0 prints as x = (6 ± √15) / 3 and not the unreduced (12 ± 2√15) / 6.
| Radical | Simplified | Decimal |
|---|---|---|
| √8 | 2√2 | 2.8284 |
| √12 | 2√3 | 3.4641 |
| √18 | 3√2 | 4.2426 |
| √20 | 2√5 | 4.4721 |
| √48 | 4√3 | 6.9282 |
| √72 | 6√2 | 8.4853 |
If you want to practise that step on its own, the Square Root Calculator simplifies a radical without the surrounding equation.
Vertex, Axis of Symmetry and the Parabola Graph
The vertex is the turning point, at h = −b / (2a) with k = f(h), and the axis of symmetry is the vertical line x = h through it. On the live graph the amber dashed line is that axis, the amber dot is the vertex, and the red dots mark the real roots where the parabola crosses the x-axis. When the discriminant is negative there are no red dots — the whole parabola sits on one side of the axis.
There is a useful check hiding in this: the axis of symmetry is always the midpoint of the two roots. For x² − 5x + 6 = 0 the roots 3 and 2 have midpoint 2.5, which is exactly the axis. For 2x² + 3x − 5 = 0 the roots 1 and −2.5 have midpoint −0.75, again the axis. It holds for complex roots too, where the axis equals their shared real part.
| Result | Formula | For x² − 5x + 6 = 0 |
|---|---|---|
| Discriminant | D = b² − 4ac | 1 |
| Vertex | h = −b / (2a), k = f(h) | (2.5, −0.25) |
| Axis of symmetry | x = −b / (2a) | x = 2.5 |
| y-intercept | (0, c) | (0, 6) |
| Sum of roots | r₁ + r₂ = −b / a | 5 |
| Product of roots | r₁ · r₂ = c / a | 6 |
| Vertex form | a(x − h)² + k | (x − 2.5)² − 0.25 |
| Factored form | a(x − r₁)(x − r₂) | (x − 3)(x − 2) |
Converting Standard Form to Vertex Form
Vertex form is a(x − h)² + k, and the calculator builds it from the same h and k it already computed — no completing the square by hand. The sign flips are where mistakes happen: a positive h shows as (x − h), a negative h as (x + |h|).
| Standard form | Vertex (h, k) | Vertex form |
|---|---|---|
| x² − 5x + 6 = 0 | (2.5, −0.25) | (x − 2.5)² − 0.25 |
| 2x² + 3x − 5 = 0 | (−0.75, −6.125) | 2(x + 0.75)² − 6.125 |
| x² − 6x + 5 = 0 | (3, −4) | (x − 3)² − 4 |
| 3x² − 12x + 7 = 0 | (2, −5) | 3(x − 2)² − 5 |
| x² − 4x + 4 = 0 | (2, 0) | (x − 2)² |
Note the last row: when the discriminant is zero, k is zero and the + k term disappears entirely, leaving a perfect square.
Complex Roots: When the Discriminant Is Negative
A negative discriminant means no real solution exists, and the two roots become complex conjugates — same real part, opposite imaginary parts. The real part is the axis of symmetry −b / (2a), and the imaginary part is √(−D) / (2a).
For x² − 2x + 5 = 0, D = −16, so the roots are 1 + 2i and 1 − 2i and the vertex sits at (1, 4) — four units above the x-axis, which is why nothing crosses it. For x² + x + 1 = 0, D = −3 gives −0.5 ± 0.866i, printed exactly as x = (−1 ± i√3) / 2.
x² − 2x + 5 = 0 the two conjugates sum to 2 (which is −b/a) and multiply to 5 (which is c/a), even though neither root is a real number. The sum and product readouts never stop working.Sum and Product of Roots: Checking an Answer in Seconds
Vieta’s formulas relate the roots to the coefficients directly: the roots always add to −b / a and multiply to c / a, whatever the discriminant does. That makes them the fastest hand-check available — solve, then confirm the pair.
For 2x² + 3x − 5 = 0 the roots 1 and −2.5 sum to −1.5 and multiply to −2.5, matching −b/a and c/a exactly. That same sum-and-product pair is what the Diamond Problem Calculator drills when you are learning to factor, and the factored form the calculator prints — (x − 3)(x − 2) for x² − 5x + 6 — is the end point of that same idea. When the discriminant is negative, the factored form is reported as not factorable over the real numbers, which is correct rather than an error.
