All resources

Resources · Education

Quadratic Formula

The quadratic formula solves any equation in the form ax² + bx + c = 0 with a ≠ 0. It always works, even when factoring fails. This guide explains what the formula means, how to identify a, b, and c from any quadratic equation, and how the discriminant tells you what kind of roots to expect before you finish the math. For a fast computed answer on any quadratic, the quadratic formula calculator takes a, b, and c and returns the roots in one step.

7 min read

What is the quadratic formula?

The quadratic formula is the universal solution to a quadratic equation, which is any equation that can be written in the form ax² + bx + c = 0. The formula returns the values of x that make the equation true. Those values are called the roots or solutions of the equation.

It is one of the most useful results in algebra because it works for every quadratic, regardless of whether the equation factors cleanly or not. If you can identify a, b, and c, you can find the roots.

When do you use the quadratic formula?

The formula is the right tool when:

  • You have a quadratic equation in standard form, or you can rearrange it into ax² + bx + c = 0.
  • The equation is hard or impossible to factor by inspection.
  • You need an exact answer, not an estimate.
  • You want to know whether the roots are real, repeated, or complex before you finish the math.

For simple quadratics that factor easily (like x² + 5x + 6 = 0, which factors as (x+2)(x+3) = 0), factoring is faster. For everything else, the quadratic formula handles it without guesswork.

The quadratic formula

The formula has been written down in essentially this form since at least the 9th century, and it solves every quadratic equation. The formula and the discriminant rule together cover all three cases of quadratic roots.

The quadratic formula

x = (−b ± √(b² − 4ac)) / 2a

Discriminant

D = b² − 4ac

  • D > 0 two distinct real roots
  • D = 0 one repeated real root
  • D < 0 two complex roots in a conjugate pair

The two roots come from the ± sign: one root uses the positive square root, the other uses the negative. When D = 0, the ± collapses to a single value, giving one repeated root.

What a, b, and c mean

The three coefficients each have a specific role:

  • a is the coefficient of x² (the squared term).
  • b is the coefficient of x (the linear term).
  • c is the constant term (no x at all).

For example, in the equation:

2x² − 5x + 3 = 0

you have a = 2, b = −5, c = 3. Note the negative sign on b. When reading off coefficients, always include the sign attached to each term. A common mistake is to drop a negative sign, which flips the formula's behavior.

a must be nonzero. If a = 0, the x² term disappears and you are left with bx + c = 0, which is a linear equation, not quadratic. The quadratic formula does not apply (and would divide by zero in the denominator).

What the discriminant tells you

The discriminant is the expression under the square root in the formula: D = b² − 4ac.

It is the most useful diagnostic in the formula because it tells you what the roots look like before you finish the calculation:

  • D > 0 two distinct real roots. The parabola crosses the x-axis at two points.
  • D = 0 one repeated real root. The parabola touches the x-axis at exactly one point.
  • D < 0 two complex roots in a conjugate pair. The parabola does not cross the x-axis.

Knowing the discriminant first saves time. If D < 0, you know the answer involves complex numbers and you do not need to attempt a real-number simplification. If D = 0, you know there is just one root and you can stop after computing −b / 2a.

Step by step quadratic formula example

Take the equation: x² − 5x + 6 = 0.

  1. Identify the coefficients: a = 1, b = −5, c = 6.
  2. Compute the discriminant: D = (−5)² − 4(1)(6) = 25 − 24 = 1.
  3. Take the square root of D: √1 = 1.
  4. Plug into the formula: x = (5 ± 1) / 2.
  5. Simplify each branch: x₁ = (5 + 1) / 2 = 3 and x₂ = (5 − 1) / 2 = 2.

The roots are x = 2 and x = 3. You can verify by substituting back: 3² − 5(3) + 6 = 0 and 2² − 5(2) + 6 = 0. Both check out.

Example 1: Two real roots

Equation: 2x² − 4x − 6 = 0.

  • a = 2, b = −4, c = −6
  • D = (−4)² − 4(2)(−6) = 16 + 48 = 64
  • √D = 8
  • x = (4 ± 8) / 4
  • x₁ = (4 + 8) / 4 = 3
  • x₂ = (4 − 8) / 4 = −1

Two distinct real roots: x = 3 and x = −1.

Example 2: One repeated root

Equation: x² + 2x + 1 = 0.

  • a = 1, b = 2, c = 1
  • D = 2² − 4(1)(1) = 4 − 4 = 0

D = 0 collapses the formula to a single value: x = −b / 2a = −2 / 2 = −1.

One repeated root: x = −1. (This equation factors as (x + 1)² = 0, which is another way to see that −1 is a double root.)

