How to solve quadratic equations step by step

7 min readupdated 20 November 2026

Short answer A quadratic equation is solved in three steps.

  1. Move every term to one side so that the equation reads ax2+bx+c=0ax^2 + bx + c = 0, and read off aa, bb and cc with their signs.
  2. If bb or cc is missing, or the left side factors easily, factor it and set each factor to zero.
  3. Otherwise use the quadratic formula, x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

The discriminant b2−4acb^2 - 4ac tells you in advance whether there are two solutions, one or none.

Every quadratic equation can be solved with one formula, but the formula is not always the fastest way, and it is the easiest place to lose a sign. Here is the order a good solver works in: write the equation in standard form, look for a shortcut, use the formula when there is none, and check the answer in ten seconds.

Step 1: write it in standard form

A quadratic equation is any equation that can be written as

ax2+bx+c=0,a≠0ax^2 + bx + c = 0, \qquad a \ne 0

Before anything else, get every term on one side and zero on the other. Then read off aa, bb and cc, each with its sign.

Example 1. Write 2x2=7x−32x^2 = 7x - 3 in standard form.

2x2=7x−32x2−7x+3=0\begin{aligned} 2x^2 &= 7x - 3 \\ 2x^2 - 7x + 3 &= 0 \end{aligned}

So a=2a = 2, b=−7b = -7 and c=3c = 3. The minus sign belongs to bb, and a lost minus sign is where most wrong answers start.

Step 2: look for a shortcut

When bb or cc is missing

If b=0b = 0, isolate x2x^2 and take the square root. A positive number has two square roots, so the answer has a ±\pm.

Example 2. Solve 2x2−18=02x^2 - 18 = 0.

2x2−18=02x2=18x2=9x=±3\begin{aligned} 2x^2 - 18 &= 0 \\ 2x^2 &= 18 \\ x^2 &= 9 \\ x &= \pm 3 \end{aligned}

If c=0c = 0, take xx out as a common factor.

Example 3. Solve 3x2−12x=03x^2 - 12x = 0.

3x2−12x=03x(x−4)=0\begin{aligned} 3x^2 - 12x &= 0 \\ 3x(x - 4) &= 0 \end{aligned}

A product is zero only when one of its factors is zero, so x=0x = 0 or x=4x = 4.

Careful Never divide both sides by xx. From 3x2=12x3x^2 = 12x that gives x=4x = 4 and quietly loses x=0x = 0, which is a perfectly good solution.

When it factors

When a=1a = 1, look for two numbers that multiply to cc and add up to bb.

Example 4. Solve x2−5x+6=0x^2 - 5x + 6 = 0. Two numbers with product 66 and sum −5-5 are −2-2 and −3-3.

x2−5x+6=0(x−2)(x−3)=0\begin{aligned} x^2 - 5x + 6 &= 0 \\ (x - 2)(x - 3) &= 0 \end{aligned}

So x=2x = 2 or x=3x = 3. If no such pair turns up within a few seconds, stop searching and go to Step 3.

Step 3: use the quadratic formula

The formula works for every quadratic equation:

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The expression under the root, D=b2−4acD = b^2 - 4ac, is the discriminant. Work it out first, on its own: it keeps the arithmetic clean, and it tells you what kind of answer to expect.

Example 5. Solve 2x2−7x+3=02x^2 - 7x + 3 = 0, the equation from Example 1, with a=2a = 2, b=−7b = -7 and c=3c = 3.

D=b2−4ac=(−7)2−4⋅2⋅3=49−24=25\begin{aligned} D &= b^2 - 4ac \\ &= (-7)^2 - 4 \cdot 2 \cdot 3 \\ &= 49 - 24 \\ &= 25 \end{aligned} x=−b±D2a=7±54\begin{aligned} x &= \frac{-b \pm \sqrt{D}}{2a} \\[6pt] &= \frac{7 \pm 5}{4} \end{aligned}

So x1=124=3x_1 = \frac{12}{4} = 3 and x2=24=12x_2 = \frac{2}{4} = \frac{1}{2}.

Example 6. Solve x2+4x−1=0x^2 + 4x - 1 = 0. No two whole numbers multiply to −1-1 and add up to 44, so the formula it is, with a=1a = 1, b=4b = 4 and c=−1c = -1.

D=42−4⋅1⋅(−1)=16+4=20\begin{aligned} D &= 4^2 - 4 \cdot 1 \cdot (-1) \\ &= 16 + 4 \\ &= 20 \end{aligned} x=−4±202=−4±252=−2±5\begin{aligned} x &= \frac{-4 \pm \sqrt{20}}{2} \\[6pt] &= \frac{-4 \pm 2\sqrt{5}}{2} \\[6pt] &= -2 \pm \sqrt{5} \end{aligned}

The root simplifies because 20=4⋅5=25\sqrt{20} = \sqrt{4 \cdot 5} = 2\sqrt{5}; then every term of the numerator is divided by 22.

Where the formula comes from

It is not a formula to take on trust. It is what you get when you complete the square in ax2+bx+c=0ax^2 + bx + c = 0: divide by aa, move the constant across, and add the square of half the coefficient of xx to both sides.

