Quadratic Formula Calculator

Enter a, b and c from ax² + bx + c = 0 to get the exact roots, decimals and a graph, with every step of the quadratic formula. For example, x² − 5x + 6 = 0 has roots x = 2 or x = 3.

  • Free
  • No sign-up
  • Shows the working
  • Works on phones

Whole numbers, decimals, negatives or fractions like 1/2. Use 0 for a missing term.

Try:
Roots (solutions)
x = 1 ± √5≈ −1.236068 or 3.236068
−1.2363.236 vertex (1, −5)
y = x² − 2x − 4
Discriminant D
20
Roots as decimals
−1.236068 and 3.236068
Vertex
(1, −5)
Axis of symmetry
x = 1
Opens
Upward (a > 0)
Y-intercept
(0, −4)
Factored form
Roots are irrational, so it does not factor over whole numbers or fractions
Vertex form
y = (x − 1)² − 5

Step by step

  1. Write the equation as ax² + bx + c = 0: x² − 2x − 4 = 0, so a = 1, b = −2, c = −4.
  2. Quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a.
  3. Discriminant: D = b² − 4ac = (−2)² − 4 × 1 × (−4) = 4 − (−16) = 20. D > 0, so there are two different real roots.
  4. Substitute: x = (−(−2) ± √20) ÷ (2 × 1).
  5. Simplify the square root: √20 = 2√5.
  6. x = (2 ± 2√5) ÷ 2 = 1 ± √5
  7. As decimals: x ≈ −1.236068 and x ≈ 3.236068.

Vertex: x = −b ÷ 2a = 1, then y = c − b² ÷ 4a = −5.

How to use the quadratic formula

  1. Rearrange the equation so one side is 0 and read off a, b and c from ax² + bx + c = 0.
  2. Work out the discriminant D = b² − 4ac to see how many real roots there are.
  3. Substitute into x = (−b ± √D) ÷ 2a.
  4. Simplify the square root and divide through by any common factor to get the exact roots.
  5. Use + for one root and − for the other, and round to decimals if needed.

What is the quadratic formula?

The quadratic formula solves any quadratic equation, an equation where the highest power of x is 2. Write the equation in standard form, ax² + bx + c = 0 with a ≠ 0, and the solutions (also called roots or zeros) are:

x = (−b ± √(b² − 4ac)) ÷ 2a

The ± means there are usually two answers: one using + and one using −. The roots are the x-values where the parabola y = ax² + bx + c crosses the x-axis.

How do you use the quadratic formula?

Take 2x² − x − 3 = 0, so a = 2, b = −1 and c = −3.

  1. Discriminant: D = (−1)² − 4 × 2 × (−3) = 1 + 24 = 25.
  2. Substitute: x = (1 ± √25) ÷ 4 = (1 ± 5) ÷ 4.
  3. Split the ±: x = 6 ÷ 4 = 3/2 or x = −4 ÷ 4 = −1.

So the roots are x = −1 or x = 3/2 (−1 and 1.5). Because 25 is a perfect square, the roots are rational and the quadratic factors: 2x² − x − 3 = (x + 1)(2x − 3).

What does the discriminant tell you?

The discriminant is the part under the square root, D = b² − 4ac. You can read the type of answer from it before doing anything else.

  • D > 0 and a perfect square: two different rational roots, and the quadratic factors.
  • D > 0 but not a perfect square: two different irrational roots, written with a square root such as 1 ± √5.
  • D = 0: one repeated root. The vertex sits on the x-axis.
  • D < 0: no real roots. The parabola misses the x-axis, and the roots are complex numbers p ± qi.

Examples

EquationDRoots
x² − 5x + 6 = 01x = 2 or x = 3
x² − 9 = 036x = −3 or x = 3
2x² − x − 3 = 025x = −1 or x = 3/2 (−1 and 1.5)
x² − 2x − 4 = 020x = 1 ± √5 ≈ −1.236068 or 3.236068
x² − 6x + 9 = 00x = 3 (double root)
x² + 2x + 5 = 0−16x = −1 ± 2i ≈ −1 ± 2i
3x² + x + 1 = 0−11x = (−1 ± i√11)/6 ≈ −0.166667 ± 0.552771i
−x² + 4x = 016x = 0 or x = 4

Vertex and axis of symmetry

Every parabola is symmetric about a vertical line through its vertex. The axis of symmetry is x = −b ÷ 2a, which is also the average of the two roots. Substitute that x into the equation to get the y-coordinate of the vertex. If a > 0 the parabola opens upward and the vertex is the minimum point; if a < 0 it opens downward and the vertex is the maximum.

vertex = (−b ÷ 2a, c − b² ÷ 4a)

Common mistakes

  • Not setting the equation to 0 first. For x² + 3x = 10, rewrite it as x² + 3x − 10 = 0, so c = −10.
  • Squaring a negative b wrongly. If b = −4, then b² = 16, not −16. Brackets help: (−4)² = 16.
  • Dividing only part of the top by 2a. The whole of −b ± √D is divided by 2a.
  • Forgetting the second root. Use both + and −.
  • Leaving the radical unsimplified. √20 should become 2√5 before you cancel common factors.

If the discriminant is a perfect square, factoring may be quicker. The factor calculator lists factor pairs of ac to help.

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any quadratic equation written as ax² + bx + c = 0, as long as a is not 0.

What does the discriminant tell you?

The discriminant D = b² − 4ac tells you how many real solutions there are. If D > 0 there are two real roots, if D = 0 there is one repeated root, and if D < 0 there are no real roots, only two complex roots.

How do you know if a quadratic can be factored?

A quadratic with whole-number or fraction coefficients factors over the rational numbers exactly when its discriminant is a perfect square. For x² − 5x + 6, D = 25 − 24 = 1, which is a perfect square, so it factors as (x − 2)(x − 3).

What are complex roots?

Complex roots appear when the discriminant is negative. They come as a pair p ± qi, where i = √−1. For x² + 2x + 5 = 0, D = −16, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.

What if a = 0?

If a = 0 there is no x² term, so the equation is linear, not quadratic. Solve bx + c = 0 directly: x = −c ÷ b. The calculator spots this and solves the linear equation instead.

How do you find the vertex of a parabola?

The vertex is at x = −b ÷ 2a. Put that x back into the equation to get the y-coordinate. For y = x² − 2x − 4, x = 2 ÷ 2 = 1 and y = 1 − 2 − 4 = −5, so the vertex is (1, −5).

How do you simplify the square root in the answer?

Pull out the largest perfect square factor: √20 = √(4 × 5) = 2√5. Then divide every term by any common factor. The square root calculator shows this step on its own.

Last reviewed November 27, 2026 by the ChalkStation team.