📐 Quadratic Formula Calculator
Solve any equation of the form ax² + bx + c = 0. You get both roots, including complex ones, the discriminant that tells you what kind of roots to expect, and the vertex of the parabola.
Solving ax² + bx + c = 0, and reading what the answer means
A quadratic is any equation where the highest power of the unknown is two. Its graph is a parabola, and solving it means finding where that parabola crosses the x-axis. There may be two such points, one, or none at all, and the discriminant tells you which before you do any work.
x = [ −b ± √(b² − 4ac) ] / 2a
The discriminant decides everything
| Discriminant | Roots | The parabola |
|---|---|---|
| Positive | Two distinct real roots | Crosses the x-axis twice |
| Zero | One repeated real root | Touches the x-axis at its vertex |
| Negative | Two complex conjugate roots | Never reaches the x-axis |
A perfect square discriminant also tells you the roots will be rational, which means the quadratic factorises neatly. For x² − 7x + 12, the discriminant is 49 − 48 = 1, a perfect square, and indeed it factors as (x − 3)(x − 4).
Three ways to solve one
- Factoring. Fastest when it works. Find two numbers that multiply to ac and add to b. Only practical when the roots are rational.
- Completing the square. Slower, but it is where the quadratic formula comes from and it gives the vertex directly.
- The quadratic formula. Always works, every time, including for complex roots. The one to use when factoring is not obvious within a few seconds.
The vertex and the axis of symmetry
Every parabola is symmetric about a vertical line through its turning point. That line sits at x = −b/2a, which is also the midpoint of the two roots, and substituting it back gives the y-coordinate of the vertex. If a is positive the parabola opens upwards and the vertex is the minimum; if a is negative it opens downwards and the vertex is the maximum.
This is why quadratics appear in optimisation problems. Maximum profit, maximum area for a fixed perimeter, the peak of a projectile's flight: all of them are the vertex of a quadratic.
Vieta's formulas, and a quick check
sum of roots = −b/a product of roots = c/a
These give a five-second sanity check on any answer. For x² − 7x + 12, the roots should sum to 7 and multiply to 12. Three and four do both, so the answer is right. If your roots fail this test, the arithmetic went wrong somewhere.
Complex roots are still answers
When the discriminant is negative, the square root of a negative number gives an imaginary component, and the roots come as a conjugate pair a ± bi. For x² + 2x + 5 the roots are −1 + 2i and −1 − 2i. In a geometry problem this usually means no solution exists; in electrical engineering or signal processing it means something specific and useful about oscillation.
Watch the sign conventions. In x² − 7x + 12, b is −7, not 7. Getting that sign wrong is the most common error in using the formula, and the sum-of-roots check catches it immediately.
A worked example
Solve 2x² + 5x − 3 = 0. The discriminant is 25 + 24 = 49, a perfect square, so expect two rational roots. x = (−5 ± 7) / 4, giving x = 0.5 and x = −3. Check: they sum to −2.5, which equals −b/a = −5/2, and multiply to −1.5, which equals c/a = −3/2. The vertex is at x = −1.25, y = −6.125.
Frequently Asked Questions (FAQs)
What is the discriminant and why does it matter?
It is b² − 4ac, the part under the square root. Positive means two real roots, zero means one repeated root, negative means two complex roots. It tells you the nature of the answer before you compute it, which is useful when you only need to know whether a solution exists.
Can a quadratic have no solution?
Not in the complex numbers, where it always has exactly two roots counted with multiplicity. It can have no real solution, which is what a negative discriminant means, and in a physical problem that usually translates to no valid answer.
When should I factor instead of using the formula?
When the coefficients are small integers and the factorisation is visible within a few seconds. A quick test: if the discriminant is a perfect square, it factors. Otherwise the formula is faster than hunting for factors that are not there.
What is the vertex used for?
It is the maximum or minimum of the function. Problems about greatest area, maximum profit or the peak of a trajectory all reduce to finding the vertex at x = −b/2a. It also gives the axis of symmetry for sketching the graph.
Why do complex roots always come in pairs?
Because the formula adds and subtracts the same square root. When that root is imaginary, the two answers differ only in the sign of the imaginary part, which makes them conjugates. This holds for any polynomial with real coefficients.
What happens if a equals zero?
It is no longer a quadratic. The x² term vanishes and you have a linear equation bx + c = 0, with the single solution x = −c/b. The calculator detects this and solves it as a linear equation rather than dividing by zero.