Quadratic Equation Calculator Icon

Quadratic Equation Calculator

Solve any quadratic equation of the form ax² + bx + c = 0

  • Created by John Harris
  • Reviewed by Ramesh Agarwal
  • Last updated 1st May 2026

Equation

Discriminant (b² - 4ac)

Root x₁

Root x₂

Solution type

What is a quadratic equation?

A quadratic equation is any equation of the form ax² + bx + c = 0, where a, b, and c are real numbers and a ≠ 0. Solving it means finding the values of x that make the equation true — these are called the roots, the solutions, or the zeros of the equation. Geometrically, the roots are the points where the parabola y = ax² + bx + c crosses the x-axis.

The quadratic formula

The quadratic formula gives the roots of any quadratic equation:

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

The ± means there are typically two solutions: one using the plus sign, one using the minus sign. The expression under the square root, b² - 4ac, is called the discriminant — and it tells you everything you need to know about the nature of the roots before you finish the calculation.

The discriminant explained

The discriminant D = b² - 4ac determines how many real roots the equation has:

  • D > 0: two distinct real roots — the parabola crosses the x-axis twice.
  • D = 0: one repeated real root — the parabola just touches the x-axis at its vertex.
  • D < 0: no real roots — the parabola does not cross the x-axis. Instead, you get a pair of complex conjugate roots of the form p ± qi.

This calculator detects which case applies and labels the solution type so you know exactly what kind of roots you are looking at.

Worked example

Solve x² - 5x + 6 = 0. Here a = 1, b = -5, c = 6.

Discriminant = (-5)² - 4(1)(6) = 25 - 24 = 1. Positive, so two distinct real roots.

x = (5 ± √1) / 2 = (5 ± 1) / 2.

x₁ = (5 + 1) / 2 = 3, x₂ = (5 - 1) / 2 = 2.

Other ways to solve a quadratic

Factoring: If the quadratic factors into (x - p)(x - q) = 0, then the roots are simply x = p and x = q. This works neatly when the roots are integers or simple fractions, but most quadratics in the real world do not factor cleanly.

Completing the square: Rewrite the quadratic in the form a(x - h)² = k and solve for x by taking the square root of both sides. This is also how the quadratic formula is derived.

Graphing: Plot y = ax² + bx + c and read the roots from where the curve crosses the x-axis. This gives you a visual feel for the equation but is less precise than the formula.

The quadratic formula is the most general method — it always works, regardless of whether the roots are nice integers, ugly irrationals, or complex numbers.

Where quadratics appear

Quadratics turn up everywhere in science and engineering:

  • Projectile motion: the height of a thrown ball over time is quadratic.
  • Geometry: the area of a square scales with the square of its side length.
  • Optics: the focal length of a parabolic mirror is governed by a quadratic.
  • Finance: some compound-growth and break-even calculations reduce to quadratics.
  • Engineering: deflection of a beam under load, frequency of a tuned circuit, and many other problems give rise to quadratics.

Mastering the quadratic formula and the meaning of the discriminant is one of the most reusable skills in algebra — and this calculator is here whenever you need it.

FAQs

A quadratic equation is any equation that can be written in the form ax² + bx + c = 0, where a, b, and c are real numbers and a is not equal to zero. The highest power of the variable is 2, which gives the parabola its characteristic U-shape when graphed. Quadratics appear throughout physics, engineering, finance and geometry.

The quadratic formula is x = (-b ± √(b² - 4ac)) / 2a. It always gives the solutions (roots) of any quadratic equation ax² + bx + c = 0. The ± symbol means there are typically two solutions: one with a plus sign and one with a minus sign.

The discriminant is the expression under the square root in the quadratic formula: b² - 4ac. Its sign tells you how many real solutions the equation has. If the discriminant is positive, there are two distinct real roots. If it is zero, there is one repeated real root. If it is negative, there are no real solutions — instead, two complex conjugate roots.

A negative discriminant means the parabola does not cross the x-axis, so there are no real solutions. The equation still has two solutions, but they are complex numbers — pairs of the form p + qi and p - qi where i = √-1. Complex roots always come in conjugate pairs for equations with real coefficients.

Yes, when the discriminant b² - 4ac equals zero. This is called a repeated root or double root and corresponds to the parabola just touching the x-axis at one point (its vertex sits exactly on the axis). The single solution is x = -b / 2a.

Besides the quadratic formula, you can solve quadratics by factoring (when the expression breaks into two linear factors with integer or simple rational coefficients) and by completing the square (which is also how the quadratic formula is derived). Graphing the parabola and reading off where it crosses the x-axis is another visual method.