Quadratic Equation Calculator
Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula — real or complex roots, discriminant, vertex and axis of symmetry.
Loading calculator…
What this tool does
Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula — real or complex roots, discriminant, vertex and axis of symmetry. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
How to use the Quadratic Equation Calculator
- Enter or select coefficient a (x²).
- Enter or select coefficient b (x).
- Enter or select constant c.
- Read the calculated result; change any measurement to compare alternatives.
Formula
x = (−b ± √(b² − 4ac)) / 2a. The discriminant D = b² − 4ac decides the roots: D > 0 two real roots, D = 0 one repeated root, D < 0 a complex conjugate pair. The vertex sits at x = −b/2a.
- a
- Coefficient a (x²)
- b
- Coefficient b (x)
- c
- Constant c
Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
Worked example
For quadratic equation calculator, the following measurements illustrate the exact method: Coefficient a (x²): 1; Coefficient b (x): -5; Constant c: 6.
Inputs
- Coefficient a (x²)1
- Coefficient b (x)-5
- Constant c6
Result
- Root 1 (x₁)3
- Root 2 (x₂)2
- Discriminant (b² − 4ac)1
- Vertex x2.5
- Vertex y-0.25
- Axis of symmetryx = 2.5
- Root typeTwo distinct real roots
Results explained
- Root 1 (x₁)
- Root 1 (x₁) from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Root 2 (x₂)
- Root 2 (x₂) from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Discriminant (b² − 4ac)
- Discriminant (b² − 4ac) from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Vertex x
- Vertex x from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Vertex y
- Vertex y from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Axis of symmetry
- Axis of symmetry from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
- Root type
- Root type from the formula above. Coefficient a must be nonzero — with a = 0 the equation is linear, not quadratic. Roots are shown exactly as decimals or in a ± bi complex form.
Frequently asked questions
Put the equation in the form ax² + bx + c = 0, read off a, b and c, and substitute into x = (−b ± √(b² − 4ac)) / 2a. For x² − 5x + 6 = 0 that gives x = (5 ± √(25 − 24)) / 2 = (5 ± 1)/2, so x = 3 or x = 2.
The discriminant D = b² − 4ac sits under the square root. If D > 0 the parabola crosses the x-axis twice (two real roots), if D = 0 it touches at exactly one point (a repeated root), and if D < 0 it never crosses — the roots are a complex conjugate pair like 2.5 ± 1.5i.
The vertex x-coordinate is x = −b/(2a); substitute it back into the equation for y. For x² − 5x + 6 the vertex is at (2.5, −0.25). If a > 0 the vertex is the parabola's minimum, if a < 0 its maximum, and x = −b/(2a) is also the axis of symmetry.
Yes. When the discriminant is negative the calculator returns both complex roots in a ± bi form instead of an error — for example x² + 4x + 13 = 0 has roots −2 + 3i and −2 − 3i. Most physical problems discard complex roots, but they are the correct algebraic answer.
If a = 0 the x² term disappears and the equation becomes bx + c = 0, a linear equation with the single solution x = −c/b. Use the Linear Equation Calculator for that case.
Factoring works neatly only when the roots are rational — x² − 5x + 6 = (x − 2)(x − 3). The quadratic formula always works, including for irrational roots like x² − 2 = 0 (x = ±√2 ≈ ±1.414) and for complex roots, which is why this calculator uses it.