Quadratic Formula: Steps, Discriminant, and Examples

Friendly math mascot at a chalkboard showing the quadratic formula and a parabola crossing the x-axis

The quadratic formula solves any quadratic equation of the form \(ax^2 + bx + c = 0\) (with \(a \neq 0\)). Its roots are given by \(x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}\). On this page you will see what each part means, how to use the formula step by step, how the discriminant tells you how many solutions to expect, and fully worked examples — plus an interactive trainer so you can practice right away.

What is the quadratic formula

A quadratic equation is any equation you can write in the standard form \(ax^2 + bx + c = 0\), where \(a\), \(b\), and \(c\) are numbers and \(a \neq 0\). The numbers \(a\), \(b\), and \(c\) are called the coefficients: \(a\) is the coefficient of \(x^2\), \(b\) is the coefficient of \(x\), and \(c\) is the constant term.

The quadratic formula gives the solutions (the roots) directly from these three coefficients — no factoring required. It works for every quadratic, even the ones that will not factor nicely.

Where it comes from (derivation): the formula is what you get by completing the square on the general equation. Divide \(ax^2 + bx + c = 0\) by \(a\), move the constant over, add \(\left(\frac{b}{2a}\right)^2\) to both sides to make a perfect square, and take the square root. The result is the single formula below, valid for any \(a\), \(b\), \(c\).

x = b ±b² − 4ac2a
Read off the coefficients from ax² + bx + c = 0: a multiplies x², b multiplies x, and c is the constant. Keep every sign.

The discriminant: how many roots

The part under the square root, \(b^2 - 4ac\), is called the discriminant (often written \(D\)). You do not need to finish the whole formula to know how many solutions an equation has — the sign of the discriminant tells you immediately.

Because you cannot take the real square root of a negative number, the sign of \(D\) splits every quadratic into exactly three cases: two roots, one repeated root, or no real roots. On a graph, this is where the parabola \(y = ax^2 + bx + c\) meets the x-axis — twice, once (at the vertex), or not at all.

Discriminant D = b² − 4acReal rootsWhat you get
D > 0Two distinct real rootsParabola crosses the x-axis twice. Use both signs: x = (−b ± √D) / 2a.
D = 0One real root (repeated)Parabola touches the x-axis at its vertex. The ± disappears: x = −b / 2a.
D < 0No real rootsParabola never touches the x-axis. There is no real square root of a negative number.

How to use the quadratic formula: steps

The quadratic formula always works the same way. Follow these five steps in order and it will never let you down — the hardest part is just reading the coefficients (with their signs) correctly.

1
Write it in standard form
Rearrange everything to one side so it reads ax² + bx + c = 0.
2
Identify a, b, and c
Read off the three coefficients, keeping the sign in front of each one.
3
Compute the discriminant
D = b² − 4ac. This single number decides how many roots there are.
4
Check the sign of D
D > 0 → two roots, D = 0 → one root, D < 0 → no real roots.
5
Substitute and simplify
Put a, b, and D into x = (−b ± √D) / 2a and simplify both signs.

Quadratic formula examples (step by step)

Example 1. Two real roots (D > 0)

Solve \(2x^2 - 7x + 3 = 0\).

Step 1–2. It is already in standard form, so read off the coefficients: \(a = 2\), \(b = -7\), \(c = 3\).

Step 3. Discriminant: \(D = b^2 - 4ac = (-7)^2 - 4\cdot 2\cdot 3 = 49 - 24 = 25\).

Step 4. \(D = 25 > 0\), so there are two distinct real roots.

Step 5. Substitute: \(x = \dfrac{-(-7) \pm \sqrt{25}}{2\cdot 2} = \dfrac{7 \pm 5}{4}\).

Using the plus sign: \(x = \dfrac{7 + 5}{4} = \dfrac{12}{4} = 3\). Using the minus sign: \(x = \dfrac{7 - 5}{4} = \dfrac{2}{4} = \dfrac{1}{2}\).

Roots: \(x = 3\) and \(x = \tfrac{1}{2}\).

Example 2. One repeated root (D = 0)

Solve \(x^2 - 6x + 9 = 0\).

Step 1–2. Standard form already: \(a = 1\), \(b = -6\), \(c = 9\).

