How to use this quadratic formula calculator
Write your equation as ax² + bx + c = 0 and enter the three coefficients. You get the roots (real or complex), the discriminant, the sum and product of the roots, the vertex and axis of symmetry, and the working. If the roots are rational the factored form is shown. Runs in your browser.
The quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the root, D = b² − 4ac, is the discriminant. For x² − 5x + 6 = 0:
- Discriminant D = b² − 4ac = -5² − 4 × 1 × 6 = 1, so there are two real roots.
- x = (−b ± √D) ÷ 2a = (5 ± √1) ÷ 2.
- x₁ = 2 and x₂ = 3.
- The roots are rational, so it factors: (x − 2)(x − 3) = 0.
- Vertex: x = −b ÷ 2a = 2.5, y = -0.25; the parabola opens upwards. It crosses the y-axis at (0, 6).
The equation x² − 5x + 6 = 0 has two real roots: 2 and 3.
What the discriminant tells you
If D is positive there are two real roots; if it is zero there is one repeated root, like x² + 2x + 1 = 0 (The equation x² + 2x + 1 = 0 has one repeated real root: x = -1.); if it is negative the roots are complex conjugates, like x² + 2x + 5 = 0: The equation x² + 2x + 5 = 0 has no real roots; the two complex roots are -1 + 2i and -1 − 2i. The parabola touches the x-axis at the real roots.
Factoring and the vertex
When the discriminant is a perfect square the quadratic factors over the rationals: 2x² − 3x − 2 gives roots x₁ = -0.5, x₂ = 2. The vertex lies at x = −b ÷ 2a, halfway between the roots, and the axis of symmetry is the vertical line through it. See also the square root calculator and the factor calculator.
Quadratic formula calculator FAQ
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ 2a, the solution of ax² + bx + c = 0.
What is the discriminant?
b² − 4ac. Positive: two real roots; zero: one; negative: two complex roots.
What if a is zero?
Then it is not quadratic; the equation is linear and x = −c ÷ b. The calculator handles it.
How do I solve x² − 5x + 6 = 0?
The roots are 2 and 3 because the discriminant is 1 and (5 ± 1) ÷ 2 gives them.
How do I find the vertex?
x = −b ÷ 2a, then substitute into the equation to get y.
What are complex roots?
Roots with an imaginary part, written a ± bi, where i is the square root of −1.