Quadratic Formula Calculator

Solve ax² + bx + c = 0 with the quadratic formula: exact roots (fractions and simplified square roots), decimals, complex roots, the discriminant and the vertex, with every step and the graph.

2x² − 4x − 6 = 0

Answer

2x² − 4x − 6 = 0

x = 3 or −1

Discriminant b² − 4ac64
Real roots2
Decimal3, −1
Vertex(1, −8)
Factored2(x + 1)(x − 3)

The parabola

−2024−10010x = −b/2a = 1−2+2−13Δ = b² − 4ac = 64y =2x² +−4x +−6

Drag the blue vertex to move the parabola, the orange handle to change its shape (a), or the green y-intercept to change c; click a, b or c in the equation to type. The roots are where the curve crosses the x-axis. They sit at the same distance on either side of the axis of symmetry (dashed), x = −b/2a.

Why this answer

  1. The formula: x = (−b ± √(b² − 4ac)) ÷ 2a.
  2. Discriminant: b² − 4ac = −4² − 4 × 2 × −6 = 64. Positive: two real roots.
  3. Plug in: x = (4 ± √64) ÷ 4 = (4 ± 8) ÷ 4.
  4. Answer: x = 3 and x = −1. Check: the roots add to −b/a = 2 and multiply to c/a = −3.

Why it works

Where does the quadratic formula come from?

x²3x3x?x3x3

Step 1 of 3

Complete the square

Picture x² as a square and split 6x into two strips of 3x along two sides.

Which area fills the missing corner and makes one big square?

Pick the area and check.

Put it to use

Where quadratics show up

Anything thrown or launched follows a parabola: the height of a ball after t seconds is about −16t² + v₀t + h₀ (in feet), and solving for height 0 gives when it lands. Quadratics also appear in areas (a rectangle 3 ft longer than wide with area 40 ft²: w² + 3w − 40 = 0, so w = 5), in profit problems (price × quantity), and in physics and engineering. If the roots are whole numbers, the Factoring Calculator shows the factored form.

How it works

The quadratic formula calculator solves any equation of the form ax² + bx + c = 0. It gives the roots exactly (as fractions or simplified square roots, or complex numbers when there are no real roots) and as decimals, along with the discriminant, the vertex and the factored form when the roots are rational.

The quadratic formula x = (−b ± √(b² − 4ac)) / 2a comes from completing the square. The discriminant b² − 4ac tells you what to expect: positive means two real roots, zero means one double root, and negative means two complex roots (the parabola never touches the x-axis).

The graph shows the parabola with its roots, its vertex at x = −b/2a and the axis of symmetry halfway between the roots.

x = (−b ± √(b² − 4ac)) / 2aDiscriminant D = b² − 4acVertex: x = −b/2a, y = c − b²/4aSum of roots = −b/a; product of roots = c/a

Worked example: Solve 2x² − 4x − 6 = 0

  1. a = 2, b = −4, c = −6.
  2. Discriminant: (−4)² − 4 × 2 × (−6) = 16 + 48 = 64.
  3. x = (4 ± √64) / 4 = (4 ± 8) / 4.
  4. So x = 3 or x = −1, and the factored form is 2(x + 1)(x − 3).

Common mistakes

  • Forgetting that −b flips the sign of b (for b = −4, −b is +4).
  • Dividing only the square-root part by 2a instead of the whole numerator.
  • Using the formula before rearranging the equation to equal 0.
  • Stopping at a negative discriminant: there are no real roots, but there are two complex ones.

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) / 2a. The ± gives the two solutions.

What does the discriminant tell you?

b² − 4ac > 0: two real roots; = 0: one repeated root; < 0: no real roots, two complex roots.

How do I solve x² − 5x + 6 = 0?

a = 1, b = −5, c = 6: x = (5 ± √(25 − 24)) / 2 = (5 ± 1) / 2, so x = 3 or x = 2. It also factors as (x − 2)(x − 3).

Where does the quadratic formula come from?

From completing the square: divide by a, move c over, add (b/2a)² to both sides to make a perfect square, then take the square root of both sides.

What are complex roots?

When b² − 4ac is negative, the square root involves i = √−1. For x² + 2x + 5 = 0 the roots are −1 ± 2i; the parabola doesn't cross the x-axis.