Step 3. Discriminant: \(D = (-6)^2 - 4\cdot 1\cdot 9 = 36 - 36 = 0\).

Step 4. \(D = 0\), so there is exactly one real root (a repeated root). The \(\pm\) term vanishes because \(\sqrt{0} = 0\).

Step 5. \(x = \dfrac{-(-6) \pm \sqrt{0}}{2\cdot 1} = \dfrac{6}{2} = 3\).

Root: \(x = 3\) (this quadratic is the perfect square \((x-3)^2 = 0\)).

Example 3. No real roots (D < 0)

Solve \(x^2 + 2x + 5 = 0\).

Step 1–2. Standard form: \(a = 1\), \(b = 2\), \(c = 5\).

Step 3. Discriminant: \(D = 2^2 - 4\cdot 1\cdot 5 = 4 - 20 = -16\).

Step 4. \(D = -16 < 0\). Because you cannot take the real square root of a negative number, this equation has no real roots — its parabola never crosses the x-axis.

Step 5. No further work is needed for real solutions. (If you have met complex numbers, the roots are \(x = -1 \pm 2i\), but for a real answer we stop here.)

Common mistakes with the quadratic formula

  • Getting the sign of b wrong, especially when b is negative.

    The formula starts with −b. If b = −7, then −b = +7 — the two minus signs cancel. Write the substitution out fully, e.g. −(−7), before simplifying.

  • Forgetting the ± and reporting only one root.

    When D > 0 the ± produces two answers: one with + and one with −. Always compute both (−b + √D)/(2a) and (−b − √D)/(2a) unless D = 0.

  • Dividing only part of the numerator by 2a.

    The whole numerator, −b ± √D, is divided by 2a — not just the √D part. Keep it as one fraction: (−b ± √D) / (2a).

  • Computing the discriminant wrong when a or c is negative.

    In D = b² − 4ac, subtracting 4ac when a·c is negative actually adds. For 3x² − 2x − 1, −4·3·(−1) = +12, so D = 4 + 12 = 16, not 4 − 12.

  • Applying the formula before writing the equation in standard form.

    Move every term to one side so the equation reads ax² + bx + c = 0 first. For example, x² = 5x − 6 must become x² − 5x + 6 = 0 before you read off a, b, c.

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) / (2a). It gives the solutions of any quadratic equation ax² + bx + c = 0 (with a ≠ 0) directly from the coefficients a, b, and c.

How do you use the quadratic formula step by step?

Write the equation in standard form ax² + bx + c = 0, identify a, b, and c with their signs, compute the discriminant D = b² − 4ac, check its sign to see how many roots there are, then substitute into x = (−b ± √D) / (2a) and simplify both the plus and minus versions.

What is the discriminant and why does it matter?

The discriminant is D = b² − 4ac, the expression under the square root. Its sign tells you the number of real roots without finishing the calculation: D > 0 gives two real roots, D = 0 gives one repeated root, and D < 0 gives no real roots.

When should I use the quadratic formula instead of factoring?

Factoring is quick when the quadratic factors with small whole numbers. The quadratic formula works for every quadratic, including ones that do not factor nicely or that have irrational or non-integer roots, so it is the reliable fallback whenever factoring is not obvious.

Where does the quadratic formula come from?

It is derived by completing the square on the general equation ax² + bx + c = 0: divide by a, complete the square by adding (b/2a)², rewrite the left side as a perfect square, and take the square root of both sides. The result is the quadratic formula.

Can the quadratic formula give no answer?

If the discriminant is negative (D < 0), there is no real solution because you cannot take the real square root of a negative number. The equation still has two complex roots, but there are no real roots — on a graph the parabola simply never touches the x-axis.

Still have questions? Continue in chat

Other Subject Materials

4.92 18,437 ratings
User #4365351

I really liked the text-on-photo editor — the result turned out to be an absolute masterpiece.

Web · May 2026
User #4383661

Thank you, the work of the neural network really impressed me. Perfect!

Web · May 2026
User #4279467

I really like it — would be great to have a few more free tries.

Google Play · May 2026
User #4160129

A wonderful app with affordable prices.

Web · May 2026
Text copied
Done
Error