Quadratic Formula Calculator

Hand writing mathematical equations in chalk on a blackboard

Solve Any Quadratic Equation — With the Work Shown

Get the Answer and Understand It

Most quadratic formula calculators hand you two decimal answers and stop there. That is fine when you only need the roots, but it teaches you nothing — and when the answer looks wrong, you have no way to spot where things went sideways. This free quadratic formula calculator takes the other approach: it solves ax² + bx + c = 0 and shows every substitution, from the discriminant calculation to each root worked out line by line.

You also get what quick solvers skip: the exact form of the answer (handy when the root is a surd like (5 + √2)/2 instead of a rounded decimal), a reading of the discriminant, and a built-in self-check using the sum and product of the roots. Complex roots are handled too, displayed in clean a ± bi form instead of an error message.

Free Quadratic Formula Calculator

Solves ax² + bx + c = 0 · shows every step

x² − 5x + 6 = 0

Please enter all three coefficients. Coefficient a cannot be zero — that would make it a linear equation, not a quadratic.

–
solutions (roots)
–
Discriminant (b² − 4ac)
–
Exact form
–
Sum of roots (−b/a)
–
Product of roots (c/a)
Show your work
    Person writing out step-by-step math working in a notebook
    Expand “Show your work” under the results to see each root computed with your own numbers substituted in.

    How to Use This Calculator

    1. Enter coefficient a. The number in front of x². It cannot be zero — with a = 0 the equation is linear, not quadratic, and the calculator will tell you so.
    2. Enter coefficient b. The number in front of x, including its sign. For x² − 5x + 6 = 0, b is −5.
    3. Enter the constant c. The plain number at the end of the equation.
    4. Click Solve Equation. The roots appear at the top with the discriminant, the exact form, and the sum/product check below.
    5. Open “Show your work”. Expand the panel to follow the discriminant computation, the substitution into the formula, and each root solved step by step with your values in place.

    What Is the Quadratic Formula?

    A quadratic equation is any equation that can be written in the standard form ax² + bx + c = 0, where a is not zero. Its roots (or solutions) are the x-values that make the equation true — graphically, the points where the parabola y = ax² + bx + c crosses the x-axis.

    The quadratic formula, x = (−b ± √(b² − 4ac)) / 2a, solves every quadratic equation in one shot. It is derived by completing the square on the general form, which means it cannot miss: unlike factoring, it works whether or not the roots are nice integers. The expression under the square root, b² − 4ac, is the discriminant, and its sign alone decides what kind of roots you will get:

    Discriminant Roots What the parabola does
    Positive Two distinct real roots Crosses the x-axis twice
    Zero One repeated real root Just touches the x-axis (vertex sits on it)
    Negative Two complex conjugate roots Never touches the x-axis

    One more relationship worth knowing: for any quadratic, the sum of the roots equals −b/a and the product equals c/a. The calculator checks both against your answers automatically — if the check fails, something was typed in wrong.

    The Formula (With a Worked Example)

    x = (−b ± √(b² − 4ac)) / 2a
    Discriminant: D = b² − 4ac
    Sum of roots = −b/a  ·  Product of roots = c/a

    Worked example. Solve x² − 5x + 6 = 0 (a = 1, b = −5, c = 6):

    1. Discriminant: D = (−5)² − 4(1)(6) = 25 − 24 = 1. Positive, so two real roots.
    2. Substitute: x = (−(−5) ± √1) / (2·1) = (5 ± 1) / 2.
    3. Root 1: x₁ = (5 + 1) / 2 = 6/2 = 3.
    4. Root 2: x₂ = (5 − 1) / 2 = 4/2 = 2.
    5. Check: sum 3 + 2 = 5 = −b/a ✓; product 3·2 = 6 = c/a ✓.

    Complex example. For x² + 1 = 0 (a = 1, b = 0, c = 1): D = 0 − 4 = −4, so √D = 2i and x = (0 ± 2i)/2, giving x = i and x = −i.

    Worked Examples for Every Discriminant Case

    Two real roots: x² + 5x + 6 = 0

    Here a = 1, b = 5, c = 6, so D = 25 − 24 = 1 — positive: two real roots. x = (−5 ± √1) ÷ 2 gives x₁ = −2 and x₂ = −3.

    Check by substitution: (−2)² + 5(−2) + 6 = 4 − 10 + 6 = 0 ✓ and (−3)² + 5(−3) + 6 = 9 − 15 + 6 = 0 ✓. Vieta agrees: the roots sum to −5 = −b/a and multiply to 6 = c/a.

    Repeated root: x² − 4x + 4 = 0

    Here a = 1, b = −4, c = 4, so D = 16 − 16 = 0. The formula collapses to a single value, x = 4 ÷ 2 = 2 — one repeated root. Check: 4 − 8 + 4 = 0 ✓. Graphically, the parabola just touches the x-axis there.

    The vertex sits between the roots

    The turning point lies on the axis of symmetry, x = −b/2a — halfway between the roots. For the baseline example (roots 2 and 3) the axis is x = 2.5, and substituting back gives y = −0.25: the vertex is (2.5, −0.25), the curve’s lowest point.

    Tips for Solving Quadratics

    • Read the signs carefully. The most common mistake is dropping the minus on b or c. Copy the equation exactly, signs included, before touching the formula.
    • Let the discriminant guide you. Compute b² − 4ac first — it tells you whether to expect two answers, one, or complex roots before you do any division.
    • Always run the Vieta check. Add your two roots and multiply them. If the sum is not −b/a or the product is not c/a, recheck the arithmetic, not the formula.
    • Keep exact forms for surds. When the discriminant is not a perfect square, the exact form (5 ± √2)/2 carries no rounding error — use it in further algebra and only decimalize at the end.
    • Watch the a = 0 case. If the x² term vanishes, you have a linear equation bx + c = 0 with a single solution x = −c/b — the quadratic formula does not apply.
    • Remember what the roots mean. Real roots are x-intercepts of the parabola. Complex roots mean the parabola floats entirely above or below the x-axis — common when the discriminant is negative.

    Related Tools

    FAQs

    How do you use the quadratic formula step by step?

    First read off a, b, and c from ax² + bx + c = 0. Then compute the discriminant D = b² − 4ac. Next substitute into x = (−b ± √D) / 2a, and evaluate the “+” branch and the “−” branch separately to get the two roots. The calculator above does all of this with your numbers substituted in, under “Show your work”.

    What does the discriminant tell you?

    The discriminant D = b² − 4ac reveals the nature of the roots before you finish solving: a positive discriminant means two distinct real roots, zero means one repeated real root, and a negative discriminant means two complex conjugate roots. It is the part of the formula under the square root.

    What are complex roots in a quadratic?

    When the discriminant is negative, the square root produces the imaginary unit i, giving roots of the form p ± qi (for example, x² + 1 = 0 gives x = i and x = −i). Graphically, the parabola never crosses the x-axis. This calculator displays complex roots in clean a ± bi form.

    What if a is zero in the quadratic formula?

    Then it is not a quadratic equation — with a = 0, the x² term disappears and you are left with the linear equation bx + c = 0, whose single solution is x = −c/b. The quadratic formula requires dividing by 2a, so a = 0 is invalid. The calculator flags this with an error message.

    How do I check my roots are correct?

    Use Vieta’s formulas: the two roots must add up to −b/a and multiply to c/a. For x² − 5x + 6 = 0, the roots 3 and 2 sum to 5 and multiply to 6 — both correct. The calculator runs this check automatically and shows the expected sum and product.

    Should I use the exact form or the decimal?

    Use the exact form whenever the discriminant is not a perfect square — for example (5 ± √2)/2 instead of 3.2071 and 1.7929. Exact forms carry zero rounding error through further algebra; decimals are for final answers and measurements. The calculator shows both.

    What is a repeated (double) root?

    When the discriminant equals zero, both branches of the ± give the same value, x = −b/2a. The parabola’s vertex sits exactly on the x-axis, touching it at one point instead of crossing. For example, x² − 4x + 4 = 0 has the repeated root x = 2.

    Where is the vertex of the parabola?

    At x = −b ÷ 2a — exactly halfway between the two roots when they exist. For x² − 5x + 6 the vertex x-coordinate is 2.5, and substituting back gives y = −0.25, so the vertex is (2.5, −0.25), the lowest point of the upward-opening parabola.

    Working with whole numbers next?
    Find common factors with our GCF calculator.

    Related Calculators

    Scroll to Top