Quadratic Formula

The universal solution for any quadratic equation

\(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)

Quadratic Formula Calculator

Use the formula directly to solve \(ax^2 + bx + c = 0\)

What is the Quadratic Formula?

The quadratic formula is a closed-form solution that gives the roots (solutions) of any quadratic equation of the form:

\(ax^2 + bx + c = 0\)

Where:

The formula provides both solutions in one expression:

\(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)

The \(\pm\) symbol means "plus or minus", indicating there are usually two solutions:

\(x_1 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}\)
\(x_2 = \frac{-b - \sqrt{b^2 - 4ac}}{2a}\)

Derivation of the Quadratic Formula

How we get from \(ax^2 + bx + c = 0\) to the formula

Step 1: Start with standard form

\(ax^2 + bx + c = 0\)

Step 2: Divide by \(a\) (assuming \(a \neq 0\))

\(x^2 + \frac{b}{a}x + \frac{c}{a} = 0\)

Step 3: Move constant term to right side

\(x^2 + \frac{b}{a}x = -\frac{c}{a}\)

Step 4: Complete the square

Add \(\left(\frac{b}{2a}\right)^2\) to both sides:

\(x^2 + \frac{b}{a}x + \left(\frac{b}{2a}\right)^2 = -\frac{c}{a} + \left(\frac{b}{2a}\right)^2\)

Step 5: Factor left side as perfect square

\(\left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a}\)

Step 6: Simplify right side

\(\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}\)

Step 7: Take square root of both sides

\(x + \frac{b}{2a} = \pm \frac{\sqrt{b^2 - 4ac}}{2a}\)

Step 8: Isolate \(x\)

\(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)

Key insight: The term \(b^2 - 4ac\) under the square root is called the discriminant, which determines the nature of the roots.

Worked Examples

Example 1: Two distinct real roots

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

\(a = 1,\quad b = -5,\quad c = 6\)
\(x = \frac{-(-5) \pm \sqrt{(-5)^2 - 4 \cdot 1 \cdot 6}}{2 \cdot 1}\)
\(x = \frac{5 \pm \sqrt{25 - 24}}{2}\)
\(x = \frac{5 \pm \sqrt{1}}{2} = \frac{5 \pm 1}{2}\)
\(x_1 = \frac{5 + 1}{2} = 3,\quad x_2 = \frac{5 - 1}{2} = 2\)

Example 2: Double root

Solve \(x^2 - 4x + 4 = 0\)

\(a = 1,\quad b = -4,\quad c = 4\)
\(x = \frac{-(-4) \pm \sqrt{(-4)^2 - 4 \cdot 1 \cdot 4}}{2 \cdot 1}\)
\(x = \frac{4 \pm \sqrt{16 - 16}}{2} = \frac{4 \pm 0}{2} = 2\)

Only one solution: \(x = 2\) (double root)

Example 3: Complex roots

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

\(a = 1,\quad b = 2,\quad c = 5\)
\(x = \frac{-2 \pm \sqrt{2^2 - 4 \cdot 1 \cdot 5}}{2 \cdot 1}\)
\(x = \frac{-2 \pm \sqrt{4 - 20}}{2} = \frac{-2 \pm \sqrt{-16}}{2}\)
\(x = \frac{-2 \pm 4i}{2} = -1 \pm 2i\)

Two complex conjugate roots: \(x_1 = -1 + 2i,\quad x_2 = -1 - 2i\)

Common Questions About the Quadratic Formula

When should I use the quadratic formula? +

Use the quadratic formula when:

  • The quadratic doesn't factor easily
  • You need exact solutions (not decimal approximations)
  • You're dealing with complex coefficients
  • You want to understand the relationship between coefficients and roots
For simple factorable quadratics, factoring might be faster.

What does the ± symbol mean? +

The ± (plus-minus) symbol indicates that there are usually two solutions: one using the plus sign and one using the minus sign. This corresponds to the two possible square roots of the discriminant.

Can the quadratic formula give complex solutions? +

Yes! When the discriminant \(b^2 - 4ac\) is negative, the square root produces an imaginary number, resulting in complex conjugate solutions. Our complex roots calculator handles these cases.

What if a = 0? +

If \(a = 0\), the equation is not quadratic but linear (\(bx + c = 0\)). The quadratic formula doesn't apply because you'd be dividing by zero. Always check that \(a \neq 0\) before using the formula.

Related Quadratic Tools

Discriminant Calculator

Determine root type without solving completely.

Try Tool

Vertex Calculator

Find turning point and axis of symmetry.

Try Tool

Factoring Tool

Solve by factoring when possible.

Try Tool

Main Calculator

Complete quadratic equation solver with graph.

Back to Home