DeluxeCalc

Quadratic Equation Solver

Solve ax² + bx + c = 0 and find real roots instantly.

About this calculator

A quadratic equation has the form ax² + bx + c = 0, where a, b, and c are numbers and a is not zero. The highest power of x is 2, which is what makes it quadratic. Its graph is a U-shaped curve called a parabola, and the real roots, also called solutions, zeros, or x-intercepts, are the x-values where that parabola crosses the x-axis. Quadratics appear throughout algebra and in real problems involving areas, projectile motion, and profit, so being able to solve them quickly and check your working is useful well beyond the classroom.

How to use this solver

First rearrange your equation into standard form, with every term on one side and 0 on the other. Then type the three coefficients into the boxes in the equation template. The template shows plus signs between the terms, so for x² − 5x + 6 = 0 you enter a = 1, b = −5, and c = 6. If a term is missing, its coefficient is 0, so x² − 9 = 0 has b = 0. The roots update instantly as you type, the number line marks where each real root falls, and a separate card shows the discriminant with a short note on what it means. Roots are shown to six significant digits. Your coefficients are saved in the page address, so you can bookmark or share an equation.

The quadratic formula

Every quadratic equation can be solved with x = (−b ± √(b² − 4ac)) / 2a. The ± sign means there are two calculations, one adding the square root and one subtracting it. The solver labels the result of adding as x₁ and the result of subtracting as x₂. Note that the whole top line, not just the square root, is divided by 2a.

The discriminant

The expression under the square root, b² − 4ac, is called the discriminant, and it tells you how many real roots to expect before you solve. A positive discriminant gives two distinct real roots, so the parabola crosses the x-axis twice. A discriminant of zero gives one repeated root, so the parabola just touches the x-axis at its vertex. A negative discriminant means the parabola never touches the x-axis, so there are no real roots, and the solver says No real roots.

Worked example

Solve 2x² − 4x − 6 = 0. Here a = 2, b = −4, and c = −6. The discriminant is (−4)² − 4 × 2 × (−6) = 16 + 48 = 64, which is positive, so there are two real roots. The square root of 64 is 8, so x = (4 ± 8) / 4. Adding gives 12 / 4 = 3 and subtracting gives −4 / 4 = −1. The solver shows x₁ = 3, x₂ = −1. You can check by substituting: 2 × 3² − 4 × 3 − 6 = 18 − 12 − 6 = 0.

Two more cases

For x² − 6x + 9 = 0 the discriminant is 36 − 36 = 0, so there is one repeated root, x = 3, because the equation is (x − 3)² = 0. For x² + 2x + 5 = 0 the discriminant is 4 − 20 = −16, so the solver reports No real roots. Not every answer is a whole number. For x² + x − 1 = 0 the discriminant is 5, and the roots are shown as 0.618034 and −1.61803.

A real-world example

A ball is thrown upward from 1.5 metres with a speed of 20 metres per second, and its height after t seconds is −4.9t² + 20t + 1.5. To find when it lands, solve −4.9t² + 20t + 1.5 = 0 by entering a = −4.9, b = 20, and c = 1.5. The discriminant is 429.4, and the solver gives x₁ = −0.0736703 and x₂ = 4.1553. A negative time makes no sense here, so the ball lands after about 4.16 seconds. Because a is negative in this equation, x₁ is the smaller root; when a is positive, x₁ is the larger one.

Interpreting the results

The two roots are always placed symmetrically around the vertex of the parabola, which sits at x = −b / 2a. For 2x² − 4x − 6 = 0 that is x = 1, exactly halfway between −1 and 3. Two quick checks help catch typing errors: the roots add up to −b / a and multiply to c / a. For the worked example, 3 + (−1) = 2 = 4 / 2 and 3 × (−1) = −3 = −6 / 2. If a is positive the parabola opens upward, and if a is negative it opens downward.

Tips

If all three coefficients share a common factor, you can divide it out first without changing the roots, so 2x² − 4x − 6 = 0 has the same roots as x² − 2x − 3 = 0. When the roots are whole numbers, try factoring as well, since it is quicker by hand and the solver lets you confirm the answer. Always substitute at least one root back into the original equation when the result matters.

Common mistakes and limitations

The most frequent mistakes are entering b with the wrong sign, forgetting to move every term to one side before reading off a, b, and c, and, when working by hand, dividing only the square root by 2a. This solver reports real roots only. When the discriminant is negative, the roots are complex numbers, which you can find by hand as −b / 2a ± i√(−(b² − 4ac)) / 2a; for x² + 2x + 5 = 0 they are −1 + 2i and −1 − 2i. If a is 0, the equation is linear rather than quadratic, and the solver shows Not a quadratic equation (a = 0); solve bx + c = 0 directly with x = −c / b. Roots are rounded to six significant digits, so √2 appears as 1.41421. Finally, with decimal coefficients, rounding inside the computer can leave a discriminant that should be exactly zero as a tiny leftover such as −0.0000000000000002. The solver treats a discriminant that small, relative to the size of b² and 4ac, as exactly zero, so x² − 1.4x + 0.49 = 0, which is (x − 0.7)², correctly gives the single repeated root x = 0.7.

Frequently Asked Questions