Math · 5 min read

How to Solve a Quadratic Equation

ax² + bx + c = 0 — discriminant and the quadratic formula

A quadratic equation is a degree-2 polynomial set equal to zero. This tutorial walks through the quadratic formula, a 1x² − 3x + 2 worked example with roots 1 and 2, and a playground that slides a, b, and c onto a parabola sketch. When the discriminant is negative there are no real roots — the parabola misses the x-axis.

Written by the My Calculator Stack editorial team. About our methods

Coefficient a must be nonzero or the equation is not quadratic. A negative discriminant means no real roots; this sketch does not plot complex solutions.

1.What a quadratic equation is

The standard form is ax² + bx + c = 0 with a ≠ 0. Graphically that is a parabola y = ax² + bx + c; the real solutions are the x-intercepts. The sign of a chooses up or down; the vertex sits at x = −b/(2a). Linear equations (a = 0) and higher-degree polynomials need different tools.

2.The formula

Complete the square, or memorize the quadratic formula: x = [−b ± √(b² − 4ac)] / (2a). The discriminant Δ = b² − 4ac decides how many real roots: two if Δ > 0, one repeated root if Δ = 0, and none on the real line if Δ < 0. Division by 2a is why a cannot be zero.

\[ x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a} \]

3.Worked example

Take a = 1, b = −3, c = 2 — the same defaults as the Quadratic Equation Calculator. Discriminant Δ = (−3)² − 4(1)(2) = 9 − 8 = 1. Then x = [3 ± 1] / 2, so the roots are 4/2 = 2 and 2/2 = 1. Factoring (x − 1)(x − 2) = 0 is the same pair.

\[ x=\frac{3\pm 1}{2}\quad\Rightarrow\quad x=2,\; x=1 \]

4.Parabola playground

Move a, b, and c. The caption substitutes into the quadratic formula; the sketch plots y = ax² + bx + c and marks real roots on the x-axis. This is a teaching widget — no favorites, no full calculator chrome. Open the Quadratic Equation Calculator when you want typed coefficients and the discriminant printed beside the roots.

Inline playground

Discriminant Δ

1

Root 1

2

Root 2

1

x = [3 ± √1] / 2 → 2, 1

Parabola y = ax² + bx + c with real roots marked A Cartesian sketch of the quadratic with x-intercepts at the real roots when they exist.
Parabola y = ax² + bx + c. Coral dots mark real roots (x-intercepts).

Teaching aid only — a cannot be zero. A negative discriminant has no real roots on this sketch.

Open the full Quadratic Equation calculator →

5.Open the full calculator

The Quadratic Equation Calculator uses the same formula and the same 1, −3, 2 example, with How it works, FAQ, and a full plot on one page. Browse other math calculators if you need a linear equation or a geometry tool next.