Quadratic Equation Solver

A quadratic equation has the form ax² + bx + c = 0. This quadratic equation solver uses the discriminant and the quadratic formula to find the roots exactly, simplifying square roots where possible. It handles rational, irrational and complex roots, and also gives the vertex and axis of symmetry of the parabola.

Try:

How to use the quadratic equation solver

  1. Rearrange your equation to ax² + bx + c = 0.
  2. Enter a, b and c (fractions and decimals are fine).
  3. Press Calculate to see the roots, discriminant and vertex.

Formula

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Δ=b2−4ac\Delta = b^2 - 4ac

Worked example: x² − 5x + 6 = 0

  • a (x² coefficient): 1
  • b (x coefficient): -5
  • c (constant): 6

✓ Answer checked

x=2  or  x=3x = 2 \;\text{or}\; x = 3
Roots
Two different rational roots
Discriminant
Δ=1\Delta = 1
Vertex
(52,  −14)\left(\frac{5}{2},\; -\frac{1}{4}\right)
Axis of symmetry
x=52x = \frac{5}{2}
−112345651015x = 2x = 3vertex (2.5, -0.25)y = ax² + bx + c
The parabola crosses the x-axis at the roots. The dashed line is the axis of symmetry x = 2.5.
Step-by-step working (6 steps)
  1. Write the equation

    Make sure it is in the form ax² + bx + c = 0.

    x2−5x+6=0x^{2} - 5x + 6 = 0
  2. Identify a, b and c

    Compare with ax² + bx + c = 0.

    a=1,  b=−5,  c=6a = 1,\; b = -5,\; c = 6
  3. Work out the discriminant Discriminant

    The discriminant tells you how many real solutions there are.

    Δ=b2−4ac=(−5)2−4(1)(6)=1\Delta = b^2 - 4ac = (-5)^2 - 4(1)(6) = 1
  4. Use the quadratic formula Quadratic formula

    Substitute a, b and the discriminant into the formula.

    x=5±12x = \frac{5 \pm \sqrt{1}}{2}
  5. Simplify

    The discriminant is a perfect square, so the roots are rational.

    x=5±12x = \frac{5 \pm 1}{2}
  6. Two solutions

    Take the + and − signs separately.

    x1=2,x2=3x_1 = 2, \quad x_2 = 3
Formulas used
x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Δ=b2−4ac\Delta = b^2 - 4ac
How this was checked
  • ✓ Substituting each root into the equation gives exactly 0.
  • ✓ Sum of roots = −b/a and product = c/a (Vieta's formulas).

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) / 2a. It gives the solutions of any quadratic equation ax² + bx + c = 0.

What does the discriminant tell me?

If b² − 4ac is positive there are two real roots, if it is zero there is one repeated root, and if it is negative the roots are complex.

What are complex roots?

When the discriminant is negative, the roots involve i, where i² = −1. For x² + 2x + 5 = 0 the roots are −1 ± 2i.

Related calculators

Related guides