Skip to content
CalcWorld

Browse all tools

Quadratic Formula Calculator

This quadratic formula calculator solves ax² + bx + c = 0 and shows every step. For 2x² + 4x − 4 = 0 the discriminant is 48 and the roots are x = −1 ± √3, about 0.732 and −2.732.

Sources: OpenStax Algebra and Trigonometry 2e Updated

ax² + bx + c = 0

Solutions of x2 − 3x + 2 = 0

x = 2 or x = 1

Two real solutions.

Discriminant
1
Vertex
(1.5, −0.25)
Opens
upward (a is positive)
x0.625−0.3150.62.4x = 2x = 1vertex
Show steps Here’s how we got it
  1. Read off a, b and c

    x2 − 3x + 2 = 0

    a = 1, b = −3, c = 2

    The equation has to be in the form ax2 + bx + c = 0.

  2. Work out the discriminant

    b2 − 4ac = (−3)2 − 4 × 1 × 2

    = 9 − 8 = 1

    It is positive, so there are two different real solutions.

  3. Put the numbers into the quadratic formula

    x = −b ± √(b2 − 4ac)/2a = 3 ± √1/2

  4. Take the square root, then use + and − in turn

    √1 = 1

    x1 = 3 + 1/2 = 4/2 = 2

    x2 = 3 − 1/2 = 2/2 = 1

  5. Check one solution

    1 × 22 + (−3) × 2 + 2 = 0

    Putting a solution back into the equation should give 0.

The quadratic formula

x=−b±b2−4ac2afor ax2+bx+c=0, a≠0x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \qquad \text{for } ax^2 + bx + c = 0,\ a \neq 0

The part under the square root, b2−4acb^2 - 4ac, is the discriminant. Work it out first: as OpenStax Algebra and Trigonometry explains, it tells you how many solutions to expect before you do the rest.

DiscriminantSolutionsGraph
PositiveTwo different real solutionsCrosses the x-axis twice
ZeroOne repeated real solutionTouches the x-axis at the vertex
NegativeTwo complex solutionsNever meets the x-axis

The vertex of the parabola is at x=−b2ax = -\frac{b}{2a}, halfway between the two solutions when they are real.

How to solve a quadratic equation with the formula

Solve 2x² + 4x − 4 = 0. The discriminant is not a perfect square, so the exact answers contain a square root.

  1. Read off a, b and c

    2x2 + 4x − 4 = 0

    a = 2, b = 4, c = −4

    The equation has to be in the form ax2 + bx + c = 0.

  2. Work out the discriminant

    b2 − 4ac = 42 − 4 × 2 × (−4)

    = 16 − (−32) = 48

    It is positive, so there are two different real solutions.

  3. Put the numbers into the quadratic formula

    x = −b ± √(b2 − 4ac)/2a = −4 ± √48/4

  4. Take the square root, then use + and − in turn

    √48 = 4√3 ≈ 6.928203

    x = −1 ± √3 (exact form)

    x1 = −4 + 6.928203/4 ≈ 0.732051

    x2 = −4 − 6.928203/4 ≈ −2.732051

  5. Check one solution

    2 × 0.7320512 + 4 × 0.732051 + (−4) ≈ 0

    Putting a solution back into the equation should give 0 (here only approximately, because the solution is rounded).

Answer: x ≈ 0.732051 or x ≈ −2.732051 Two real solutions.

xy15−7.56−4.122.12x = 0.732x = −2.732vertex
Quadratic formula example: the parabola y = 2x² + 4x − 4 with vertex (−1, −6), axis of symmetry x = −1 and roots −2.732 and 0.732, each √48 ÷ 4 = 1.732 from the axis.
The ± in the formula is the step either side of the axis of symmetry: −b ÷ 2a = −1, plus or minus √48 ÷ 4.

The exact answer simplifies because √48 = √(16 × 3) = 4√3, and 4√3 ÷ 4 = √3. The square root calculator simplifies roots like this for any whole number.

What the discriminant does to the graph

Keep a = 2 and b = 4 from the example and change only c. The parabola keeps its shape and moves up as c grows, and the discriminant 16 − 8c falls with it.

Three parabolas 2x² + 4x + c: c = −4 gives discriminant 48 and two roots, c = 2 gives 0 and one root, c = 6 gives −32 and no real roots.
Raising c lifts the parabola. When the discriminant drops below zero it no longer reaches the x-axis.

At c = 2 the parabola just touches the axis at x = −1, the single repeated root. To draw your own equations, use the graph generator.

Factoring instead of the formula

When the roots are whole numbers, factoring is often quicker. For x² + x − 6 = 0, look for two numbers that multiply to −6 and add to 1: 3 and −2, so (x + 3)(x − 2) = 0 and x = −3 or x = 2. The factor calculator lists the factor pairs to try.

The formula works every time, including when the roots are irrational or complex, which is why the calculator always uses it.

Quadratic formula practice question

Solve x² − 5x + 6 = 0 with the quadratic formula.

Check your answer

Answer: x = 3 or x = 2 Two real solutions.

  1. Read off a, b and c

    x2 − 5x + 6 = 0

    a = 1, b = −5, c = 6

    The equation has to be in the form ax2 + bx + c = 0.

  2. Work out the discriminant

    b2 − 4ac = (−5)2 − 4 × 1 × 6

    = 25 − 24 = 1

    It is positive, so there are two different real solutions.

  3. Put the numbers into the quadratic formula

    x = −b ± √(b2 − 4ac)/2a = 5 ± √1/2

  4. Take the square root, then use + and − in turn

    √1 = 1

    x1 = 5 + 1/2 = 6/2 = 3

    x2 = 5 − 1/2 = 4/2 = 2

  5. Check one solution

    1 × 32 + (−5) × 3 + 6 = 0

    Putting a solution back into the equation should give 0.

Questions about the quadratic formula

What is the quadratic formula?

For an equation ax² + bx + c = 0 with a not equal to 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. The ± means you work it out twice, once with plus and once with minus.

How do you use the quadratic formula?

Write the equation so that one side is 0, read off a, b and c, work out b² − 4ac and take its square root. Then calculate (−b plus the root) ÷ 2a and (−b minus the root) ÷ 2a.

For x² − 3x + 2 = 0: the discriminant is 9 − 8 = 1, so x = (3 + 1) ÷ 2 = 2 or x = (3 − 1) ÷ 2 = 1.

What does the discriminant tell you?

The discriminant is b² − 4ac. If it is positive there are two different real solutions. If it is zero there is one repeated real solution. If it is negative there are no real solutions, only two complex ones.

Can the quadratic formula give imaginary numbers?

Yes, when the discriminant b² − 4ac is negative. The square root of a negative number is written with i, where i² = −1, so the two solutions are a complex pair. For x² + 2x + 5 = 0 the discriminant is −16 and x = −1 ± 2i, and the graph of the parabola does not cross the x-axis.

What if a is 0?

Then there is no x² term and the equation is linear, bx + c = 0, with the single solution x = −c ÷ b. The quadratic formula does not apply because it would divide by zero.

What is the difference between the quadratic equation and the quadratic formula?

The quadratic equation is the problem, ax² + bx + c = 0. The quadratic formula is one way to solve it. Factoring and completing the square are others, and they give the same solutions.

Sources