Example 3: Complex roots

Equation: x² + 2x + 5 = 0.

  • a = 1, b = 2, c = 5
  • D = 2² − 4(1)(5) = 4 − 20 = −16

D < 0, so the roots are complex.

  • Real part: −b / 2a = −2 / 2 = −1
  • Imaginary part: √(−D) / 2|a| = √16 / 2 = 2

The roots are x = −1 + 2i and x = −1 − 2i. The two complex roots form a conjugate pair: same real part, opposite imaginary parts. This is a general property of quadratics with real coefficients.

Common quadratic formula mistakes

A few traps that catch people:

  • Dropping the negative sign on b. The numerator starts with −b, not b. If b = −5, then −b = 5 (not −5).
  • Subtracting before multiplying in the discriminant. The discriminant is b² − 4ac in that order: compute 4ac as one product, then subtract it from b².
  • Treating √(b²) as b. b² is always non-negative, so √(b²) is the absolute value of b, not b itself. The sign matters when b is negative.
  • Dividing by 2 instead of 2a. The denominator is 2a, not just 2. With a = 3, the denominator is 6.
  • Treating D = 0 as no solution. A zero discriminant means one solution (a repeated root), not zero solutions.
  • Dropping the ± and computing only one root. Quadratics generally have two roots. The formula always returns two unless the discriminant is exactly zero.

Quadratic formula calculator vs solving by hand

Solving by hand:

  • Forces you to think through the steps and notice errors as you go.
  • Useful for understanding what the formula is doing.
  • Slower for ugly coefficients (decimals, large numbers).
  • Easy to slip arithmetic in the discriminant or the simplification.

Using a calculator:

  • Fast: enter a, b, c and read the answer.
  • Handles edge cases like complex roots, very large or small numbers, and decimals.
  • Typically reports the discriminant alongside the roots so you can see the case.
  • Frees you to focus on the bigger problem (using the roots in context).

For the calculator approach, the quadratic formula calculator handles all the math and shows the discriminant, root type, and roots side by side, with a step-by-step breakdown using your actual numbers.

Quick summary

  • Formula: x = (−b ± √(b² − 4ac)) / 2a
  • Works for any equation in the form ax² + bx + c = 0 with a ≠ 0.
  • Discriminant: D = b² − 4ac.
  • D > 0: two distinct real roots. D = 0: one repeated real root. D < 0: two complex conjugate roots.
  • Always identify a, b, c with their signs before plugging in.
  • Watch out for sign mistakes around −b and arithmetic slips inside the discriminant.
  • The quadratic formula calculator runs the whole calculation in one step.

Run the numbers

Three Education math calculators that build on each other. The quadratic formula is the algebra tool; the others sit alongside it in geometry and calculus.

Frequently asked questions

The quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. It solves any equation in the form ax² + bx + c = 0, where a, b, and c are the coefficients of the quadratic, linear, and constant terms.

Identify a, b, and c from the equation, paying attention to negative signs. Compute the discriminant b² − 4ac to see what kind of roots you will get. Take the square root of the discriminant, apply the ± to get the two branches, and simplify each one. Most quadratics have two roots; the discriminant tells you which case you are in.

The discriminant is b² − 4ac, the expression under the square root in the quadratic formula. It tells you what kind of roots the equation has: positive means two distinct real roots, zero means one repeated real root, and negative means two complex roots in a conjugate pair.

The roots are complex. The formula gives one root as −b/2a + (√(−D)/2|a|)·i and the other as −b/2a − (√(−D)/2|a|)·i. The two are complex conjugates of each other, with the same real part and opposite imaginary parts.

Yes, but only when the discriminant equals zero. In that case the formula collapses to a single value, x = −b / 2a, often called a repeated or double root because it counts twice in the algebra. The graph of the parabola touches the x-axis at exactly one point in this case.

If a = 0 the x² term disappears and the equation becomes bx + c = 0, which is linear, not quadratic. The quadratic formula also divides by 2a, so a = 0 would mean dividing by zero. The formula does not apply when a = 0.

Use factoring when it is obvious (small integer coefficients, easy roots) because it is faster. Use the quadratic formula for everything else: ugly coefficients, decimals, large numbers, or any case where factoring is not immediately clear. The quadratic formula always works; factoring only works when the equation factors cleanly over rationals.

Yes. A calculator is faster for one-off calculations, handles edge cases (complex roots, decimals) cleanly, and reports the discriminant alongside the roots so you can see what kind of solutions you have. The quadratic formula calculator on this site does all of that in one step and shows the work.