Skip to content

Quadratic Formula Calculator: Solve ax² + bx + c = 0

Solve any quadratic equation with the quadratic formula, including complex roots. Learn the discriminant, factoring checks and the vertex, with worked examples.

4 min read

A quadratic equation has the form ax² + bx + c = 0, where the highest power of x is 2. They describe the path of a thrown ball, the area of a shape with an unknown side and many profit and cost problems. Our quadratic formula calculator finds both roots, real or complex, and shows the discriminant. This guide explains the formula and what the results mean.

How to use the calculator

Enter the three coefficients:

  • a: the number in front of x² (cannot be 0)
  • b: the number in front of x
  • c: the constant term

The default equation is x² − 3x + 2 = 0 (a = 1, b = −3, c = 2). The roots are x₁ = 2 and x₂ = 1, and the discriminant is 1.

Make sure the equation equals zero first. For x² = 3x − 2, move everything to one side to get x² − 3x + 2 = 0.

The quadratic formula

The ± means there are usually two answers: one with + and one with −.

Example: x² − 3x + 2 = 0

  1. b² − 4ac = 9 − 8 = 1.
  2. √1 = 1.
  3. x = (3 ± 1) ÷ 2.
  4. x₁ = 4 ÷ 2 = 2, x₂ = 2 ÷ 2 = 1.

Check: 2² − 3 × 2 + 2 = 0 and 1² − 3 × 1 + 2 = 0. Both work.

The discriminant

The expression under the square root, b² − 4ac, is called the discriminant. It tells you what kind of roots to expect before you finish solving.

DiscriminantRoots
PositiveTwo different real roots
ZeroOne repeated real root
NegativeTwo complex roots (no real solutions)

Zero example: 2x² + 4x + 2 = 0. Discriminant = 16 − 16 = 0, so x = −4 ÷ 4 = −1 (a double root). The parabola just touches the x-axis.

Negative example: x² + 2x + 5 = 0. Discriminant = 4 − 20 = −16. The roots are (−2 ± 4i) ÷ 2 = −1 ± 2i, where i = √−1. The parabola never crosses the x-axis.

What the roots mean on a graph

The graph of y = ax² + bx + c is a U-shaped curve called a parabola. The real roots are where it crosses the x-axis. If a is positive the U opens upward; if a is negative it opens downward.

The turning point, or vertex, sits halfway between the roots at:

For x² − 3x + 2, the vertex is at x = 1.5, and y = 2.25 − 4.5 + 2 = −0.25.

Other ways to solve quadratics

  • Factoring: x² − 3x + 2 = (x − 2)(x − 1), so x = 2 or 1. Quick when the numbers are friendly, but not every quadratic factors neatly.
  • Completing the square: rewrite as (x − 1.5)² − 0.25 = 0. This is how the quadratic formula itself is derived.
  • Graphing: read the roots off a plotted curve, which is good for estimates.

The quadratic formula always works, which is why it is the method of choice in calculators.

Real-world examples

Projectile motion. A ball thrown upward at 20 m/s from 1.5 m high has height h = −4.9t² + 20t + 1.5. Setting h = 0 and solving gives t ≈ 4.15 seconds until it lands (the negative root is ignored).

Area problems. A rectangle is 3 m longer than it is wide and has an area of 40 m². Then w(w + 3) = 40, or w² + 3w − 40 = 0. The roots are 5 and −8, so the width is 5 m and the length 8 m.

Break-even. If profit is −2x² + 40x − 150 for x units, setting it to zero gives x = 5 and x = 15. Between these, the business makes a profit.

Tips

  • Watch signs carefully, especially when b is negative: −b becomes positive.
  • Divide all coefficients by a common factor first to keep numbers small.
  • For related algebra, the exponent calculator and root calculator help with powers and square roots, and the slope calculator handles straight lines.

Frequently asked questions

What if a is zero?

Then the equation is not quadratic but linear (bx + c = 0), with the single solution x = −c ÷ b.

What are complex roots?

Solutions involving i, the square root of −1. They occur when the discriminant is negative, meaning the parabola does not cross the x-axis.

Can a quadratic have only one root?

Yes, when the discriminant is zero. The single root is repeated, and the vertex sits on the x-axis.

Do I need to rearrange my equation first?

Yes. Get everything on one side so the other side is zero, then read off a, b and c.

Share

Try it yourself

Run your own numbers with our free tool: Quadratic formula calculator. No sign-up, and it works on any device.

Open the calculator