free tool, no sign-up

Quadratic Formula Calculator

Solve ax² + bx + c = 0 with the quadratic formula. See the discriminant, exact roots, decimals, and the vertex.

Solve ax² + bx + c = 0

Use 0 only for a linear equation

Use 0 when there is no x term

Use 0 when there is no constant

x = 3 or x = 2.

Formula

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

x² − 5x + 6 = 0

Discriminant

D = b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1

D = 1, which is greater than 0, so there are two real roots. D is a perfect square, so both roots are rational numbers.

With your numbers

x = (−b ± √D) / (2a) = (5 ± √1) / 2

√1 = 1. x = (5 + 1) / 2 = 3 and x = (5 − 1) / 2 = 2.

Roots

The plus root is (−b + √D) / (2a). The minus root is (−b − √D) / (2a).

Plus root

3

Minus root

2

Vertex

x = −b / (2a) = −(−5) / (2(1)) = 5/2 = 2.5

y = −D / (4a) = −(1) / (4(1)) = −1/4 = −0.25

Vertex: (5/2, −1/4) = (2.5, −0.25)

Sum of the roots = −b / a = 5. Product of the roots = c / a = 6.

Examples

This quadratic formula calculator solves ax² + bx + c = 0 for algebra students checking a homework equation. Enter a, b, and c and the page substitutes those numbers into the discriminant and the quadratic formula, then lists the roots in exact form and as decimals. It covers two real roots, a repeated root, and complex roots written as p ± qi, and it shows the vertex. If a is 0, it solves the linear equation bx + c = 0.

Two real roots, one repeated root, or a complex pair

The discriminant D = b² − 4ac decides the roots. For x² − 5x + 6 = 0, D = (−5)² − 4(1)(6) = 1, and the quadratic formula gives (5 ± √1) / 2, which is 3 and 2. For 2x² − 4x − 6 = 0, D = 64, a perfect square, and the roots simplify to 3 and −1. When D is positive and a square factor sits inside it, that factor comes out of the radical, so √8 becomes 2√2, and a decimal sits beside the exact form.

When D = 0, as in x² + 2x + 1 = 0, the root −b / (2a) is repeated, and that root is −1. When D is negative, as in x² + 1 = 0, the roots are complex conjugates. Here D = −4, so √D = 2i and the roots are i and −i. The real part of that pair is the vertex x-coordinate −b / (2a). If a is 0 and b is a nonzero number, the equation is linear and the solution is x = −c / b. If a and b are both 0 and c is not 0, there is no solution; if c is also 0, every number is a solution.

The vertex and a quick check

The vertex of y = ax² + bx + c is the point where x = −b / (2a). For x² − 5x + 6 the vertex is (5/2, −1/4). You can check a pair of roots with the sum and product: the sum equals −b/a and the product equals c/a. For roots 2 and 3, the sum is 5 and the product is 6, which matches −b/a and c/a for that equation.

Frequently Asked Questions

What is the quadratic formula?

The solutions of ax² + bx + c = 0 are x = (−b ± √(b² − 4ac)) / (2a), as long as a is not zero. The page writes that formula with your coefficients substituted, then simplifies the square root and the fraction.

What does the discriminant tell you about the roots?

D = b² − 4ac. A positive D gives two different real roots. D = 0 gives one repeated real root, −b / (2a). A negative D gives two complex roots.

How are complex roots written?

When D is negative, √D = i√(−D). The roots are −b/(2a) + i√(−D)/(2a) and −b/(2a) − i√(−D)/(2a). The page writes that conjugate pair as p ± qi. For x² + 1 = 0, p = 0 and q = 1, so the roots are i and −i.

What happens if a is 0?

The equation is linear. When b is not 0, bx + c = 0 has the solution x = −c/b. If a and b are both 0 and c is not 0, there is no solution; if c is also 0, every number is a solution.

Why do some answers still have a square root?

If D is a perfect square, the square root becomes a whole number or a fraction and the roots are rational. If a square factor is hiding inside D, it is pulled out, so √44 becomes 2√11 and (8 ± 2√11) / 2 becomes 4 ± √11. A square-free factor stays under the radical, and the decimal next to it approximates that exact value.

Related Tools