Back to Blog
    Math

    How to Solve Quadratic Equations Step by Step (With Examples)

    Y
    Ytools Team
    October 2, 2026 5 min read
    Share →
    Quadratic equations solved — the quadratic formula

    A quadratic equation can always be solved — the only question is which method is quickest. This guide shows the one method that works every time (the quadratic formula), the single number that tells you what kind of answer to expect (the discriminant), and two shortcuts for when the numbers are friendly. Every example is fully worked and checked.

    What is a quadratic equation?

    A quadratic equation is any equation that can be written in standard form

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

    The highest power of xx is 2. Its graph is a parabola, and the solutions (also called roots) are the xx-values where the parabola meets the xx-axis. A quadratic has at most two distinct real roots.

    The quadratic formula

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

    The "±\pm" means you calculate twice — once with ++ and once with −- — to get both roots.

    How to solve a quadratic equation step by step

    Step 1 — Write it in standard form and identify a, b, c

    Move every term to one side so the other side is 0. Keep the signs with the numbers: in 2x2+5x−3=02x^2 + 5x - 3 = 0, c=−3c = -3, not 3.

    Step 2 — Calculate the discriminant

    D=b2−4acD = b^2 - 4ac. This tells you how many real roots there are before you finish.

    Step 3 — Apply the formula

    Substitute aa, bb and D\sqrt{D} into the formula.

    Step 4 — Simplify and check

    Simplify both roots and substitute at least one back into the original equation.

    What the discriminant tells you

    Three parabolas showing a positive, zero and negative discriminant
    Three parabolas showing a positive, zero and negative discriminant
    DiscriminantNumber of real rootsWhat the graph does
    D>0D > 0Two different real rootsCrosses the x-axis twice
    D=0D = 0One repeated real rootTouches the x-axis once
    D<0D < 0No real roots (two complex roots)Never reaches the x-axis

    If DD is a perfect square (1, 4, 9, 16, 25, 49…), the roots are rational and the quadratic can also be factored.

    Worked examples

    Two real roots: 2x2+5x−3=02x^2 + 5x - 3 = 0

    Worked solution of 2x² + 5x − 3 = 0 using the quadratic formula
    Worked solution of 2x² + 5x − 3 = 0 using the quadratic formula
    1. a=2a = 2, b=5b = 5, c=−3c = -3
    2. D=52−4(2)(−3)=25+24=49D = 5^2 - 4(2)(-3) = 25 + 24 = 49 → two real roots, and 49 is a perfect square
    3. x=−5±492(2)=−5±74x = \frac{-5 \pm \sqrt{49}}{2(2)} = \frac{-5 \pm 7}{4}
    4. x1=−5+74=24=12x_1 = \frac{-5 + 7}{4} = \frac{2}{4} = \frac{1}{2} and x2=−5−74=−124=−3x_2 = \frac{-5 - 7}{4} = \frac{-12}{4} = -3
    5. Check x=12x = \frac12: 2(14)+52−3=12+52−3=02(\frac14) + \frac52 - 3 = \frac12 + \frac52 - 3 = 0 ✓. Check x=−3x=-3: 2(9)−15−3=02(9) - 15 - 3 = 0 ✓

    One repeated root: x2−6x+9=0x^2 - 6x + 9 = 0

    a=1a=1, b=−6b=-6, c=9c=9. D=36−36=0D = 36 - 36 = 0, so x=6±02=3x = \frac{6 \pm 0}{2} = 3. This is a perfect square: (x−3)2=0(x-3)^2 = 0.

    Complex roots: x2+2x+5=0x^2 + 2x + 5 = 0

    D=4−20=−16D = 4 - 20 = -16. There are no real roots. Using −16=4i\sqrt{-16} = 4i: x=−2±4i2=−1±2ix = \frac{-2 \pm 4i}{2} = -1 \pm 2i. If your course only works with real numbers, the answer is simply "no real solutions".

    Faster methods when they work

    Factoring: x2−x−2=0x^2 - x - 2 = 0

    Find two numbers that multiply to c=−2c = -2 and add to b=−1b = -1: they are −2-2 and 11. So (x−2)(x+1)=0(x - 2)(x + 1) = 0, giving x=2x = 2 or x=−1x = -1.

    Completing the square: x2+6x+5=0x^2 + 6x + 5 = 0

    Move the constant: x2+6x=−5x^2 + 6x = -5. Add (62)2=9(\frac{6}{2})^2 = 9 to both sides: (x+3)2=4(x+3)^2 = 4. So x+3=±2x + 3 = \pm 2, giving x=−1x = -1 or x=−5x = -5. (Completing the square on ax2+bx+c=0ax^2+bx+c=0 in general is how the quadratic formula is derived.)

    Quick check: sum and product of roots

    For ax2+bx+c=0ax^2+bx+c=0, the roots satisfy x1+x2=−bax_1 + x_2 = -\frac{b}{a} and x1x2=cax_1 x_2 = \frac{c}{a}. For 2x2+5x−3=02x^2+5x-3=0: 12+(−3)=−52\frac12 + (-3) = -\frac52 ✓ and 12×(−3)=−32\frac12 \times (-3) = -\frac32 ✓. Ten seconds, and you know both roots are right.

    Common mistakes

    • Using the wrong sign for cc (or bb) — copy signs with the numbers.
    • Writing −b2-b^2 instead of b2b^2: b2b^2 is always non-negative, even when bb is negative.
    • Dividing only D\sqrt{D} by 2a2a instead of the whole numerator.
    • Forgetting to set the equation equal to zero before reading off aa, bb, cc.
    • Stopping after one root.

    Use the quadratic equation calculator

    Enter aa, bb and cc into the quadratic equation calculator to see the discriminant and each step. If a root involves a surd, the square root calculator helps simplify it. New to equations? Start with solving linear equations.

    FAQ

    What is the quadratic formula? x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2-4ac}}{2a}, which gives the roots of ax2+bx+c=0ax^2+bx+c=0 for a≠0a \neq 0.

    How do I solve a quadratic equation step by step? Write it as ax2+bx+c=0ax^2+bx+c=0, identify aa, bb, cc, calculate b2−4acb^2-4ac, substitute into the formula, then simplify and check.

    What happens when the discriminant is zero? There is exactly one (repeated) real root, x=−b2ax = -\frac{b}{2a}, and the parabola just touches the x-axis.

    What if the discriminant is negative? There are no real roots; the two roots are complex numbers.

    Is factoring or the quadratic formula better? Factoring is faster when the discriminant is a perfect square; the formula always works.

    Can an online calculator show the steps? Yes — the quadratic equation calculator shows the discriminant and full working.

    Conclusion

    Put the equation in standard form, compute the discriminant, apply the formula and check with the sum and product of the roots. When the discriminant is a perfect square, factoring is a quicker route to the same answer.

    Further reading: Wolfram MathWorld — Quadratic Formula, Discriminant · OpenStax College Algebra 2e.