Math

Quadratic equation solver

Solves ax² + bx + c = 0 — discriminant, real or complex roots, vertex, axis of symmetry, y-intercept, factored form, with a live parabola plot.

01Coefficients
02Solution
Discriminant
Roots
Vertex
Axis of symmetry
y-intercept
Factored form
Parabola
curve real roots vertex
03How it works

This calculator solves the general quadratic equation ax² + bx + c = 0. You type the three coefficients a, b, c (positive, negative, integer, or decimal — anything goes), and the page recomputes the discriminant, the roots, the vertex, the axis of symmetry, the y-intercept, and the factored form instantly. A small parabola plot below the KPI cards visualises the result so you can see what the algebra is telling you.

The discriminant — three cases

The quantity Δ = b² − 4ac, the discriminant, decides which of the three familiar cases the equation falls into. The KPI card colors reflect the case at a glance: green when there are two real roots, amber for the double root, indigo for the complex case.

When Δ > 0, the equation has two distinct real roots: x₁ = (−b − √Δ) / 2a and x₂ = (−b + √Δ) / 2a. Geometrically, the parabola crosses the x-axis at two points, which the plot marks with red dots.

When Δ = 0, the equation has exactly one real root, repeated: x = −b / 2a. The parabola is tangent to the x-axis at the vertex — they touch in one spot rather than cross.

When Δ < 0, the equation has no real roots: instead, two complex conjugates α ± βi where α = −b / 2a and β = √(−Δ) / 2|a|. The parabola lies entirely above or below the x-axis and never crosses it. The two complex roots are still meaningful — they are the inputs that make the polynomial zero in the complex plane — and the calculator displays them in the standard a + bi notation.

The vertex and axis of symmetry

Every parabola has an axis of symmetry — a vertical line through the lowest (if a > 0) or highest (if a < 0) point. That point is the vertex, and its x-coordinate is −b / 2a. Plug that x back into the equation and you get the y-coordinate c − b² / 4a, which is also −Δ / 4a. The calculator prints the vertex as the (x, y) pair, marks it with an amber diamond on the parabola plot, and prints the axis of symmetry as the line x = −b / 2a.

The vertex is the most useful geometric fact about a parabola after the roots: it tells you the minimum (or maximum) value of the function. If you are using the quadratic to model a physics trajectory, the vertex is the peak of the projectile's path. If you are minimizing a cost function whose shape happens to be quadratic, the vertex is where the minimum lives.

The y-intercept and the factored form

The y-intercept — the value of f(0) — is just the coefficient c. That is the only place the parabola crosses the y-axis, marked with a small blue dot on the plot.

When the discriminant is non-negative, the polynomial admits a factored form. Two real roots → a(x − x₁)(x − x₂). Double root → a(x − x₁)². The factored form is shown as a KPI; for the complex case it is hidden, since factoring over the reals isn't possible (you would need a(x − (α + βi))(x − (α − βi)) over the complex numbers, a level of abstraction we don't surface here).

What the plot shows

The parabola plot auto-scales to a window that comfortably contains the vertex, both roots when they are real, and the y-axis where the y-intercept sits. The window keeps the y-axis visible, so you always see the y-intercept. Real roots are marked with red dots on the x-axis. The vertex is marked with an orange diamond. The y-intercept is a small blue dot on the y-axis.

Light grid lines and tick labels follow the same nice-step algorithm (round powers of 10 with multiples 1 / 2 / 5) that every plotting library uses, so the axis labels stay readable at any magnitude.

Edge cases — when a = 0

If you set a to zero, the equation is no longer quadratic but linear: bx + c = 0 whose unique solution is x = −c / b when b ≠ 0. The calculator detects this and shows the linear answer instead of failing. If both a and b are zero, the equation reduces to c = 0, which has no solution unless c itself is zero (in which case every real number is a "solution"). The KPI label flips to "Degenerate (not a quadratic)" so you know the page is rendering a different kind of result.

Where this comes up

The quadratic equation is one of the most useful identities in elementary algebra. It models the path of a projectile under gravity (y = −½gt² + v₀t + h₀); the area of a rectangle whose perimeter is fixed (A = w(P/2 − w), a quadratic in w); the break-even point of a business whose costs grow linearly and whose revenue grows linearly but at a different slope (after rearrangement); the optimum of any process whose cost or yield is approximately quadratic near a known operating point; and the algebra behind countless geometry problems involving distance, angle, and area.

The quadratic formula itself dates to at least the Babylonians; the modern statement of it follows directly from completing the square on ax² + bx + c = 0. If you've ever wondered where the −b / 2a in the vertex comes from, that's the same algebraic move: divide through by a, move the constant to the other side, complete the square on x² + (b/a)x, and the new constant on the left side is exactly (b/2a)². Subtract it back out and you have the standard form a(x − vx)² + vy = 0, which is the same parabola written so its vertex is the origin of the local coordinate system.

What's next

The calculator solves a single quadratic in one variable. For systems of equations, polynomial roots beyond degree 2, or symbolic factoring, look at the rest of the math catalog or use a CAS.

Related calculators