CalcTrace

Quadratic Formula Calculator

Enter the three coefficients of ax² + bx + c = 0 to get the roots, whether they are real or complex. You also get the discriminant, the vertex and axis of symmetry, the factored form when the roots are rational, and a sketch of the parabola.

Last updated .

Coefficients

ax² + bx + c = 0

a is the number in front of x², b is the number in front of x, and c is the number on its own. Include the minus sign for a negative coefficient, use 1 where no number is written, and use 0 for a missing term. Move everything to one side first so the other side is 0.

Result

Solutions

–

Show the working

    The quadratic formula

    A quadratic equation is any equation that can be rearranged into the form ax² + bx + c = 0, where a is not zero. Its solutions, also called roots, come from one formula.

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

    Here a is the coefficient of x², b is the coefficient of x and c is the constant term. The ± sign means the formula is used twice, once adding the square root and once subtracting it, which is why a quadratic usually has two solutions.

    Discriminant: D = b² − 4ac

    The expression under the square root is called the discriminant, and its sign decides what kind of roots there are before any further work is done:

    Vertex: x = −b ÷ (2a),   y = c − b² ÷ (4a)

    The vertex is the turning point of the parabola y = ax² + bx + c. It is the lowest point when a is positive and the highest when a is negative. The vertical line through it, x = −b ÷ (2a), is the axis of symmetry, and the two roots sit at equal distances either side of it.

    Worked example: 2x² + 5x − 3 = 0

    1. Read off the coefficients. a = 2, b = 5 and c = −3.
    2. Find the discriminant. D = 5² − 4 × 2 × (−3) = 25 + 24 = 49. It is positive, so there are two real roots, and it is a perfect square, so they will be rational.
    3. Apply the formula. √49 = 7, so x = (−5 ± 7) ÷ 4.
    4. Take each sign in turn. x = (−5 + 7) ÷ 4 = 0.5 and x = (−5 − 7) ÷ 4 = −3.
    5. Check. The roots should add to −b ÷ a = −2.5 and multiply to c ÷ a = −1.5. Indeed 0.5 + (−3) = −2.5 and 0.5 × (−3) = −1.5.
    6. Find the vertex. x = −5 ÷ 4 = −1.25, midway between the roots, and y = −3 − 25 ÷ 8 = −6.125.

    Because the roots are rational, the quadratic factorises: 2x² + 5x − 3 = (x + 3)(2x − 1). Each bracket is zero at one of the roots.

    The other two cases

    A repeated root. For x² − 6x + 9 = 0 the discriminant is 36 − 36 = 0, so the only root is x = 6 ÷ 2 = 3 and the quadratic is the perfect square (x − 3)².

    Complex roots. For x² + 2x + 5 = 0 the discriminant is 4 − 20 = −16. The square root of −16 is 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i. Complex roots of a quadratic with real coefficients always come as such a pair, with the same real part and opposite imaginary parts.

    Irrational roots. For x² − 2x − 4 = 0 the discriminant is 4 + 16 = 20, which is not a perfect square. The exact roots are 1 ± √5, about 3.2361 and −1.2361. There is no factorisation with whole numbers, which is exactly the situation the formula was made for.

    Common mistakes

    Losing the sign of b or c

    The formula starts with −b. If b is itself negative, −b is positive: for x² − 5x + 6 = 0, −b is +5, D = 25 − 24 = 1, and the roots are (5 ± 1) ÷ 2, giving 3 and 2. In the same way, a negative c makes −4ac positive, as in the worked example.

    Dividing only part of the top by 2a

    The whole of −b ± √D is divided by 2a, not just the square root. On a calculator, put brackets around the top.

    Not rearranging first

    The formula needs zero on one side. An equation such as x² = 5x − 6 must be rewritten as x² − 5x + 6 = 0 before a, b and c are read off.

    Keeping a root that makes no sense

    In applied problems one root is often rejected. A ball thrown upwards at 20 metres per second from a height of 1.5 metres has height −4.9t² + 20t + 1.5 after t seconds. Setting that to zero gives t = −0.07 and t = 4.16. Only the positive root, 4.16 seconds, is the landing time. The vertex gives something useful too: the ball is highest at t = 2.04 seconds, at 21.91 metres.