Quadratic Equation Solver

Enter coefficients a, b, and c to solve any equation of the form ax² + bx + c = 0. Get both roots, the discriminant value, and vertex coordinates with a full step-by-step breakdown.

Report a Bug

Understanding Quadratic Equations

A quadratic equation is any equation that can be rearranged into the standard form ax² + bx + c = 0, where a, b, and c are real numbers and a is not equal to zero. The requirement that a be nonzero is what makes the equation quadratic rather than linear—without the x² term, you just have a straight line. The word "quadratic" comes from the Latin "quadratus," meaning square, because the variable gets squared.

People have been solving these equations for a remarkably long time. Babylonian mathematicians worked out methods for specific quadratic problems around 2000 BCE, though they described their procedures in geometric terms rather than algebraic notation. They would phrase a problem like "I found a rectangle whose area is 60 and whose length exceeds its width by 7. What are the dimensions?" That translates directly into x(x + 7) = 60, or x² + 7x - 60 = 0.

The general formula we use today was developed gradually. Indian mathematician Brahmagupta described an explicit solution in the 7th century CE, and the formula reached its modern algebraic form through the work of Islamic mathematicians during the medieval period. What makes the quadratic formula so powerful is its universality. Plug in any values for a, b, and c, and it will produce the correct roots every single time. No guessing, no trial and error. Factoring works well when the roots happen to be nice integers or simple fractions, but the formula handles everything: messy decimals, irrational numbers, even complex numbers with imaginary parts.

What the Discriminant Tells You

The discriminant is the expression b² - 4ac that sits under the square root sign in the quadratic formula. Before you even finish solving the equation, the discriminant reveals exactly what kind of answers you should expect.

When the discriminant is positive, the square root produces a real number, and the ± sign gives you two different values. Your parabola crosses the x-axis at two separate points. The larger the discriminant, the farther apart those two roots are from each other. For instance, x² - 10x + 9 = 0 has a discriminant of 64, and the roots (1 and 9) are spread across a wide interval.

When the discriminant equals exactly zero, the square root vanishes and both roots collapse into a single value: x = -b/2a. Graphically, this means the parabola just barely touches the x-axis at one point—its vertex sits right on the axis. The equation x² - 6x + 9 = 0, which factors as (x - 3)² = 0, is a classic example. The only root is x = 3.

A negative discriminant means you are trying to take the square root of a negative number, which has no solution among real numbers. The roots become complex conjugates of the form p + qi and p - qi, where i represents the square root of -1. This happens when the parabola floats entirely above or entirely below the x-axis without crossing it. The equation x² + 4 = 0 has a discriminant of -16, producing roots 2i and -2i. Complex roots always appear in conjugate pairs when the coefficients a, b, and c are real numbers.

Vertex Form and the Parabola

Every quadratic function y = ax² + bx + c traces out a parabola when graphed. The vertex of that parabola is its turning point—the highest point if a is negative (the parabola opens downward) or the lowest point if a is positive (the parabola opens upward). Knowing the vertex gives you the most important single piece of information about the parabola's shape and position.

The x-coordinate of the vertex is always -b/(2a). To find the y-coordinate, substitute that x value back into the original equation: y = a(-b/2a)² + b(-b/2a) + c, which simplifies to y = c - b²/(4a). Together, these coordinates give the vertex point (h, k) where h = -b/(2a) and k = c - b²/(4a).

The vertex form of a quadratic is written as y = a(x - h)² + k. This form is especially useful because you can read off the vertex directly and immediately know whether the parabola opens up or down. Converting from standard form to vertex form is called completing the square. For y = 2x² + 8x + 3, the vertex is at h = -8/(2×2) = -2 and k = 3 - 64/8 = 3 - 8 = -5, so the vertex form is y = 2(x + 2)² - 5.

The axis of symmetry is the vertical line x = h that passes through the vertex. Every parabola is symmetric about this line, meaning the two roots (if they exist) are equidistant from h on opposite sides.

Where Quadratic Equations Show Up in Practice

Quadratic equations appear throughout physics, engineering, economics, and everyday problem-solving, sometimes in places you might not expect.

Projectile motion is probably the most well-known application. When you throw a ball, launch a rocket, or calculate the trajectory of a water fountain, the height as a function of time follows a quadratic path: h(t) = -½gt² + v₀t + h₀, where g is gravitational acceleration, v₀ is the initial velocity, and h₀ is the starting height. Setting h(t) = 0 and solving for t tells you when the object hits the ground.

In business, profit functions are often quadratic. If a company charges price p per unit and sells (1000 - 2p) units, revenue is R = p(1000 - 2p) = -2p² + 1000p. The vertex of this parabola represents the price point that maximizes revenue. This kind of optimization problem shows up constantly in economics courses.

