Quadratic Equation Solver

Solve quadratic equations with step-by-step working showing discriminant calculation and real or complex roots

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

Discriminant (Δ)

1.00

Two distinct real roots

Root 1

3.0000

Root 2

2.0000

Step 1: Calculate discriminant (b² - 4ac) = -5² - 4(1)(6) = 1.00

Step 2: Apply quadratic formula x = (--5 ± √1.00) / 2

How to Use the Quadratic Equation Solver

Enter the three coefficients a, b and c from your equation in the form ax² + bx + c = 0. The solver works out the discriminant (b² - 4ac), uses it to decide whether the roots are real or complex, and applies the quadratic formula to give you the values of x. Steps and the discriminant value are shown alongside the answer so you can check the working rather than just trusting the output.

Coefficient a cannot be zero, otherwise the equation isn't quadratic at all (it collapses to a linear equation bx + c = 0, which the solver flags as an error). Coefficients b and c can be zero. If c is zero you get x = 0 as one root automatically; if b is zero you get a pure square root.

What the Discriminant Tells You

The discriminant is the bit under the square root sign in the quadratic formula: b² - 4ac. It tells you the nature of the roots before you even calculate them. If it's positive, you get two distinct real roots (the parabola crosses the x-axis at two different points). If it's zero, you get one repeated real root (the parabola just touches the x-axis at its vertex). If it's negative, you get two complex roots (the parabola never touches the x-axis at all).

Complex roots come in conjugate pairs of the form p + qi and p - qi, where i is the square root of negative one. They're not 'wrong' answers, they're just answers that exist in the complex plane rather than on the standard real number line. For physics and engineering problems involving oscillation, complex roots actually correspond to important damped or oscillating behaviour.

Discriminant Outcomes at a Glance

b² - 4acNumber of real rootsGeometric meaning
PositiveTwo distinct real rootsParabola crosses x-axis at two points
ZeroOne repeated real rootParabola touches x-axis at the vertex
NegativeNo real roots (two complex)Parabola sits entirely above or below x-axis

Where Quadratic Equations Show Up

Projectile motion uses them constantly. Throw a ball into the air and its height as a function of time is roughly h(t) = -½gt² + v₀t + h₀, a quadratic. Solving for h = 0 (when the ball hits the ground) is a quadratic equation. Optimisation problems, especially ones involving area and rectangles ('I have 100m of fencing, what dimensions give the largest enclosed area?'), reduce to quadratics. Profit-maximisation in business when revenue and cost are quadratic functions of quantity. Trigonometry sometimes throws them up too.

Beyond physics and economics, quadratics turn up in computer graphics (intersecting a ray with a sphere), genetics (Hardy-Weinberg equilibrium), and statistics (variance is a quadratic function). For more numerical tools, see the [Probability Calculator](/probability-calculator) or [Standard Deviation Calculator](/standard-deviation-calculator).

Frequently Asked Questions

What is the quadratic formula?

x = (-b ± sqrt(b² - 4ac)) / 2a. The plus and minus give you the two solutions: one root from adding the square root of the discriminant, the other from subtracting it. It's derived by completing the square on the general quadratic ax² + bx + c = 0, and works for any quadratic with real coefficients.

Can I solve quadratics by factoring instead?

Yes, when the roots are 'nice' integers or simple fractions. Factoring x² - 5x + 6 = 0 gives (x - 2)(x - 3) = 0, so x = 2 or x = 3. The trouble starts when the roots aren't whole numbers; factoring x² - x - 1 = 0 (the equation for the golden ratio) by hand is a nightmare, while the formula gives (1 ± sqrt(5)) / 2 in one step. The solver doesn't try to factor; it always uses the formula, which works in every case.

What does 'completing the square' mean?

It's an algebraic technique that rewrites ax² + bx + c into the form a(x - h)² + k, where (h, k) is the vertex of the parabola. It's also the method used to derive the quadratic formula in the first place. For most everyday solving you don't need to bother with it; the formula is the more direct route.

Are complex roots useful for anything?

In a pure 'where does this graph cross zero' sense, complex roots tell you the graph never crosses, which is itself a valid answer. In engineering and physics, particularly anything involving oscillation, alternating current, signal processing or quantum mechanics, complex numbers are standard. Solving the characteristic equation of a damped oscillator yields complex roots whose imaginary part is the oscillation frequency and real part is the damping rate.

Why do you need a, b and c separately?

Because the quadratic formula needs each coefficient explicitly. The solver lets you change one at a time and watch the roots move, which is useful when you're studying how the discriminant flips from positive to negative as one coefficient changes. If you have an equation in a different form, like x² = 5x - 4, rearrange it to x² - 5x + 4 = 0 first, then a=1, b=-5, c=4.

More tools →