Skip to content

Quadratic Formula Calculator

Solve ax² + bx + c = 0 with steps: decimal and exact radical roots, discriminant, vertex, sum and product of roots, factored form and a live parabola graph.

Enter the coefficients of ax² + bx + c = 0. Accepts integers, decimals, or fractions like 1/2.
x² +
x +
= 0
Show step-by-step solution

    Results

    Solutions
    x =
    x =
    Discriminant
    Vertex
    Axis of symmetry
    y-intercept
    Sum of roots
    r₁ + r₂ = −b / a
    Product of roots
    r₁ · r₂ = c / a

    Quick Answer

    The quadratic formula calculator solves ax² + bx + c = 0 with x = (−b ± √(b² − 4ac)) / 2a, returning both roots as decimals and in exact simplified-radical form. It also reports the discriminant, vertex, axis of symmetry, y-intercept, sum and product of the roots, and the factored form — with step-by-step working and a live parabola graph.

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

    This quadratic formula calculator solves any equation of the form ax² + bx + c = 0, where a is not zero. Type the three coefficients — integers, decimals or fractions like 1/2 — and it applies the quadratic formula, then reads off everything the formula hides: the discriminant, the vertex, the axis of symmetry, the sum and product of the roots, and the vertex and factored forms. For x² − 5x + 6 = 0 it returns x = 3 and x = 2, with a discriminant of 1 and a vertex at (2.5, −0.25).

    x = (−b ± √(b² − 4ac)) / 2a
    The expression under the root, b² − 4ac, is the discriminant D — its sign alone decides whether the two roots are real or complex, before you compute anything else.
    The quadratic formula x = (−b ± √(b² − 4ac)) / 2a with each part labelled — quadratic formula calculator
    Each part of the quadratic formula: the −b, the ± for the two solutions, the discriminant under the root, and 2a on the bottom.

    The Discriminant: What b² − 4ac Tells You Before You Solve

    The discriminant is the only part of the formula you need in order to know what kind of answer you are about to get. Wolfram MathWorld’s entry on the discriminant defines it for the general polynomial; for a quadratic it reduces to D = b² − 4ac, and its sign is decisive.

    Discriminant (D = b² − 4ac)What the roots look likeExample
    D > 0Two distinct real roots — the parabola crosses the x-axis twicex² − 6x + 5 = 0, D = 16
    D = 0One repeated real root — the parabola just touches the x-axisx² − 4x + 4 = 0, D = 0
    D < 0Two complex conjugate roots (a ± bi) — the parabola never touches the x-axisx² − 2x + 5 = 0, D = −16

    A perfect-square discriminant is worth spotting too: when D is a square number the roots come out rational and the quadratic factors cleanly over the integers. 2x² + 3x − 5 = 0 has D = 49, so its roots are exactly 1 and −2.5 with no radical involved. x² − 3x + 1 = 0 has D = 5, which is not a square, so the answer keeps its radical: x = (3 ± √5) / 2.

    How to Use the Quadratic Formula Calculator

    1. Enter a

      Type the number in front of (the leading coefficient). It cannot be 0, or the equation isn’t quadratic.

    2. Enter b

      Type the number in front of x. It can be positive, negative, zero or a fraction like 1/2.

    3. Enter c

      Type the constant (the number on its own). The roots, graph and all companion values appear instantly.

    4. Read the results

      The solutions card shows both roots with the exact form underneath. Open Show step-by-step solution for the full working, and use Share result to copy a link that reloads your exact equation.

    Worked Examples: Real, Repeated, Complex and Exact Radical Roots

    Every row reproduces the calculator’s output exactly — enter the coefficients and compare. Decimals are rounded to 4 places, the way the tool prints them.

    EquationD = b² − 4acRoots (decimal)Exact form
    x² − 5x + 6 = 01x = 3, x = 2x = 3, 2
    2x² + 3x − 5 = 049x = 1, x = −2.5x = 1, −5/2
    x² − 3x + 1 = 05x = 2.618, x = 0.382x = (3 ± √5) / 2
    3x² − 12x + 7 = 060x = 3.291, x = 0.709x = (6 ± √15) / 3
    x² − 4x + 4 = 00x = 2 (repeated)x = 2
    x² − 2x + 5 = 0−16x = 1 + 2i, x = 1 − 2ix = 1 ± 2i

    Here is the third row solved the way the calculator’s step-by-step panel shows it, for x² − 3x + 1 = 0:

    1. Identify coefficients

      a = 1, b = −3, c = 1.

    2. Compute the discriminant

      D = b² − 4ac = 9 − 4 = 5. Positive, so there are two distinct real roots.

    3. Take the square root

      √5 = 2.2361.

    4. Apply the formula

      x = (3 ± 2.2361) / 2, giving x = 2.618 or x = 0.382 — exact form x = (3 ± √5) / 2. The vertex lands at (1.5, −1.25).

    For whole-number coefficients the calculator always prints the exact answer with a simplified radical — √48 becomes 4√3 — and when the discriminant is negative it gives the exact complex form, such as x = 1 ± 2i or x = (−1 ± i√3) / 2.

    Simplified Radicals: Why √48 Becomes 4√3

    When the discriminant is not a perfect square, the calculator pulls every square factor out from under the root rather than leaving a decimal. It then divides −b, the radical coefficient and 2a by their common factor, which is why 3x² − 12x + 7 = 0 prints as x = (6 ± √15) / 3 and not the unreduced (12 ± 2√15) / 6.

    RadicalSimplifiedDecimal
    √82√22.8284
    √122√33.4641
    √183√24.2426
    √202√54.4721
    √484√36.9282
    √726√28.4853

    If you want to practise that step on its own, the Square Root Calculator simplifies a radical without the surrounding equation.

    Vertex, Axis of Symmetry and the Parabola Graph

    The vertex is the turning point, at h = −b / (2a) with k = f(h), and the axis of symmetry is the vertical line x = h through it. On the live graph the amber dashed line is that axis, the amber dot is the vertex, and the red dots mark the real roots where the parabola crosses the x-axis. When the discriminant is negative there are no red dots — the whole parabola sits on one side of the axis.

    There is a useful check hiding in this: the axis of symmetry is always the midpoint of the two roots. For x² − 5x + 6 = 0 the roots 3 and 2 have midpoint 2.5, which is exactly the axis. For 2x² + 3x − 5 = 0 the roots 1 and −2.5 have midpoint −0.75, again the axis. It holds for complex roots too, where the axis equals their shared real part.

    ResultFormulaFor x² − 5x + 6 = 0
    DiscriminantD = b² − 4ac1
    Vertexh = −b / (2a), k = f(h)(2.5, −0.25)
    Axis of symmetryx = −b / (2a)x = 2.5
    y-intercept(0, c)(0, 6)
    Sum of rootsr₁ + r₂ = −b / a5
    Product of rootsr₁ · r₂ = c / a6
    Vertex forma(x − h)² + k(x − 2.5)² − 0.25
    Factored forma(x − r₁)(x − r₂)(x − 3)(x − 2)

    Converting Standard Form to Vertex Form

    Vertex form is a(x − h)² + k, and the calculator builds it from the same h and k it already computed — no completing the square by hand. The sign flips are where mistakes happen: a positive h shows as (x − h), a negative h as (x + |h|).

    Standard formVertex (h, k)Vertex form
    x² − 5x + 6 = 0(2.5, −0.25)(x − 2.5)² − 0.25
    2x² + 3x − 5 = 0(−0.75, −6.125)2(x + 0.75)² − 6.125
    x² − 6x + 5 = 0(3, −4)(x − 3)² − 4
    3x² − 12x + 7 = 0(2, −5)3(x − 2)² − 5
    x² − 4x + 4 = 0(2, 0)(x − 2)²

    Note the last row: when the discriminant is zero, k is zero and the + k term disappears entirely, leaving a perfect square.

    Complex Roots: When the Discriminant Is Negative

    A negative discriminant means no real solution exists, and the two roots become complex conjugates — same real part, opposite imaginary parts. The real part is the axis of symmetry −b / (2a), and the imaginary part is √(−D) / (2a).

    For x² − 2x + 5 = 0, D = −16, so the roots are 1 + 2i and 1 − 2i and the vertex sits at (1, 4) — four units above the x-axis, which is why nothing crosses it. For x² + x + 1 = 0, D = −3 gives −0.5 ± 0.866i, printed exactly as x = (−1 ± i√3) / 2.

    Complex roots still satisfy Vieta’s formulas. For x² − 2x + 5 = 0 the two conjugates sum to 2 (which is −b/a) and multiply to 5 (which is c/a), even though neither root is a real number. The sum and product readouts never stop working.

    Sum and Product of Roots: Checking an Answer in Seconds

    Vieta’s formulas relate the roots to the coefficients directly: the roots always add to −b / a and multiply to c / a, whatever the discriminant does. That makes them the fastest hand-check available — solve, then confirm the pair.

    For 2x² + 3x − 5 = 0 the roots 1 and −2.5 sum to −1.5 and multiply to −2.5, matching −b/a and c/a exactly. That same sum-and-product pair is what the Diamond Problem Calculator drills when you are learning to factor, and the factored form the calculator prints — (x − 3)(x − 2) for x² − 5x + 6 — is the end point of that same idea. When the discriminant is negative, the factored form is reported as not factorable over the real numbers, which is correct rather than an error.

    Quadratic Formula Calculator: FAQ

    With a = 0 the x² term disappears and the equation becomes linear (bx + c = 0), so the quadratic formula does not apply. The calculator flags this and asks for a non-zero a.

    A negative discriminant (b² − 4ac < 0) means no real solutions exist, so the two roots are complex conjugates written with i, the square root of −1. The parabola never touches the x-axis, and for whole-number inputs the exact form is shown too, such as x = 1 ± 2i.

    Yes — type fractions like 1/2 or −3/4 straight into a, b, or c; decimals and negatives work too. The math runs on the decimal value of each fraction.

    They are Vieta’s formulas: the two roots always add up to −b/a and multiply to c/a, whatever the discriminant is. Use them to check an answer instantly — for x² − 5x + 6 = 0 the roots 3 and 2 give sum 5 and product 6.

    Rewrite it in standard form as x² + 0x − 49 = 0 and enter a = 1, b = 0, c = −49. The calculator returns x = 7 and x = −7.

    When all three coefficients are whole numbers, the calculator prints the answer with a simplified radical — √48 becomes 4√3 — next to the rounded decimals. This is the form most algebra classes ask for on homework.

    It is the −b/(2a) part of the formula on its own, before the ± term is applied. Equivalently it is the midpoint of the two roots: for x² − 5x + 6 = 0 the roots 3 and 2 give a midpoint of 2.5, which is the axis.

    It reuses the vertex it already found: h = −b/(2a) and k = f(h), then writes a(x − h)² + k. For 2x² + 3x − 5 = 0 the vertex is (−0.75, −6.125), so vertex form is 2(x + 0.75)² − 6.125.

    The red dots mark real roots on the x-axis, so a negative discriminant produces none. For x² − 2x + 5 = 0 the vertex sits at (1, 4), four units clear of the axis, and the parabola never reaches it.

    Yes — a discriminant that is a perfect square gives rational roots, so the quadratic factors over the integers. 2x² + 3x − 5 = 0 has D = 49 and factors cleanly, while x² − 3x + 1 = 0 has D = 5 and keeps its radical.
    Made with care

    Want a calculator
    built just for you?

    Share the formula, the inputs, and who it's for — most reader-requested calculators ship within 14 days.

    Calculator illustration