Structural engineering relies on parabolic curves for designing arches and suspension bridge cables. The cables of a suspension bridge hang in a shape that approximates a parabola under uniform load, and engineers use quadratic equations to calculate the tension forces at every point along the cable.

Electrical engineering uses quadratics when analyzing circuits with resistors, capacitors, and inductors. The characteristic equation of an RLC circuit is a second-degree polynomial, and its roots determine whether the circuit oscillates, decays smoothly, or is critically damped. The discriminant of that equation directly tells engineers which behavior to expect.

Quadratic Formula

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

The quadratic formula provides the solutions to any equation of the form ax² + bx + c = 0, where a is not zero. The expression under the square root, b² - 4ac, is called the discriminant. When the discriminant is positive, the equation has two distinct real roots. When it equals zero, there is exactly one real root (a repeated root). When the discriminant is negative, the equation has two complex conjugate roots. For example, given x² - 5x + 6 = 0 (a=1, b=-5, c=6), the discriminant is (-5)² - 4(1)(6) = 25 - 24 = 1. The roots are then x = (5 ± √1) / 2, giving x = 3 and x = 2.

Where:

  • a = The coefficient of x² (must be non-zero)
  • b = The coefficient of x
  • c = The constant term
  • b² - 4ac = The discriminant, which determines whether roots are real or complex

Example Calculations

Two Real Roots

Solving x² - 5x + 6 = 0, a standard equation with two positive integer roots.

With a = 1, b = -5, c = 6, the discriminant is (-5)² - 4(1)(6) = 25 - 24 = 1. Since the discriminant is positive, there are two distinct real roots. Applying the quadratic formula: x = (5 ± √1) / 2 = (5 ± 1) / 2. This gives x₁ = 6/2 = 3 and x₂ = 4/2 = 2. The vertex is at x = 5/2 = 2.5, y = 1(2.5)² - 5(2.5) + 6 = 6.25 - 12.5 + 6 = -0.25. This equation can also be factored as (x - 2)(x - 3) = 0.

Complex Roots

Solving x² + 2x + 5 = 0, an equation whose roots involve imaginary numbers.

With a = 1, b = 2, c = 5, the discriminant is (2)² - 4(1)(5) = 4 - 20 = -16. The negative discriminant means no real roots exist. Using the quadratic formula: x = (-2 ± √(-16)) / 2 = (-2 ± 4i) / 2 = -1 ± 2i. The two complex conjugate roots are x₁ = -1 + 2i and x₂ = -1 - 2i. The vertex is at x = -2/2 = -1, y = (-1)² + 2(-1) + 5 = 1 - 2 + 5 = 4. Since a is positive and the vertex is above the x-axis at (−1, 4), the parabola never crosses the x-axis.

Frequently Asked Questions

If a equals zero, the equation becomes bx + c = 0, which is a linear equation rather than a quadratic one. It has at most one solution: x = -c/b (assuming b is also not zero). The quadratic formula cannot be applied because division by 2a would mean dividing by zero. This calculator will alert you if you enter a = 0 and prompt you to use a nonzero value.

Yes. When the discriminant b² - 4ac equals exactly zero, the quadratic has one repeated root, also called a double root. The single solution is x = -b/(2a). Graphically, the parabola is tangent to the x-axis at that point, touching it without crossing. Examples include x² - 6x + 9 = 0, which has the double root x = 3, and 4x² + 4x + 1 = 0, which has the double root x = -0.5.

When the discriminant is negative, the square root of a negative number introduces the imaginary unit i, defined as the square root of -1. The two roots take the form p + qi and p - qi, where p = -b/(2a) is the real part and q = √|discriminant|/(2a) is the imaginary part. These complex conjugate roots always come in pairs. While they have no direct position on the real number line, they are essential in electrical engineering, signal processing, quantum mechanics, and many branches of applied mathematics.

The terms roots, solutions, and zeros all refer to the same thing: the values of x that make the equation ax² + bx + c equal to zero. "Roots" is the most common term in algebra. "Zeros" is typically used when discussing the function f(x) = ax² + bx + c, referring to the x-values where the function output is zero. "Solutions" is the most general term, applicable to any type of equation. All three words are interchangeable in the context of quadratic equations.

No. There are several approaches. Factoring works when the roots are rational numbers, and it is often the quickest method for simple equations like x² - 7x + 12 = 0. Completing the square is a general technique that transforms the equation into vertex form and is actually the method used to derive the quadratic formula itself. Graphing gives approximate solutions by finding where the parabola crosses the x-axis. The quadratic formula, however, is the only method guaranteed to work for every quadratic equation regardless of the nature of its roots.

Related Calculators