Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Solve ax² + bx + c = 0 for x using the quadratic formula, including complex roots.
A quadratic equation has the form ax² + bx + c = 0. This tool solves for x using the quadratic formula, the standard method for finding both roots of any quadratic -- including cases where the roots are complex numbers.
Enter the coefficients a, b, and c. The two roots (or the complex-conjugate pair, if the discriminant is negative) appear instantly.
x = (-b ± √(b² - 4ac)) / 2a
The discriminant (b² - 4ac) determines the root type: positive gives two real roots, zero gives one repeated real root, negative gives two complex roots.
The page already shows a case with two whole-number roots. Here are the other three situations the tool handles. For x² - 4x + 4 = 0, enter a = 1, b = -4, c = 4. The discriminant is 16 - 16 = 0, so both roots equal 4 / 2 = 2. The two tiles x1 and x2 will both read 2.0000. For x² - 2 = 0 (a = 1, b = 0, c = -2) the discriminant is 8, so the roots are plus and minus the square root of 8, divided by 2, which display as 1.4142 and -1.4142. For 2x² + 4x + 5 = 0 the discriminant is 16 - 40 = -24, which is negative, so the roots are complex: the real part is -4 / 4 = -1 and the imaginary part is the square root of 24 divided by 4, about 1.2247, so the roots are -1 plus or minus 1.2247i.
Real part = -b / 2a. Imaginary part = square root of (4ac - b²) / 2a, when the discriminant is negative
Substitute a root back into the original equation. With x = 3 in x² - 5x + 6, you get 9 - 15 + 6 = 0, which confirms it. The two roots should also satisfy two relationships: they add up to -b / a, and multiply to c / a. For the example above, 3 + 2 = 5 and 3 x 2 = 6. If your results fail these checks, recheck the signs you entered.
The tool shows results rounded to four decimal places, so an irrational root such as the square root of 2 appears as 1.4142, not an exact form. If a = 0, the tool treats the equation as linear and returns x = -c / b in both result tiles; if both a and b are 0, no solution is calculated. In that case the equation is no longer a quadratic, and the Linear Equation Solver is the right tool. With negative a values, the signs of the complex parts follow the formula, but the two roots are still complex conjugates of each other.
Graphically, real roots are where the parabola crosses the x-axis, a repeated root is where it just touches, and complex roots mean it never touches. In applied problems such as projectile height or area, a negative or complex root may not be physically meaningful, so read the answer against the situation, and remember that an equation with a negative discriminant simply has no real solution.
The equation is no longer quadratic -- it degenerates to a linear equation bx + c = 0. Use the Linear Equation Solver instead.
It means the equation has no real roots -- the graph never crosses the x-axis. The two solutions are complex conjugates.
Factoring only works cleanly for equations with rational roots. The quadratic formula solves any quadratic equation, including ones with irrational or complex roots.
Calculate b² - 4ac. If it is zero or positive, the roots are real; if it is negative, they are complex. The tool applies exactly this test.
The tool shows values rounded to four decimal places. Exact forms such as fractions or radicals are not produced.
You can enter decimals such as 0.5. For a fraction like 1/3, enter a decimal approximation or multiply the entire equation to clear denominators first.
When the discriminant is zero, x1 and x2 show the same value, since there is only one distinct solution.
Reference: NIST Weights and Measures