Quadratic Equation Calculator
Enter the three coefficients of a quadratic equation and this tool solves it completely: the roots, the discriminant that predicts them, the vertex of the parabola, and the factored form when one honestly exists. What sets it apart is how the roots are printed — exactly, not as rounded decimals: rational roots in full, irrational roots in simplified radical form like 2 − √3 with the decimal beside them, and complex roots as a clean a ± bi pair.
If a turns out to be 0, the tool says so and solves the linear equation instead of pretending the quadratic formula applies.
Solving ax² + bx + c = 0 — enter the three coefficients:
Two real roots — both exact
Root 1 (x₁)
x = 2
Root 2 (x₂)
x = 3
Discriminant (D = b² − 4ac)
1
Positive: two real roots. Zero: one repeated root. Negative: complex roots.
Vertex of the parabola
(2.5, -0.25)
Factored form
(x − 2)(x − 3) = 0
Printed only when both roots are rational — never faked for irrational roots.
How it is worked out
- D = b² − 4ac = (-5)² − 4 × 1 × 6 = 1.
- D > 0 and √D = 1 exactly, so both roots are rational: x = (−b ± √D) ÷ 2a.
- x = 2 or x = 3.
- Factored form: (x − 2)(x − 3) = 0.
Embed this calculator on your website →
The formula
x = (−b ± √(b² − 4ac)) ÷ 2a · D = b² − 4ac
- the discriminant decides — D above zero: two distinct real roots. D exactly zero: one repeated root. D below zero: no real roots — a complex conjugate pair instead.
- exact printing — coefficients and D are exact fractions. When √D is rational, both roots are exact fractions. When it is not, √D is reduced by its square factors and the roots print in the canonical (u ± k√m) ÷ L form, reduced by the common factor, with 10-decimal values beside them.
- factored form — printed only when both roots are rational. For irrational roots an honest factored form would need the radicals inside the brackets, so the tool shows the radical roots and leaves the factored line out rather than faking tidy factors.
- vertex — the parabola's turning point, at x = −b ÷ 2a.
Worked example: x² − 5x + 6 = 0 has D = 25 − 24 = 1, so x = (5 ± 1) ÷ 2 = 2 or 3, factored form (x − 2)(x − 3) = 0, vertex (2.5, −0.25) — the default in the tool above.
How it works
Where the formula comes from. Completing the square on ax² + bx + c = 0 rearranges the equation into (x + b/2a)² = (b² − 4ac) / 4a²; taking the square root of both sides is exactly the quadratic formula. The discriminant is the quantity under that root, which is why its sign alone settles how many real roots exist before any root is computed.
What the roots mean. The roots are the x-values where the parabola crosses the x-axis — where the expression equals zero. A repeated root means the parabola just touches the axis at its vertex; complex roots mean it never reaches the axis at all.
Examples
- x² − 2 = 0 — roots −√2 and √2 ≈ ±1.4142135624: exact radical form, not a truncated decimal pretending to be the answer.
- x² − 4x + 1 = 0 — roots 2 − √3 and 2 + √3, the (u ± k√m) form with everything reduced.
- x² + 1 = 0 — D = −4, roots −i and i.
- 2x² + 3x − 2 = 0 — roots −2 and 0.5, factored form (x + 2)(2x − 1) = 0.
Frequently asked questions
What does the discriminant tell me before I solve?
Everything about the shape of the answer. Positive: two different real roots. Zero: the two roots merge into one repeated root. Negative: no real roots at all — the solutions are a complex pair a + bi and a − bi. It is computed exactly here, so a discriminant of zero really is zero, not a rounding artefact.
Why are some roots shown with √ signs instead of decimals?
Because the decimal never ends. √2 = 1.4142135624… continues forever without repeating, so any decimal is an approximation. The radical form is the exact answer; the tool prints it first and puts the 10-decimal approximation beside it for estimating.
Why is there no factored form for some equations?
Factoring over the rationals only works when both roots are rational. With irrational roots the factors would contain radicals — (x − (2 − √3))(x − (2 + √3)) — which is just the roots restated. Rather than dress that up as a factorisation, the tool prints the factored form only when it is genuinely informative.
What happens if I enter a = 0?
Then the equation is not a quadratic at all — it is the linear equation bx + c = 0, and the tool says so and solves that instead (x = −c ÷ b). If b is also 0, it states the truth of the situation: the equation is either an identity (every x works, when c = 0 too) or a contradiction (no x works).
Can coefficients be decimals or fractions like 0.5?
Decimals yes — enter 0.5, −1.25, and so on; they are parsed as exact decimals, so 0.5x² − 1.5x + 1 = 0 gives exact roots 1 and 2 with factored form 0.5(x − 1)(x − 2). Type fractions as decimals (0.333…) only if you accept the decimal you typed is the number being solved.
Related calculators
Math Helpers
LiveThe everyday operations in one place: percentage of a number, powers, square and cube roots, factorials, and logarithms — each with its rule stated.
Slope Calculator
LiveSlope, distance, midpoint, intercepts, and the line's equation in three forms from two points — all exact, with vertical lines stated honestly.
Fractions Calculator
LiveAdd, subtract, multiply, divide, simplify, and compare fractions with steps.

