Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula. Get real or complex roots, the discriminant, exact form, vertex and full working.

Quadratic formula calculator

Solve ax² + bx + c = 0

Solutions

    Working

    Uses x = (−b ± √(b² − 4ac)) ÷ 2a. Gives real or complex roots, an exact form when a, b and c are whole numbers, and the vertex, axis of symmetry and intercepts of the parabola.

    On this page

    A quadratic formula calculator solves any equation of the form ax² + bx + c = 0 using x = (−b ± √(b² − 4ac)) ÷ 2a, and shows whether the roots are real or complex. Along with the solutions, it gives the discriminant, an exact answer with square roots when the coefficients are whole numbers, the factored form, the vertex, the axis of symmetry and the vertex form of the parabola, with every step of the working.

    For example, x² − 3x + 2 = 0 has the solutions x = 1 and x = 2. The equation 2x² + 4x − 3 = 0 has the exact solutions x = (−2 ± √10) ÷ 2, which are about 0.581 and −2.581, and x² + 2x + 5 = 0 has the complex solutions x = −1 ± 2i.

    How to use the quadratic formula calculator

    1. Rearrange your equation so that one side is zero, in the form ax² + bx + c = 0.
    2. Enter a, the number in front of x², which cannot be zero.
    3. Enter b, the number in front of x, and c, the constant. Use 0 for a missing term and include minus signs. Decimals and simple fractions such as 1/2 are accepted.
    4. Press Solve to see the solutions, the discriminant and the full working.

    The quadratic formula

    Every quadratic equation ax² + bx + c = 0 with a ≠ 0 can be solved with one formula:

    x = (−b ± √(b² − 4ac)) ÷ 2a

    The ± sign means there are usually two answers: one using the plus sign and one using the minus sign. The formula always works, even when the equation can’t be factored neatly, which is why it’s one of the most widely used results in algebra.

    The discriminant

    The expression under the square root, D = b² − 4ac, is called the discriminant. It tells you what kind of solutions to expect before you finish the calculation:

    DiscriminantSolutionsGraph of y = ax² + bx + c
    D > 0Two different real solutionsCrosses the x-axis twice
    D = 0One repeated real solutionTouches the x-axis at the vertex
    D < 0Two complex solutions, no real onesDoesn’t touch the x-axis

    If the discriminant is a perfect square, such as 1, 4, 9 or 16, and a, b and c are whole numbers, the solutions are rational and the equation can be factored.

    Worked examples

    Two real solutions

    Solve x² − 3x + 2 = 0. Here a = 1, b = −3 and c = 2. The discriminant is (−3)² − 4 × 1 × 2 = 9 − 8 = 1. So x = (3 ± √1) ÷ 2 = (3 ± 1) ÷ 2, giving x = 2 and x = 1. The factored form is (x − 1)(x − 2).

    Solutions with a square root

    Solve 2x² + 4x − 3 = 0. The discriminant is 4² − 4 × 2 × (−3) = 16 + 24 = 40. So x = (−4 ± √40) ÷ 4. Since √40 = 2√10, this simplifies to x = (−2 ± √10) ÷ 2, or about 0.581 and −2.581.

    One repeated solution

    Solve x² − 4x + 4 = 0. The discriminant is 16 − 16 = 0, so there’s one solution: x = 4 ÷ 2 = 2. The equation is the perfect square (x − 2)² = 0.

    Complex solutions

    Solve x² + 2x + 5 = 0. The discriminant is 4 − 20 = −16. The square root of −16 is 4i, where i is the imaginary unit with i² = −1. So x = (−2 ± 4i) ÷ 2 = −1 ± 2i.

    The vertex and the parabola

    The graph of y = ax² + bx + c is a U-shaped curve called a parabola. It opens upward when a is positive and downward when a is negative. Its turning point, the vertex, lies on the axis of symmetry x = −b ÷ 2a, exactly halfway between the two roots. Substituting this x-value back into the equation gives the y-coordinate of the vertex, which is the minimum value of the function when a > 0 and the maximum when a < 0.

    The vertex form y = a(x − h)² + k shows the vertex (h, k) directly. For y = x² − 3x + 2, the vertex is at (1.5, −0.25), so the vertex form is y = (x − 1.5)² − 0.25. The y-intercept, where the curve crosses the y-axis, is always (0, c).

    Sum and product of the roots

    For any quadratic, the two roots x₁ and x₂ satisfy simple relationships, known as Vieta’s formulas: x₁ + x₂ = −b ÷ a and x₁ × x₂ = c ÷ a. They’re a quick way to check an answer. For x² − 3x + 2 = 0, the roots 1 and 2 add up to 3 = −(−3) ÷ 1 and multiply to 2 = 2 ÷ 1.

    Other ways to solve quadratic equations

    • Factoring: fastest when the roots are whole numbers or simple fractions. Find two numbers that multiply to ac and add to b.
    • Completing the square: rewrite the equation as a(x − h)² + k = 0 and solve for x. The quadratic formula itself is derived this way.
    • Square roots: when b = 0, as in x² − 9 = 0, simply take square roots: x = ±3.
    • Graphing: the x-intercepts of the parabola are the real solutions, which is useful for estimates.

    The quadratic formula works in every case, so it’s the safest choice when the numbers are awkward.

    Real-world uses of quadratic equations

    Projectile motion

    A ball thrown upward at 20 m/s from a height of 1.5 m follows h = −4.9t² + 20t + 1.5, where t is the time in seconds. Setting h = 0 and using the formula gives t ≈ 4.16 seconds, the time when the ball lands. The vertex gives the highest point: at t = 20 ÷ 9.8 ≈ 2.04 seconds, the ball reaches about 21.9 m.

    Area problems

    A rectangle is 3 m longer than it is wide and has an area of 40 m². If the width is w, then w(w + 3) = 40, or w² + 3w − 40 = 0. The discriminant is 9 + 160 = 169, so w = (−3 ± 13) ÷ 2, giving w = 5 or w = −8. A width can’t be negative, so the rectangle is 5 m by 8 m.

    Business and economics

    Revenue and profit often follow quadratic curves, because raising a price increases income per sale but reduces the number of sales. The vertex shows the price that gives the highest revenue, and the roots show the break-even points.

    Common mistakes

    • Forgetting to move every term to one side, so that the equation equals zero, before reading off a, b and c.
    • Dropping the minus sign of b or c. In x² − 5x − 6 = 0, b is −5 and c is −6.
    • Writing −b² instead of b². The discriminant uses b squared, which is never negative: (−3)² = 9.
    • Dividing only the square root by 2a instead of the whole numerator −b ± √D.
    • Rejecting complex answers as errors. A negative discriminant simply means the parabola doesn’t cross the x-axis.

    Tips for solving quadratics

    • Calculate the discriminant first. It tells you which kind of answer to expect.
    • If a, b and c share a common factor, divide it out first to make the numbers smaller.
    • Check each root by substituting it back into the original equation; the result should be zero.
    • In word problems, discard solutions that make no physical sense, such as negative lengths or times.

    Related calculations

    For related questions, use the number sequence calculator to find the nth term and sum of a sequence, or the slope calculator to find the slope and equation of a line.

    Frequently asked questions

    x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any equation ax² + bx + c = 0 where a is not zero.

    The discriminant b² − 4ac shows the number and type of solutions: positive means two real solutions, zero means one repeated solution, and negative means two complex solutions.

    There are no real solutions. The solutions are complex numbers of the form p ± qi, and the parabola doesn't cross the x-axis.

    If a = 0, the x² term disappears and the equation becomes linear, bx + c = 0, with the single solution x = −c ÷ b.

    Rearrange the equation so one side is zero and the terms are in order: x², then x, then the constant. For 3x² = 5x − 2, rewrite it as 3x² − 5x + 2 = 0, so a = 3, b = −5 and c = 2.

    Yes. It works for every quadratic equation, including ones that can't be factored with whole numbers and ones with complex roots.

    The x-coordinate is −b ÷ 2a. Substitute it into the equation to get the y-coordinate. For x² − 3x + 2, the vertex is (1.5, −0.25).

    Factor when you can quickly see two numbers that multiply to ac and add to b. If not, the quadratic formula is faster and never fails.

    x = 3 and x = −3. Here b = 0, so you can simply take the square root of 9.

    It comes from completing the square on ax² + bx + c = 0 and then solving for x.

    Yes. Enter values such as 0.5, −1.25 or 1/2. Exact square-root answers are shown when a, b and c are whole numbers.

    It means plus or minus. Work out the formula once with + and once with − to get the two solutions.

    Substitute each solution into ax² + bx + c. The result should be zero, allowing for small rounding differences.