Quadratic Formula Calculator

The quadratic formula x = (-b +/- sqrt(b^2 - 4ac)) / (2a) solves any equation of the form ax^2 + bx + c = 0. The discriminant (b^2 - 4ac) determines the nature of the roots: positive means two distinct real roots, zero means one repeated root, and negative means two complex conjugate roots. For example, x^2 - 5x + 6 = 0 has a discriminant of 1, yielding roots x = 3 and x = 2. Enter the coefficients a, b, and c below to solve any quadratic equation instantly.

Quick Answer

For x^2 - 5x + 6 = 0 (a=1, b=-5, c=6), the discriminant is 1, and the two roots are x = 3 and x = 2.

Enter coefficients for ax2 + bx + c = 0

Common Examples

Input Result
a=1, b=-5, c=6 x = 3 and x = 2
a=2, b=4, c=-6 x = 1 and x = -3
a=1, b=-6, c=9 x = 3 (repeated root)
a=1, b=2, c=5 x = -1 + 2i and x = -1 - 2i
a=3, b=0, c=-27 x = 3 and x = -3

How It Works

The Formula

The quadratic formula gives the solutions (roots) of any quadratic equation ax^2 + bx + c = 0:

x = (-b +/- sqrt(b^2 - 4ac)) / (2a)

The expression under the square root, b^2 - 4ac, is called the discriminant and determines the nature of the roots:

  • Discriminant > 0: Two distinct real roots. The parabola crosses the x-axis at two points.
  • Discriminant = 0: One repeated real root (also called a double root). The parabola touches the x-axis at exactly one point.
  • Discriminant < 0: Two complex conjugate roots. The parabola does not cross the x-axis.

The vertex of the parabola y = ax^2 + bx + c is located at:

x = -b / (2a), y = a(-b/(2a))^2 + b(-b/(2a)) + c

The vertex represents the minimum point if a > 0 (parabola opens upward) or the maximum point if a < 0 (parabola opens downward).

The axis of symmetry is the vertical line x = -b/(2a), and the y-intercept is simply c (the value when x = 0).

Worked Example

Solve 2x^2 + 4x - 6 = 0 (a = 2, b = 4, c = -6).

Discriminant = 4^2 - 4(2)(-6) = 16 + 48 = 64. Since 64 > 0, there are two real roots.

x = (-4 +/- sqrt(64)) / (2 x 2) = (-4 +/- 8) / 4.

x1 = (-4 + 8) / 4 = 4 / 4 = 1. x2 = (-4 - 8) / 4 = -12 / 4 = -3.

Vertex: x = -4 / (2 x 2) = -1, y = 2(-1)^2 + 4(-1) - 6 = 2 - 4 - 6 = -8. Vertex at (-1, -8).

Axis of symmetry: x = -1. Y-intercept: -6. Concavity: opens upward (a = 2 > 0).

Related Calculators

Frequently Asked Questions

What if the coefficient a is zero?
If a = 0, the equation is not quadratic; it becomes a linear equation bx + c = 0 with the single solution x = -c/b. The quadratic formula requires a to be non-zero.
What are complex roots?
Complex roots occur when the discriminant is negative, meaning the square root of a negative number is required. These roots take the form a + bi and a - bi, where i represents the imaginary unit (the square root of -1). Complex roots always come in conjugate pairs.
How does the discriminant relate to the graph?
The discriminant tells you how many times the parabola crosses the x-axis. A positive discriminant means two crossings (two x-intercepts), zero means the parabola just touches the axis (one x-intercept at the vertex), and a negative discriminant means no crossings (the parabola is entirely above or below the x-axis).
What is the vertex form of a quadratic equation?
The vertex form is y = a(x - h)^2 + k, where (h, k) is the vertex. You can convert from standard form by completing the square or by computing h = -b/(2a) and k = c - b^2/(4a). Vertex form makes it easy to read the vertex and direction of opening directly.
Can the quadratic formula solve equations with fractions or decimals?
Yes. The formula works for any real-valued coefficients, including fractions and decimals. For example, 0.5x^2 - 1.5x + 1 = 0 can be solved directly with a = 0.5, b = -1.5, c = 1, yielding roots x = 2 and x = 1.