webby.tools

Quadratic Formula Calculator

Enter the coefficients a, b, and c for the equation ax² + bx + c = 0 to find the roots, vertex, discriminant, and step-by-step solution. Works for all real and complex roots.

ax² + bx + c = 0

The Quadratic Formula

For any equation of the form ax² + bx + c = 0 (where a ≠ 0), the two roots are given by:

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

The ± symbol means you compute the formula twice — once with addition and once with subtraction — giving you two roots, x₁ and x₂.

Understanding the Discriminant

The expression under the square root, b² − 4ac, is called the discriminant. It tells you how many and what kind of roots the equation has:

  • Discriminant > 0 — Two distinct real roots. The parabola crosses the x-axis at two points.
  • Discriminant = 0 — One repeated real root (a double root). The parabola just touches the x-axis.
  • Discriminant < 0 — Two complex (imaginary) roots. The parabola does not cross the x-axis.

The Vertex of the Parabola

The quadratic equation ax² + bx + c describes a parabola. Its vertex — the highest or lowest point — is located at:

x_vertex = −b / (2a)     y_vertex = c − b² / (4a)

The vertex x-coordinate is also the average of the two roots. If you need to calculate angles or sides in triangles alongside algebra, see the Pythagorean theorem calculator.

Worked Example

Solve: x² − 5x + 6 = 0 (a = 1, b = −5, c = 6)

  1. Discriminant: (−5)² − 4(1)(6) = 25 − 24 = 1
  2. √discriminant = √1 = 1
  3. x₁ = (5 + 1) / 2 = 3
  4. x₂ = (5 − 1) / 2 = 2

The roots are x = 3 and x = 2, which means the equation factors as (x − 3)(x − 2) = 0.

Frequently Asked Questions

What if a = 0?

If a = 0, the equation is no longer quadratic — it becomes a linear equation bx + c = 0, solved simply as x = −c/b. The quadratic formula requires a ≠ 0.

What are complex roots?

When the discriminant is negative, you must take the square root of a negative number, which produces an imaginary result. Complex roots come in conjugate pairs: x = (−b ± i√|Δ|) / (2a), where i = √(−1). Complex roots occur in equations like x² + 1 = 0, which has no real solutions.

Can I use this for projectile motion or other physics problems?

Yes. Projectile height equations like h(t) = −16t² + v₀t + h₀ are quadratic in time. Setting h(t) = 0 and solving with the quadratic formula gives the time when the object hits the ground.

How do I check my answer?

Substitute each root back into the original equation. If the result equals zero, the root is correct. You can also verify that x₁ + x₂ = −b/a and x₁ × x₂ = c/a (Vieta's formulas).

This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.