StatGardenREF. DESK
Calculators/Maths/Quadratic equation
Maths

Quadratic equation calculator

Roots, vertex and discriminant of ax² + bx + c.

What this calculator does

A quadratic equation describes a parabola, and solving it means finding where that parabola crosses the horizontal axis. It may cross twice, touch once, or miss entirely: and the discriminant tells you which before you calculate anything else.

This solver reports the roots in whichever form applies, including complex roots when the parabola never reaches the axis. It also gives the vertex, which is the turning point and the answer to most optimisation questions that quadratics are used for.

The formula

Formulax = (−b ± √(b² − 4ac)) / 2a; vertex at x = −b/2a

The quadratic formula comes from completing the square on the general form. The discriminant b² − 4ac is the part under the square root: positive gives two real roots, zero gives one repeated root, and negative gives a conjugate pair of complex roots. The vertex sits at x = −b/2a, midway between the roots when they are real.

TermMeaning
a, b, cThe coefficients in ax² + bx + c = 0.
Discriminantb² − 4ac, which determines the nature of the roots.
VertexThe turning point of the parabola.
Axis of symmetryThe vertical line through the vertex.

The inputs explained

FieldWhat to enter
aThe coefficient of x². If this is zero the equation is linear, and the calculator solves it as such.
bThe coefficient of x.
cThe constant term.

When to use it

Solving for roots

The standard use: finding the values of x that satisfy the equation. Both roots are given, or the complex pair when there are no real solutions.

Finding a maximum or minimum

The vertex is the turning point. For a negative leading coefficient it is a maximum, for a positive one a minimum: which covers most profit-maximisation and projectile-height problems.

Checking your working

The sum and product of the roots equal −b/a and c/a respectively. Those two identities are a quick way to verify a hand-solved answer without redoing the whole thing.

Understanding when there is no solution

A negative discriminant means the parabola never reaches the axis. In a physical problem that usually means the scenario as posed cannot occur.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the constant term changes the roots

Fixing a = 1 and b = −3 while the constant term varies moves the parabola vertically.

x² − 3x + c
cRootsDiscriminantVertex
-4x₁ = 4.000 x₂ = -1.00025.000: two real roots(1.500, -6.250)
0x₁ = 3.000 x₂ = 09.000: two real roots(1.500, -2.250)
2x₁ = 2.000 x₂ = 1.0001.000: two real roots(1.500, -0.2500)
2.25x = 1.500 (repeated)0: one real root(1.500, 0)
31.500 ± 0.8660i-3.000: complex roots(1.500, 0.7500)
51.500 ± 1.658i-11.000: complex roots(1.500, 2.750)
At c = 2.25 the discriminant hits exactly zero and the two roots merge into one: the parabola touches the axis at its vertex. Above that value the roots become complex.

The effect of the leading coefficient

Changing a stretches the parabola and moves both the roots and the vertex.

ax² − 3x + 2
aRootsDiscriminantVertexSum · product of roots
-2x₁ = -2.000 x₂ = 0.500025.000: two real roots(-0.7500, 3.125)-1.500 · -1.000
-1x₁ = -3.562 x₂ = 0.561617.000: two real roots(-1.500, 4.250)-3.000 · -2.000
0.5x₁ = 5.236 x₂ = 0.76395.000: two real roots(3.000, -2.500)6.000 · 4.000
1x₁ = 2.000 x₂ = 1.0001.000: two real roots(1.500, -0.2500)3.000 · 2.000
20.7500 ± 0.6614i-7.000: complex roots(0.7500, 0.8750)1.500 · 1.000
40.3750 ± 0.5995i-23.000: complex roots(0.3750, 1.438)0.7500 · 0.5000
Negative values of a flip the parabola so the vertex becomes a maximum. The sum and product columns follow −b/a and c/a exactly, which is a useful check.

Questions

What does the discriminant tell me?

Positive means two distinct real roots, zero means one repeated real root where the parabola touches the axis, and negative means two complex conjugate roots and no crossing. You can determine the nature of the solutions before solving.

What are complex roots?

Solutions involving the imaginary unit i, where i² = −1. They arise when the parabola never reaches the horizontal axis. They are perfectly valid mathematically and appear throughout engineering, particularly in signal processing and control theory.

What if a is zero?

Then it is not a quadratic but a linear equation, bx + c = 0, with a single root at −c/b. The calculator detects this and solves it accordingly.

How do I find the vertex without the formula?

The vertex sits at x = −b/2a, midway between the roots. Substitute that back into the equation to get the y-coordinate.

Can I factorise instead?

Often, and it is faster when the roots are simple integers. The formula always works, which is why it is the reliable fallback when factorisation is not obvious.

For general powers and roots, see the exponents calculator. For triangle geometry, try triangle from three sides.