ax2+bx+c=0x2+bax=−cax2+bax+b24a2=b24a2−ca(x+b2a)2=b2−4ac4a2x+b2a=±b2−4ac2ax=−b±b2−4ac2a\begin{aligned} ax^2 + bx + c &= 0 \\[6pt] x^2 + \frac{b}{a}x &= -\frac{c}{a} \\[6pt] x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} &= \frac{b^2}{4a^2} - \frac{c}{a} \\[6pt] \left(x + \frac{b}{2a}\right)^2 &= \frac{b^2 - 4ac}{4a^2} \\[6pt] x + \frac{b}{2a} &= \pm\frac{\sqrt{b^2 - 4ac}}{2a} \\[6pt] x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \end{aligned}

The left side of the fourth line is a square, so it can never be negative. That is why everything hangs on the sign of b2−4acb^2 - 4ac.

What the discriminant tells you

Three parabolas and the x-axis. When D is greater than 0 the parabola crosses the axis twice, at 2 and 3. When D equals 0 it touches the axis once, at 3. When D is less than 0 it stays above the axis and never meets it. 2 3 D > 0 two solutions 3 D = 0 one solution D < 0 no real solution
The parabolas y = x² − 5x + 6, y = x² − 6x + 9 and y = x² + 2x + 5. The solutions of each equation are where its parabola meets the x-axis.

The solutions of ax2+bx+c=0ax^2 + bx + c = 0 are the points where the parabola y=ax2+bx+cy = ax^2 + bx + c meets the xx-axis, and the discriminant says how many there are.

  • D>0D > 0: two different solutions, and the parabola crosses the axis twice. For x2−5x+6=0x^2 - 5x + 6 = 0, D=25−24=1D = 25 - 24 = 1, and the solutions are 22 and 33.
  • D=0D = 0: one solution, and the parabola only touches the axis. For x2−6x+9=0x^2 - 6x + 9 = 0, D=36−36=0D = 36 - 36 = 0, and the solution is x=3x = 3, because the left side is (x−3)2(x - 3)^2.
  • D<0D < 0: no real solution, because a negative number has no real square root, and the parabola never reaches the axis. For x2+2x+5=0x^2 + 2x + 5 = 0, D=4−20=−16D = 4 - 20 = -16. Among the complex numbers it does have two solutions, x=−1±2ix = -1 \pm 2i.

Step 4: check in ten seconds

You don’t need to substitute the solutions back. For ax2+bx+c=0ax^2 + bx + c = 0, the two solutions always add up to −b/a-b/a and multiply to c/ac/a (Vieta’s formulas). For Example 5, −b/a=7/2-b/a = 7/2 and c/a=3/2c/a = 3/2:

x1+x2=3+12=72x1⋅x2=3⋅12=32\begin{aligned} x_1 + x_2 &= 3 + \frac{1}{2} = \frac{7}{2} \\[6pt] x_1 \cdot x_2 &= 3 \cdot \frac{1}{2} = \frac{3}{2} \end{aligned}

Both match, so the solutions are right. Forget that −b-b is +7+7 here, and the formula gives −12-\frac{1}{2} and −3-3: their product is still 32\frac{3}{2}, but their sum is −72-\frac{7}{2}, and the check catches it. That is why you check both.

Three mistakes that cost marks

Solving before the right side is zero. x(x−1)=6x(x - 1) = 6 does not give x=6x = 6 or x−1=6x - 1 = 6: a product equal to 66 says nothing about its factors. Only a product equal to zero does. Bring the 66 across first.

x(x−1)=6x2−x−6=0(x−3)(x+2)=0\begin{aligned} x(x - 1) &= 6 \\ x^2 - x - 6 &= 0 \\ (x - 3)(x + 2) &= 0 \end{aligned}

So x=3x = 3 or x=−2x = -2.

Losing the ±\pm. x2=9x^2 = 9 has two solutions, 33 and −3-3, and so does every equation x2=kx^2 = k with k>0k > 0.

Squaring a negative bb without brackets. With b=−7b = -7, b2=(−7)2=49b^2 = (-7)^2 = 49, not −49-49. Write the brackets every time you substitute a negative number.

In short

Standard form first, with the signs of aa, bb and cc. A missing term or easy factors: factor and set each factor to zero. Anything else: work out D=b2−4acD = b^2 - 4ac, then use the formula. Finally check that the solutions add up to −b/a-b/a and multiply to c/ac/a.

Frequently asked questions

What is the quadratic formula?

For ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \ne 0, the solutions are x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

How do you know how many solutions a quadratic equation has?

From the discriminant D=b2−4acD = b^2 - 4ac. If D>0D > 0 there are two real solutions, if D=0D = 0 there is one, and if D<0D < 0 there are none among the real numbers.

What is the fastest way to solve a quadratic equation?

If bb or cc is missing, or the factors are easy to see, factor. Otherwise use the quadratic formula, which always works.

Can a quadratic equation have no solution?

Not among the real numbers when D<0D < 0: the parabola never meets the xx-axis. Among the complex numbers it then has two solutions.

  • quadratic equations
  • quadratic formula
  • factoring
  • discriminant

← All lessons

Free download

The trigonometry formula sheet

Every trigonometry formula on nine printable pages: exact values, the reduction rules, every identity, and a full-page unit circle chart. No sign-up, just the PDF.

Download the PDF